-
Type: Bug
-
Resolution: Unresolved
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: None
How frequently does the bug occur?
Always
Description
Hello! I'm developing React Native app with realm.
I'm initializing app with RealmProvider:
<RealmProvider schema={[RealmList, RealmTask]}>
At some point I've decided to change schema:
Unable to find source-code formatter for language: typescript. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
export class RealmTask extends Realm.Object<RealmTask> { _id: BSON.ObjectId = new BSON.ObjectId(); completed: boolean = false; createdAt: Date = new Date(); // date: Date | null = null; <<<< BEFORE date?: Date; // <<<< AFTER listId!: BSON.ObjectId; order: number = 0; reminderEnabled: boolean = false; title: string = ''; updatedAt: Date = new Date(); static primaryKey = '_id'; }
And after that I've got error:
> Error: Realm at path '/Users/[user]/Library/Developer/CoreSimulator/Devices/F93F6540-1289-4F0A-9FFC-FAEAE781EDEA/data/Containers/Data/Application/5A6B5E22-3848-4D24-AF59-B7F2B0528A74/Documents/default.realm' already opened with a different schema mode.
I am developing on iOS simulator.
- I've tried to delete app
- Tried to add deleteRealmIfMigrationNeeded
- Deleted this file manually
- Launched another clean simulator
Nothing helped. Only if I roll back schema changes.
How can I fix that? Really got stuck with it.
Stacktrace & log output
No response
Can you reproduce the bug?
Always
Reproduction Steps
No response
Version
12.11.1
What services are you using?
Local Database only
Are you using encryption?
No
Platform OS and version(s)
iOS 17.5 Simulator
Build environment
No response
Cocoapods version
1.15.2