-
Notifications
You must be signed in to change notification settings - Fork 579
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
Unable to open a realm at path default.realm on Android #1714
Comments
I was able to re-add all of the realm files I deleted ( Often the app will just crash and reload and will not throw an error though sometimes it does when running a release version. After assembling a release and running on my Android device I was able to get this error: |
Further debuggingThis issue suggests encryption may be the culprit, so I thought removing the encryption option might change something: Unfortunately not, now I am receiving a schema version difference. I thought 'somehow' the DB on the device was actually 31 and not the defined 47 so I changed the schema version to 31 to verify: Okay... So somehow the schema version is correct? I assumed that removing the schema version and encryption option should be okay as I was planning to uninstall the application and reinstall to test the scenario, recreating the DB and not requiring migrations or a schema version at all: Only to reveal a new raised issue that must be library unrelated (I can't find its reference). Using android studio and a created emulator, I pulled the realm file once the application was started and running before the issue occurs, and have found nothing unusual with the file. The DB opens up using realm studio with the encryption turned off, and everything looks as though it has been successfully stored. |
@MrHubble I can't give you a definite answer. The old bug, you are referring to was related to a race-condition when multiple threads were writing and reading an encrypted Realm. Since it has been fixed, I don't think what you see is related. The last screen shot seems to be unrelated to Realm. |
Outdated. Feel free to reopen in case this is still relevant. |
I am using Realm with React Native. Previously my Android build process kept getting stuck on 93%. The fix was
rm -r default.realm* && rm -r realm-*
, after which my build would complete successfully.However, now the first time I go to use my app it will crash with errors similar to
unable to open a realm at path default.realm
,not a realm
. After reloading, the app works fine and will no longer throw an error. So to replicate the bug I need to constantly delete the app from my Android device.I can not replicate this bug when stepping through the code, it only occurs if I disable remote debugging.
This I have tried:
Realm.open({ path: 'myRealm.realm'
Version of Realm and Tooling
The text was updated successfully, but these errors were encountered: