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

Decryption crash at realm version 10.12.0

      How frequently does the bug occur?

      Sometimes

      Description

      After an update from RealmJS 10.0.1 to 10.12.0 several crashes occurred at random places. Could find similar stack traces in issues reported in Realm Swift (https://github.com/realm/realm-swift/issues/7629) and Realm Java (https://github.com/realm/realm-java/issues/7652), which seem pretty recent.

      Since the crashes occur only sometimes and the stacktraces are pretty abstract it makes it extremely hard to debug.
      Is it possible that the update from 10.0.1 to 10.12.0 caused troubles with data migration?

      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 1:
      
      uncaught exception in notifier thread: N5realm5_impl17TransactLogParser14BadTransactLogE: Bad transaction log
      2022-03-17 13:37:44.833660+0100 KarifyProApp[52407:2327307] uncaught exception in notifier thread: N5realm5_impl17TransactLogParser14BadTransactLogE: Bad transaction log
      libc++abi: terminating with uncaught exception of type realm::_impl::TransactLogParser::BadTransactLog: Bad transaction log
      dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/usr/lib/libMTLCapture.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
      terminating with uncaught exception of type realm::_impl::TransactLogParser::BadTransactLog: Bad transaction log
      
      
      
      Crash 2 (most common):
      
      
      2022-03-17 14:42:03.364205+0100 KarifyProApp[53120:2353881] [javascript] write objects to realm, lock writes...
      libc++abi: terminating with uncaught exception of type realm::util::DecryptionFailed: Decryption failed
      Exception backtrace:
      0   KarifyProApp                        0x0000000101bcbad8 _ZN5realm4util16DecryptionFailedC2Ev + 96
      1   KarifyProApp                        0x0000000101bb51f4 _ZN5realm4util10AESCryptor4readEixPcm + 440
      2   KarifyProApp                        0x0000000101bb5d80 _ZN5realm4util20EncryptedFileMapping12refresh_pageEm + 108
      3   KarifyProApp                        0x0000000101bb6834 _ZN5realm4util20EncryptedFileMapping12read_barrierEPKvmPFmPKcE + 368
      4   KarifyProApp                        0x0000000101728d44 _ZN5realm4util26do_encryption_read_barrierEPKvmPFmPKcEPNS0_20EncryptedFileMappingE + 84
      5   KarifyProApp                        0x0000000101a38670 _ZNK5realm9Allocator23translate_less_criticalEPNS0_14RefTranslationEm + 448
      6   KarifyProApp                        0x0000000101728b50 _ZN5realm5Array13init_from_refEm + 192
      7   KarifyProApp                        0x0000000101a4c620 _ZNK5realm13ArrayBigBlobs6get_atEmRm + 108
      8   KarifyProApp                        0x0000000101a70684 _ZZN5realm4util11FunctionRefIFvPNS_13BPlusTreeNodeEmEEC1IRZNKS_12BinaryColumn6get_atEmRmE3$_0EEOT_ENUlPvS3_mE_8__invokeESD_S3_m + 36
      9   KarifyProApp                        0x0000000101a70630 _ZNK5realm12BinaryColumn6get_atEmRm + 132
      10  KarifyProApp                        0x00000001017f1d10 _ZN5realm5_impl20ChangesetInputStream10next_blockERPKcS4_ + 96
      11  KarifyProApp                        0x0000000101820620 _ZN5realm5_impl11transaction7advanceERNS_11TransactionERNS0_21TransactionChangeInfoENS_9VersionIDE + 876
      12  KarifyProApp                        0x0000000101812380 _ZN12_GLOBAL__N_121IncrementalChangeInfo16advance_to_finalEN5realm9VersionIDE + 56
      13  KarifyProApp                        0x0000000101811638 _ZN5realm5_impl16RealmCoordinator19run_async_notifiersEv + 3040
      14  KarifyProApp                        0x00000001018109dc _ZN5realm5_impl16RealmCoordinator9on_changeEv + 24
      15  KarifyProApp                        0x00000001017f4104 _ZN5realm5_impl20ExternalCommitHelper6listenEv + 204
      16  KarifyProApp                        0x00000001017f4224 _ZNSt3__1L14__thread_proxyINS_5tupleIJNS_10unique_ptrINS_15__thread_structENS_14default_deleteIS3_EEEEZN5realm5_impl20ExternalCommitHelperC1ERNS8_16RealmCoordinatorEE3$_0EEEEEPvSE_ + 52
      17  libsystem_pthread.dylib             0x000000023d2aa9ac _pthread_start + 148
      18  libsystem_pthread.dylib             0x000000023d2a9e68 thread_start + 8
      dyld4 config: DYLD_LIBRARY_PATH=/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libBacktraceRecording.dylib:/Developer/usr/lib/libMainThreadChecker.dylib:/usr/lib/libMTLCapture.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
      terminating with uncaught exception of type realm::util::DecryptionFailed: Decryption failed
      

      Can you reproduce the bug?

      Not yet

      Reproduction Steps

      No response

      Version

      10.12.0

      What SDK flavour are you using?

      Local Database only

      Are you using encryption?

      Yes, using encryption

      Platform OS and version(s)

      iOS 15.4

      Build environment

      Which debugger for React Native: ..
      Xcode debugger

      Cocoapods version

      1.11.3

            Assignee:
            finn.schiermer-andersen@mongodb.com Finn Andersen
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: