-
Notifications
You must be signed in to change notification settings - Fork 169
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
Opening realm with cached user while offline results in fatal error and session does not retry connection #7349
Comments
➤ michael-wb commented: If the location request fails when a Realm is opened (e.g. offline, can't find server, etc.), then a fatal error is definitely being reported to the client and the session will not attempt to reconnect without being manually resumed. A couple of thoughts on possible implementations:
The current route being investigated/implemented is #3, since it will work somewhat similar to how the access token is refreshed if the initial request fails to update the access token prior to starting the session - it starts the session anyways and uses the Connection connect logic to request an updated access token when the websocket fails to be established. |
➤ michael-wb commented: The most straightforward approach seems to be to add a new state to SyncSession ( |
➤ michael-wb commented: Adding a more detailed of the description/requirements of this issue, since this is extending into 4 week territory
With the changes for the "update BaseURL" project, if the client is currently online and the configured
It becomes a little bit tricky if the client is currently offline, since not all the changes work as expected:
|
➤ michael-wb commented: Some potential implementations for handling the location update:
|
➤ Jonathan Reams commented: So the thing that I've always found confusing is that you always have a base url. Either it's the default value in App::Config or the user has manually set a value in App::Config or the user has called update_base_url() and explicitly set it that way. We can always just try to connect to whatever the current value of base url is and we can always get a redirect that may update our baseurl until the next time the app restarts or update_base_url is called. the |
➤ Andy Wang commented: Hi [~michael.wilkersonbarker@mongodb.com] , just to follow up on this one. I checked the github and found there seems to be code already merged and the fix is completed. Can I consider this issue fixed? and if yes, is there anything the customer needs to do to implement the fix? ty! |
➤ michael-wb commented: Hi [~andy.wang@mongodb.com], A fix has been merged into the Core master branch and we will need to create a release (likely tomorrow) that will contain this fix. Once this has been released, the SDKs will need to create a release that includes this change. I am hoping we can have this available by the end of the week or early next week. Since it looks like issues have been reported for JS and Swift, I will reach out to those SDK teams once the Core release is ready so we can make a build available for them ASAP. Thanks, Michael |
➤ Andy Wang commented: thanks so much for the fast reply [~michael.wilkersonbarker@mongodb.com] !!! Can I safely assume the moment I see a new SDK version release is when I can revert back to the customer and ask them to upgrade the SDK version? |
➤ michael-wb commented: Yes, I will also try to keep an eye on the SDKs to let you know when they have been released. Thanks for following up! |
➤ Andy Wang commented: hi [~michael.wilkersonbarker@mongodb.com] , sorry for bothering you again. Does realm 14.4.1 fixes the issue? I saw there's a new release last week and this ticket has been closed. just wondering:) ty! |
➤ michael-wb commented: Hi [~andy.wang@mongodb.com] - yes, Realm 14.4.1 / Swift v10.49.1 fixes this particular issue, but there is an outstanding issue with |
➤ Andy Wang commented: Hey [~michael.wilkersonbarker@mongodb.com] , thanks for the fast reply! Will we get a I assume it will be safe for me to wait up till you inform me it is okay to ask the customer to retry. |
➤ michael-wb commented: If they are not using |
➤ Andy Wang commented: Hey [~michael.wilkersonbarker@mongodb.com] , I see that we might have a new Rm CORE release (v 14.6.0). Is it now safe for me to inform the customer to update their app? TY! |
➤ danieltabacaru commented: [~andy.wang@mongodb.com] Not yet. The SDKs need a new release too. |
This ticket was created based on the customer reported issue in HELP-55798 and is a P2, since that ticket is also P2.
With the changes for updating the use of
app::Config::base_url
and adding theApp::update_base_url()
function, the first SyncSession opened after app start will always request the user creds to be updated (and thereby updating the location info) if the location had not been requested via another App HTTP request.If the Realm is opened while the client is offline, this results in a fatal error due to the resolve failed or offline error returned while requesting the location, which is reported to the client via the registered
error_handler
and the SyncSession becomes inactive without retrying the connection attempt.The text was updated successfully, but these errors were encountered: