Bug- Dataview queries on mobile app result in evaluation error

Platform

[ ] iOS
[X] Android

Obsidian Mobile version: v1.3.2(69)

I’m having trouble with having my data view JavaScript queries resulting in an evaluation errors for reading a property due for tasks. This is making most of my task management Impossible on the mobile. Tasks used to be rendered properly before updating obsidian to version 1.3.2

I face the same issue even on the desktop version however restarting obsidian resolves more often than not.

Any help on this would be greatly appreciated. Thanks!

Hi @kapadia.ali ,

Could you post a couple examples of your what your task definitions look like, and an example of a query that throws this error? That would help a lot in understanding what the problem might be.

Craig

Hi @Craig, my tasks are setup as below and the query i use to pull relevant tasks in a daily note. I’ll also post a screenshot from my computer of the same query that works on my desktop setup.

My vault(folder) is on a NAS that keeps the folder synced on all my devices.

  • [ ] Task example one :spiral_calendar:2022-11-28 [p::[[Ali]]], [r::Family], [i::], [c::p], [e::l],
  • [ ] Task example two :spiral_calendar:2022-11-28 [p::[[Person]]], [r::[[A note]]], [i::], [c::o], [e::l],

I also have a couple of variations of this query for my weekly note too.

let n = luxon.DateTime.now() //current date-time
let inc_tasks = dv.pages(-'"/Journal/Daily"').file.tasks.filter(t => t.due  
																&& !t.completed 
																&& t.due >= dv.luxon.DateTime.fromFormat(dv.current().file.name,"yyyy-MM-dd")  
																&& t.due <= dv.luxon.DateTime.fromFormat(dv.current().file.name,"yyyy-MM-dd")
																&& t.i !='parked') //incomplete tasks
for (let related of inc_tasks.groupBy(t => t.r)){
	dv.header(6,related.key);
	dv.taskList(
		inc_tasks.filter(t => 
			//Math.floor(n.diff(t.due,'days').days) == 0 
			//&& 
			//t.c == category.key
			//&& 
			dv.func.choice(
						dv.func.typeof(t.r) === "link",
						dv.func.contains(t.r, related.key),
						t.r === related.key
			)
		).sort( t => t.i, 'desc', t.due, 'asc')
	,false
	)
}

OK, thanks, that’s helpful, thank you. I was able to reproduce your situation. I saw a similar error at first, but then the query started producing results. I restarted Obsidian and got the error, but after closing and re-opening the page a few times I started getting results.

This is a tough one! My best guess is that there is some kind of race condition where Obsidian or Dataview hasn’t finished indexing pages before your query runs. I don’t know enough about the internals of either to speculate further.

Sorry I can’t be more help. :frowning: Good luck!

Craig, thank you for trying to help. Hopefully, someone else is able to help.