Uploaded image for project: 'Realm .NET SDK'
  1. Realm .NET SDK
  2. RNET-112

Realm at path X already opened with different schema version.

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None

      <!--- Questions: If you have questions about how to use Realm, please ask on -->
      <!--- StackOverflow: http://stackoverflow.com/questions/ask?tags=realm -->
      <!--- We monitor the realm tag. -->

      <!--- Feature Request: Just fill in the first two sections below. -->

      <!--- Bugs: To help you as fast as possible with an issue please describe your issue -->
      <!--- and the steps you have taken to reproduce it in as much detail as possible. -->

      <Unable to render embedded object: File (--- Thanks for helping us help you) not found. -->

      Goals

      Migrate my realm db by upping the schemaversion.
      <!--- What are you trying to achieve? -->

      Expected Results

      after updating the schemaversion it shouldn't have any issues migrating the db (even though with loss of data, and that's fine)

      Also I saw this was fixed recently in the javascript version of the SDK:
      https://github.com/realm/realm-js/issues/1478

      Not sure if its related, but its the same error.

      <!--- What did you expect to happen? -->
      Because I bumped the default schemaversion I expected no migration error.

      Actual Results

      So currently on iOS some of my users are experiencing issues after an update of the iOS app: Realms.Exceptions.RealmMismatchedConfigException: Realm at path '/var/mobile/Containers/Data/Application/35A6640F-EDDC-49C7-AB18-59F006229F2F/Documents/default.realm' already opened with different schema version.

      What I am currently doing is the following on FinishedLaunching (first line) :

      RealmConfiguration.DefaultConfiguration = new RealmConfiguration()
      {
         SchemaVersion = App.SchemaVersion // bump up because of update
      };
      

      <!--- What happened instead? -->
      <!--- e.g. the stack trace of a crash -->
      Stacktrace

      Realms.NativeException.ThrowIfNecessary(Func<T, TResult> overrider)
      Realms.SharedRealmHandle.Open(Configuration configuration, RealmSchema schema, byte[] encryptionKey)
      Realms.RealmConfiguration.CreateRealm(RealmSchema schema)
      Realms.Realm.GetInstance(RealmConfigurationBase config, RealmSchema schema)
      Realms.Realm.GetInstance(RealmConfigurationBase config)
      
      

      Steps to Reproduce

      Not sure, as what I only have is the error displayed in hockeyapp, I cannot reproduce myself however it has been happening 96 times.

      <!--- What are steps we can follow to reproduce this issue? -->

      Version of Realm and Tooling

      • Realm Object Server Version: ?
      • Flavor:
        • [X ] Developer
        • [ ] Professional
        • [ ] Enterprise
      • Client SDK Version: 1.6.0
      • Client OS & Version: iOS 10.2 -> 11.1.2

      Android doesn't seem affected (as I cannot see any errors for Android).

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: