-
Type: Bug
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
How frequently does the bug occur?
All the time
Description
When adding a dynamic subscription if the query includes the keyword CONTAINS the subscription fails, the user has no clue why the data is not synced unless he register a StateChangeCallback like the following
Unable to find source-code formatter for language: kotlin. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
realm.subscriptions.update {...}.waitForSynchronizationAsync(object: SubscriptionSet.StateChangeCallback { override fun onStateChange(subscriptions: SubscriptionSet) { println(">>>>>>>>>>>>> subscriptions state changed ${subscriptions.state}") } override fun onError(e: Throwable) { println(">>>>>>>>>>>>>>>>>>> SUB error: $e") } }
However in our case instead of reporting the error
Client provided query with bad syntax: unsupported query for table "Book": CONTAINS is not yet supported in server-side queries
on the onError callback it is reported as a state change via onStateChange with State.ERROR then the user has to pull the error via getErrorMessage(). which makes overriding onError useless/misleading
Stacktrace & log output
No response
Can you reproduce the bug?
Yes, always
Reproduction Steps
No response
Version
10.10.1
What SDK flavour are you using?
MongoDB Realm (i.e. Sync, auth, functions)
Are you using encryption?
No, not using encryption
Platform OS and version(s)
Android API29 x86_64
Build environment
No response