Uploaded image for project: 'Realm JavaScript SDK'
  1. Realm JavaScript SDK
  2. RJS-1546

Crash, Error: Unable to open a realm at path '/data/user/0/xxx/files/geo.realm': Realm file initial open failed: Invalid mnemonic.

      How frequently does the bug occur?

      Sometimes

      Description

      Crash, Error: Unable to open a realm at path '/data/user/0/xxx/files/geo.realm': Realm file initial open failed: Invalid mnemonic.

      In our React Native mobile app, this error has started to appear for 10-15% of our users since our last release, yet we changed nothing to do with Realm in that release. Those users who get it, seem to get it repeatedly (locked out). The pattern is that a new install works fine, then when the app is launched subsequently, they get crashes on startup over and over, when Realm tries to read the file.

      As its a small proportion of users, I have been unable to duplicate the error locally. So I released a new version that caught any exceptions from reading the realm file at startup and responded by deleting the file and creating the DB anew - downside is losing all the cached information, upside is of course they can still use the app. HOWEVER, I am finding that this hasnt fixed the problem.

      Our Realm version 10.8.0 and has been for a long time.

      Our encrypt key is static hardcoded.

      Any insights appreciated. Is this familiar to anyone, or any suggestions at all really.

      cheers

      Stacktrace & log output

      Unable to find source-code formatter for language: shell. 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
      Crash, Error: Unable to open a realm at path '/data/user/0/io.geoworkforce/files/geo.realm': Realm file initial open failed: Invalid mnemonic. top_ref[0]: 411F60114140B39E, top_ref[1]: 3A2272657375227B, mnemonic: 22 73 65 72, fmt[0]: 118, fmt[1]: 105, flags: 65 Path:Exception backtrace: <backtrace not supported on this platform> Path: /data/user/0/io.geoworkforce/files/geo.realm Exception backtrace: <backtrace not supported on this platform>. This error is located at: in f in RCTView in Unknown in RCTView in Unknown in C, stack: schemaVersion@-1 openDB@887:2067 openDB@1014:606 value@423:3176 f@423:1639 lr@95:31853 bl@95:51882 ti@95:78509 ei@95:78437 Za@95:78202 qa@95:75364 qa@-1 <unknown>@95:26064 unstable_runWithPriority@192:3806 Ct@95:26011 Pt@95:25946 Oa@95:72858 Pi@95:88019 render@95:94758 exports@354:626 run@346:740 runApplication@346:1775 value@49:3492 <unknown>@49:747 value@49:2538 value@49:719 value@-1
      

      Can you reproduce the bug?

      Not yet

      Reproduction Steps

      No response

      Version

      10.8.0

      What SDK flavour are you using?

      Local Database only

      Are you using encryption?

      Yes, using encryption

      Platform OS and version(s)

      ios and android all kinds

      Build environment

      Which debugger for React Native: ..

      Cocoapods version

      No response

            Assignee:
            franck.franck@mongodb.com Franck Franck (Inactive)
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: