realm / realm-js

Realm is a mobile database: an alternative to SQLite & key-value stores
https://realm.io
Apache License 2.0
5.81k stars 577 forks source link

Crash occurs on Android after codepush.restartApp OTA install/restart #6903

Closed jayshah123 closed 1 month ago

jayshah123 commented 1 month ago

How frequently does the bug occur?

Always

Description

On a release version of the app, When we do a codepush install while the app is already running,

We upgraded from "@realm/react@0.6.2" to "@realm/react@0.10.1". And upgraded from "realm@12.6.2:" to "realm@12.13.1".

we see following crash:

No implementation found for void io.realm.react.RealmReactModule.invalidateCaches() (tried Java_io_realm_react_RealmReactModule_invalidateCaches and Java_io_realm_react_RealmReactModule_invalidateCaches__) - is the library loaded, e.g. System.loadLibrary?

Stacktrace & log output

10-07 10:29:05.928 28635 28705 E AndroidRuntime: java.lang.UnsatisfiedLinkError: No implementation found for void io.realm.react.RealmReactModule.invalidateCaches() (tried Java_io_realm_react_RealmReactModule_invalidateCaches and Java_io_realm_react_RealmReactModule_invalidateCaches__) - is the library loaded, e.g. System.loadLibrary?
10-07 10:29:05.928 28635 28705 E AndroidRuntime:    at io.realm.react.RealmReactModule.invalidateCaches(Native Method)
10-07 10:29:05.928 28635 28705 E AndroidRuntime:    at io.realm.react.RealmReactModule.invalidate(RealmReactModule.java:58)
10-07 10:29:05.928 28635 28705 E AndroidRuntime:    at com.facebook.react.bridge.ModuleHolder.destroy(ModuleHolder.java:109)
10-07 10:29:05.928 28635 28705 E AndroidRuntime:    at com.facebook.react.bridge.NativeModuleRegistry.notifyJSInstanceDestroy(NativeModuleRegistry.java:86)
10-07 10:29:05.928 28635 28705 E AndroidRuntime:    at com.facebook.react.bridge.CatalystInstanceImpl$1.run(CatalystInstanceImpl.java:353)
10-07 10:29:05.928 28635 28705 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:958)
10-07 10:29:05.928 28635 28705 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:99)
10-07 10:29:05.928 28635 28705 E AndroidRuntime:    at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:29)
10-07 10:29:05.928 28635 28705 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:205)
10-07 10:29:05.928 28635 28705 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:294)
10-07 10:29:05.928 28635 28705 E AndroidRuntime:    at com.facebook.react.bridge.queue.MessageQueueThreadImpl$4.run(MessageQueueThreadImpl.java:234)
10-07 10:29:05.928 28635 28705 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:1012)

Can you reproduce the bug?

Always

Reproduction Steps

  1. Have realm initialized.
  2. Get a codepush OTA
  3. Install codepush app update via CodePush.restartApp()
  4. We see a crash.

Version

"@realm/react": "0.10.1", "react": "18.2.0", "react-native": "0.73.9", "realm": "12.13.1",

What services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

Android, all versions

Build environment

"@realm/react": "0.10.1", "react": "18.2.0", "react-native": "0.73.9", "realm": "12.13.1",

Cocoapods version

1.14.3

sync-by-unito[bot] commented 1 month ago

➤ PM Bot commented:

Jira ticket: RJS-2908

jayshah123 commented 1 month ago

Would there be a recommended version to downgrade to? We see 12.7 as the min recommended version as per https://github.com/realm/realm-js/blob/main/CHANGELOG.md#1270-2024-04-17

jayshah123 commented 1 month ago

After downgrading to 12.11.1, issue does not seem to occur.