Error: Database has an unsupported version (24) and cannot be upgraded #6786
Labels
Encryption:Off
Frequency:Always
More-information-needed
More information is needed to progress. The issue will close automatically in 2 weeks.
O-Community
Repro:Always
SDK-Use:Local
T-Bug
Waiting-For-Reporter
Waiting for more information from the reporter before we can proceed
How frequently does the bug occur?
Always
Description
package.json for App.tsx
{
"@realm/react": "^0.8.0",
"realm": "^12.6.2"
}
package.json for prepopulateRealm.js
{
"realm": "^12.6.2",
}
The schemas for each realm are identical.
const config = {
schemaVersion: 1,
schema: schemas,
};
Run prepopulateRealm.js, then add to bundle as /assets/realm/bundle.realm
Then run below with the path in the realmConfig to the DocumentsDirectory.
Realm.copyBundledRealmFiles();
const realmContext = createRealmContext(realmConfig);
const {RealmProvider} = realmContext;
export default function App():React.JSX.Element {
return (
<Stack.Navigator>
</Stack.Navigator>
);
}
I then receive this error. I would expect that the uptake for the bundled realm should be seamless. Within the DocumentsDirectory I see it creates the .lock and .management files.
I can also ping this location using a separate js file using this config:
const config = {
schemaVersion: 1,
schema: schemas,
path: "/path/to/DocumentsDirectory/bundle.realm"
};
And the data is there.
Stacktrace & log output
Can you reproduce the bug?
Always
Reproduction Steps
Version
"realm": "^12.6.2"
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
iOS 17.5
Build environment
Which debugger for React Native: ..
Cocoapods version
No response
The text was updated successfully, but these errors were encountered: