-
Notifications
You must be signed in to change notification settings - Fork 586
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
Any instance from RealmApp.allUsers crashes Electron BrowserWindow #3493
Comments
This could be related to #3481 as I can see you changed there |
I have recorded the video presenting User object and exact moment of the crash. The same time that the crash happened, the logs from Electron were:
It looks like it throws here https://github.com/realm/realm-core/blob/2946c7a52449d3b8d038ff03d896b651615b8ad4/src/realm/util/websocket.cpp#L788 however Realm should validate user instance first and at least refresh token? |
We are currently investigating a bug introduced by #3340 where refreshing the access token will lead to a crash. The access token expires in 30 minutes. |
@kneth Is there any update about the issue? |
@bimusiek No positive updates but we have identified where the bug might be hidden. The fix doesn't seem to be that easy. |
@bimusiek We have released v10.1.3 with a fix of the bug in the refreshing of the access token. |
Goals
We are doing more than 20k concurrent requests to MongoDB Realm (based on support info). To limit the number of auth requests, we want to skip auth if user already authenticated.
We use
Realm.App.allUsers
to achieve it.Expected Results
When using instance from
allUsers
, Realm should work as normal.Actual Results
When using instance from 'allUsers' the BrowserWindow in Electron crashes.
There are no logs or any info why it crashes.
The crash happens when code execution reaches
Steps to Reproduce
Initialise Realm with JWT authenticated user.
Wait 30min and initialise Realm with user instance found in
.allUsers
.Realm crashes BrowserWindow in Electron.
Code Sample
If
loggedInUser
exists but is not really authenticated, the Realm crashes instead of just re-authenticating using refresh token.As I said, we dont have access to any logs as there is no Node crash. BrowserWindow in Electron simply becomes unstable.
Version of Realm and Tooling
It looks like, that React native handles this case correctly, only Electron crashes the BrowserWindow.
The text was updated successfully, but these errors were encountered: