Help for Realm® apps / Build errors

Realm release builds with R8 crash at start: SSLHelper

Debug works. The release build of your Android app crashes as soon as it opens. If you use Realm and R8 is on, the cause can be one class that R8 removed.

Updated 9 November 2026.

The error

In logcat, look for:

ClassNotFoundException: io.realm.react.util.SSLHelper

Older reports show the same class in other errors, for example #2658 (2019):

java.lang.UnsatisfiedLinkError: couldn't find DSO to load: librealmreact.so caused by: Didn't find class "io.realm.react.util.SSLHelper" on path: DexPathList

When it happens

  • Android release builds with R8 on (minifyEnabled, or enableProguardInReleaseBuilds in React Native apps) and no keep rule for Realm.
  • Expo SDK 58 turns R8 on by default in release builds (Expo's SDK 58 upgrade guide, 21 October 2026). An app that moves to Expo SDK 58 can crash in production while debug builds work.
  • We hit it on 6 November 2026 while testing afterdb with Expo SDK 58. Realm users reported it before, in #2658 and #6074.

Why

Realm's native code looks up io.realm.react.util.SSLHelper by name when it loads (FindClass in JNI_OnLoad). No Java code uses that class, and the realm Android library ships no keep rule. R8 sees an unused class and removes it, and the app crashes at start.

Fix with afterdb

afterdb ships the keep rule in the package (consumer-rules.pro), so you add nothing to your app.

In package.json, point the two Realm packages to afterdb:

"realm": "npm:@pomwik/afterdb@20.3.0",
"@realm/react": "npm:@pomwik/afterdb-react@0.20.1"

Then reinstall, run pod install on iOS, and rebuild. For Expo dev builds, run npx expo prebuild --clean. Your code keeps import Realm from "realm". If you do not use @realm/react, the first line is enough.

afterdb is an independent open-source fork of the realm-js SDK v20 (Apache-2.0) that we maintain, for apps on realm 20.x without Device Sync. It is not an official Realm release. Code on GitHub, package on npm.

Tested locally: release builds with R8 on, for our bare React Native example and for Expo SDK 58 with no rule in the app. The app runs on Android emulators. Not tested yet: real devices.

Without afterdb

Add this line to android/app/proguard-rules.pro:

-keep class io.realm.react.** { *; }

A Realm maintainer suggested a keep rule for io.realm.react.** in #6074 (2023), and three users confirmed it worked. With Expo, the android folder is generated, so add the rule through the android.extraProguardRules option of expo-build-properties, or a config plugin. We have not tested the Expo route.

Need help? Send your versions and the full error for a free 15-minute check. We reply within 12 hours.