-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
PermissionManager.getPermissions() error after connection reset #6492
Comments
This is a critical problem. Can anybody reply to this? |
@pavelpoley @wildfisher Sorry for the late reply. I have been trying various ways to reproduce the reported behavior using https://github.com/realm/my-first-realm-app/tree/master/android/todo-full-sync, but so far I cannot reproduce connections being cut, even if the app is left alone for 10 minutes. I have tried reproducing the behavior on both emulator and a OnePlus device. Which kind of network conditions are you under, are you using Wifi or normal cellular data? |
@cmelchior , what But the question is open because the issue is not only this automatic connection reset, the problem is that I have attach gist to reproduce this error manually: Just replace |
Thank you very much for the code. I can reproduce it now. I'll look into it. |
Okay, I can see the problem. Once we reported an error, we don't clear the saved error, causing all future calls to fail as well by reporting the same error. The problem will go away if you close the |
If the error is still happens after close and re-open this may mean that some other And what about the offline work, |
@pavelpoley Yes, you would need to fully close all PermissionManager instances for it to work. The underlying Realms do work offline, but because the PermissionManager fails to clear the error, it will appear as it does not. I'm working on a fix now. |
@cmelchior Okay, thanks. |
I merged a fix to |
When 5.12.0 will be released? |
We are using Realm Platform Shared plan and still experience this issue. |
I am continue with this issue since i don't have solution
[(https://github.com//issues/6458)]
After connection reset or dropped connection
PermissionManager.getPermissions()
return this error:E/REALM_SYNC: Connection[4]: Reading failed: Connection reset by peer E/REALM_JAVA: Error in __permission: CONNECTION_RESET_BY_PEER(realm.basic_system:104): Connection reset by peer E/REALM_SYNC: Connection[1]: Reading failed: Connection reset by peer E/REALM_JAVA: Error in __wildcardpermissions: CONNECTION_RESET_BY_PEER(realm.basic_system:104): Connection reset by peer E/REALM_SYNC: Connection[2]: Reading failed: Connection reset by peer
Even if it network error like @cmelchior said, i think something wrong here.
If you just disable INTERNET manually for a second getPermissions() not working anymore even with new
PermissionManager
instance.as i know
__permission
is a simple full-sync realm, and it should to work like other user'sRealms
, and user's Realms work fine after connection reset.Goals
Call
PermissionManager.getPermissions()
to get the list of permissions for all Realms available to this userExpected results
PermissionManager.getPermissions()
should returnRealmResults<Permission>
Actual results
PermissionManager.getPermissions()
triggersonError()
withnull
object but with some addiotinal logs fromE/REALM_SYNC
Steps to reproduce
Call
PermissionManager.getPermissions()
then manually disable and enable network then callPermissionManager.getPermissions()
again, only after activity restart(setting configuration and connecting to realm) thePermissionManager.getPermissions()
work again.I want to mention that some connection reset happen by itself after about 5 minutes when
PermissionManager.getPermissions()
is called, this is happen also in the full sync TODO app exampletodo app
Also does
Permission
/PermissionManager
not support offline mode?Realm 5.10.0
Realm platform cloud - standard plan
Android studio 3.4
Checked API 25/26
The text was updated successfully, but these errors were encountered: