-
Notifications
You must be signed in to change notification settings - Fork 558
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
Unhandled session token refresh error #1116
Comments
@mklb Can you post more details? Possibly ways for us to reproduce please? |
@bmunkholm error log from app:
log from server:
It's probably triggered by refreshing the token. |
Did you open a realm with sync that you then |
@fealebenpae |
Do you save it in a field somewhere, or just in a local variable? |
I exported it for global use. |
Would it be possible to send your project to help@realm.io? |
@fealebenpae |
@fealebenpae
|
@fealebenpae
the default one is working perfectly, could you please look into it? |
Hey @shenjiayu, I’m sorry, I have been busy with other tasks and haven’t had the chance to look at your project yet. Thanks for the |
this is how I use - and I think should use the library. Realm.Sync.User[action](Constants.dBUrl, username, password, (error, user) => {
if (error) {
// ....
} else {
this.realm = new Realm({
schema: [..,..,..],
schemaVersion: 5,
sync: {
user,
url: XXXXXXX,
},
})
this.realm.objects('XYYY').addListener((allObjects, changes) => {
// ...
})
}
}) I could imagine that the error is thrown when I login with a not logged out user. Maybe because I often close and delete/reinstall the app without logging the user out.. However: I logged every user out before deleting the app today but I had this error every ~10 min... I planed to release my App this week but there is now way I can do it like that. Edit:
|
@mklb is your error also |
I opened the issue (first post). Yes ;) |
You could go to Also, in your app's stdout log, do you get a line that says |
I did not uncomment the code but I can tell you that syncing does work after clicking the dismiss button of the react native error popup view. So I guess your suggestion as a temporary workaround for a production app would be okay.. ¯_(ツ)_/¯ |
I made a complete and total stab-in-the-dark sort of fix. @mklb @shenjiayu could you please try it out? (I had to zip it because GitHub doesn't like |
Did I do it right? I changed the package content of the During the build phase it said:
Does that mean your changes are overwritten because I did not change the version nr. in the Anyway, I´m testing it now and will edit this post in 15 min ;) Hopefully it will work. Thanks in advance for your effort and quick replies! EDIT: Damn (╯°□°)╯︵ ┻━┻ After 5 min the same but different phrased error appeared.
before that I see these logs. So, at least in my case, everything refreshes correctly accept the _management realm:
|
Nah, it’s only downloading the core engine binaries - React Native is a layer above that. I really hope this helps. |
Edited my post. Sadly an error is thrown T_T |
How did you use the management realm? Did you log out any users? |
Sorry for the late reply! I tried it again as follows:
PS: I want to point out that this error is thrown from |
I will delete the realm server and install a fresh build. maybe the problem will be fixed this way.. Lets say I release an app with the monkey patch above ( #1116 (comment) ). We learned / saw that only the users In my case this would not be a problem since my users can´t change anything in the management realm anyway after the account is created... The question is: is there any other drawback that I am missing or is it okay to just don't care about the |
@mklb Did the fresh installation solve the issue? |
@mklb I close the issue. Don't hesitate to reopen or create a new. |
@kneth sorry for the late reply. No it did not solve anything. this are my dependencies from
this is my ROS log output the same second the error is thrown. I cant see any error message in the ROS logs. _management realm shows 200:
No Idea what is happening. Thought that the problem solved itself somehow a few hours ago..than the error came back. Maybe this is because I deleted the app without logging a user out?
EDIT: Just invalidated my thoughts above. Tested it on a real iPhone. No difference, same error message! But this time I see an error in the ROS logs as well
|
My plan for finally releasing the app is to suppress as @fealebenpae suggested the error message. I will uncomment the line 118 from the Realm version 2.0.4. Hope that helps some people out there as well.. Why version 2.0.4? Because the flow allows the app to fully function after that error is thrown / surppressed. |
And you didn't add an error handler? It might help understand what the error is. |
as far as I can see the version 2.0.4 just refreshes the token from the server so I dont need to do anything..? ¯_(ツ)_/¯ |
@mklb Do you have a proxy in front of your object server? 2.1.1 has a fix for that situation. |
I do not think so. But I have no idea to be honest. The problem occurs with a local dev AND with a production object server on digital ocean. No idea why the problem is consistent through all the different SDKs and object server versions I have tried this year (see posts above).. To recap: as far as I understand the SDK is unable to find the local token. I suppressed the error message (SDK 2.0.4) so the app can continue to run. the sdk then just refreshes the token in ram (I guess) from the object server. maybe it even saves it locally on the device and is just unable to find it again.. I don´t know. It's also weird that I am the only one with this issue I am testing my app in Testflight right now and the solution seems to work |
@mklb If TestFlight can provide some insights, please share. |
@kneth I invited you via your gmail address ;) |
@mklb Thanks but I am an Android user 🤖 . @fealebenpae Can you help us? |
@mklb do you still get the |
@fealebenpae no, since I suppressed the error as you suggested. |
I think I understand. You correctly identified a bug with my original implementation where I never expected the The relevant code in |
I just installed / tested V.2.2.0 with my local ROS V.2.0.16 and received the same error after a few minutes of running the app.. frustrating :( |
@mklb Thanks for the update. @fealebenpae Does it ring a 🔔? |
I’m afraid not. I don’t understand how this happens in the first place. |
@mklb Please try to upgrade (to 2.2.10). We have fixed a few bugs related to similar reports. |
Closing due to inactivity. |
+1 |
The problem persisted. This is why I pulled the plug from the realm server for the production app. |
I get a session refresh error after running an app for a view minutes in react native on iOS:
React native: 0.45
Realm: 1.8.3
Realm Obj. Server: 1.7.6
Simulator Device Version: iOS 10.3
The text was updated successfully, but these errors were encountered: