-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash after 401 error #3503
Labels
Comments
RedBeard0531
added a commit
that referenced
this issue
Jan 15, 2021
The problem with the fix in #3340 was that it was causing the EventLoopDispatcher to be constructed on the sync thread rather than on the JS thread, which is required. This alternative fix initializes it on the JS thread, but ensures it is re-initialized when RN apps are reloaded.
1 task
Hello @duncangroenewald, thank you for a highly detailed report. We believe this is related to an issue (being fixed by @RedBeard0531, as you see by the mention). |
kneth
added a commit
that referenced
this issue
Jan 15, 2021
* Revert "recreate EventLoopDispatcher in NetworkTransport on hot reload in RN (#3340)" This reverts commit 4c4e497. * Alternative fix for #3236 that avoids causing #3503 The problem with the fix in #3340 was that it was causing the EventLoopDispatcher to be constructed on the sync thread rather than on the JS thread, which is required. This alternative fix initializes it on the JS thread, but ensures it is re-initialized when RN apps are reloaded. Co-authored-by: Kenneth Geisshirt <[email protected]>
@steffenagger - I just tested with 10.1.3 and sync still fails. I will raise a new issue since failure mode seems a little different now. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Goals
We are trying to load data from an existing v10 local realm file into a synced MongoDB Realm using a javascript script. This same script was successfully used previously to load data into a Realm Cloud synced realm. Some modifications have been made for MongoDB Realm.
Expected Results
Expect the data to load into the synced realm and expect the data to be synced in the same manner as Realm Cloud
Actual Results
The script runs and successfully populates the synced realms local realm file - subsequent queries of the local synced realm returns the correct number of records for each object type (or table).
However the sync fails to complete with what appear to be different errors each time the script is run.
Steps to Reproduce
When running the script is appears to complete copying all the data to the synced realms local file but the sync process fails and disconnects from the server.
Subsequent attempts to restart the script in query mode (i.e. don't copy data just query the synced realm data) results in the call to open the realm failing to return. Similarly attempting to connect the same Realm App from another client also fails to return from the call to open the realm.
In an attempt to fix this we added a delay between each write transaction and then when running the script it completes copying the data to the synced realm local file and then the background sync process starts syncing data but fails with a "Bad sync process (7)" error.
Restarting the script in query mode (i.e. script does not load data from the source file but simply queries the synced realm data) seems to resume the sync process which again fails are a period of time with the same error as above.
After a number of restarts the script eventually completed syncing the data (uploaded all the change sets).
However this does not always work reliably.
Below is an example of the failure from the client log
Code Sample
Version of Realm and Tooling
The text was updated successfully, but these errors were encountered: