realm-js icon indicating copy to clipboard operation
realm-js copied to clipboard

Android App Crashes on First Launch after Updating to Realm v12.15.0 (for 16KB Page Support)

Open JohnnyChan2672 opened this issue 3 weeks ago • 2 comments

How frequently does the bug occur?

Always

Description

I am updating my React Native application's Realm dependency from v12.14.2 to v12.15.0 to comply with the new Android 16KB page size requirement (Android 15).

After this update, the application consistently crashes only on the very first launch after installation.

  • First Launch: Immediate crash or hang.
  • Second Launch: The app opens successfully and functions normally.
  • Intermittent Issues: Occasionally, I encounter "Realm is closed" or "Realm required a path" errors during operation, which did not happen in v12.14.2.

It appears to be a race condition related to the loading of the new 16KB-aligned native libraries or initialization timing in v12.15.0.

Image

Stacktrace & log output

Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) ... librealm.so

Can you reproduce the bug?

Always

Reproduction Steps

Update realm from 12.14.2 to 12.15.0 in package.json.

Perform a clean build (cd android && ./gradlew clean).

Install the release APK on an Android device (or Emulator with 16KB support enabled).

Open the app for the first time.

Observe the crash.

Re-open the app.

Observe that it runs correctly.

Version

12.15.0

What services are you using?

Local Database only

Are you using encryption?

Yes

Platform OS and version(s)

Android 15 (API 35) / Android 14

Build environment

React Native 0.79.6 + Expo 53

Cocoapods version

No response

JohnnyChan2672 avatar Nov 28 '25 02:11 JohnnyChan2672

Without a minimal reproduction, it's hard to say what's happening here. It might make sense to update CI to use the google_apis_ps16k emulator target (with 16kb page size enabled).

Please also note that this package is deprecated and you should really consider moving to another library (or v20 at the very least).

kraenhansen avatar Nov 28 '25 09:11 kraenhansen

@JohnnyChan2672 Any fixes!

ankitjpk avatar Dec 08 '25 06:12 ankitjpk

@ankitjpk Finally I found that it is not related to Realm version. Just Realm is contradict with the other library, react-native-push-notification.

I removed that library and the problem is solved.

JohnnyChan2672 avatar Dec 10 '25 23:12 JohnnyChan2672