In one of our app, we have both realm-js and realm-java integrated to handle data validations. Initially, the realm file is created from JS (React Native). Then in the background while handling push notifications, the same realm file will be accessed from Java (Native) using realm-java.
When I access the realm file from java, the app gets crashed with the below error message:
"Unable to open realm at path "localData.realm", or it may be invalid.
When data is written to DB from realm-JS, the native side should be able to access the DB data since there is only one realm DB file.
When data is written to DB from realm-JS, the native side should be able to access the DB data since there is only one realm DB file. The data accessing must proceed without any errors reported.
A FATAL exception was thrown saying the specified realm file was invalid or could not be opened.
It is similar to #1440, and we haven't prioritized to get it to work (that goes for Realm JS/Java/Cocoa combined).
@kneth Sorry, the origins of this issue is 2 years old according to related issues (React Native + Swift/ObjC). Could you please honestly let us know if this issue will ever be prioritized?
All I need to know is if there is hope or I should just move on.
@dsemenov https://github.com/realm/realm-js/issues/1440#issuecomment-519049404
Hello! I certainly understand that there are a lot of competing priorities, but I just wanted to confirm how I should interpret the earlier comment. Does no priority mean: no never, no decision made, not at least in the next 3+ months?
@rickmanelius No decision made. So likely not the next 3 months.
Ok great! That helps us with our own roadmap and decision making.
I done an react native app with realm database. In my react native app I have a background service that handles push notifications and try to store the notification data on the realm database, this service its a native module and uses realm-java code.
I can read and write data on the realm database with react native. I try to store data in the same realm database, by my background service file (native java module) but it isn't work. Is not posible?
It will only work if everything is in the same process. Mixing Realm Java and Realm JavaScript can be a bit hard - we don't have a simple guide to follow on that topic.
@kneth Is there enhancements done to solve this problem. It will be of great help.
Most helpful comment
@kneth Is there enhancements done to solve this problem. It will be of great help.