Thanks for the feedback everybody! I've shared this previously, but just want to reiterate and put all of this into context.
Release version 3.355.0 represented a fairly significant rearchitecure of the Android build that was primarily focused on improving overall performance. Unfortunately, this change also exposed some underlying flaws - both in our builds and the construction of certain apps.
One of the common reports we've received is intermittent query failure, for example. After a bunch of testing and digging into app JSON, we're fairly confident that these failures are the result of race conditions that were previously being masked by a more inefficient architecture. The fix is to ensure sequential execution of dependent queries via await and, as a safety net, handle null values wherever possible.
If multiple queries fire in the same event handler without await, they race each other through the mobile bridge.
Dependent queries and component bindings can read null during the brief window when a parent query has cleared its data but hasn't yet repopulated it.
Under heavy load, updates can also arrive out of order, leaving your UI stuck on stale or empty values.
The kind of pattern breaks:
q_root.trigger()
q_child1.trigger()
q_child2.trigger()
q_child3.trigger()
1. Use Await each trigger (recommended for sequential flows)
await q_root.trigger()
await q_child1.trigger()
await q_child2.trigger()
await q_child3.trigger()
Also, just to make sure:
2. Guard templates against null
Even with the patterns above, every template that reads another query's data should tolerate null during loading or error states:
// Bad — throws if q_root is still loading
return { parent: {{ q_root.data.id }} }
// Good — safe during any state
const root = q_root.data
if (!root) return { parent: null, count: 0 }
return { parent: root.id, count: root.rows.length }
I understand that this refactor requires a certain level of manual effort and am happy to provide support during Office Hours! If the timing doesn't work, let me know and we can figure something out.