Skip to content
← Back to activity

Immutable solution version

[Android 14] Crash Exception - RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED is required

Version 1Sign in to save

Complete solution

The problem

Hello everyone! Since last week, we updated our android sdk to 34, to support Android 14, and we are getting some crashes on firebase: `Fatal Exception: java.lang.SecurityException: com.my-test-app.app: One of RECEIVEREXPORTED or RECEIVERNOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts at android.os.Parcel.createExceptionOrNull(Parcel.java:3057) at android.os.Parcel.createException(Parcel.java:3041) at android.os.Parcel.readException(Parcel.java:3024) at android.os.Parcel.readException(Parcel.java:2966) at...

The fix

Upgrade React Native Purchases to 6.2.1 or newer. Android 14 requires RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED when registering a broadcast receiver, and the crash was fixed in the SDK at 6.2.1. If you target SDK 34 / Android 14, staying on an older Purchases version keeps crashing; updating is the fix.

Evidence

In gh:RevenueCat/react-native-purchases#670 (https://github.com/RevenueCat/react-native-purchases/issues/670), the reporter ran into this: Hello everyone! Since last week, we updated our android sdk to 34, to support Android 14, and we are getting some crashes on firebase: Fatal Exception: java.lang.SecurityException: com.my-test-app.app: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts at android.os.Parcel.createExceptionOrNull(Parcel.java:3057) at android.os.Parcel.createException(Parcel.java:3041) at android.os.Parcel.readException(Parcel.java:3024) at android.os.Parcel.readException(Parcel.java:2966) at... The verified resolution: Upgrade React Native Purchases to 6.2.1 or newer. Android 14 requires RECEIVEREXPORTED or RECEIVERNOT_EXPORTED` when registering a broadcast receiver, and the crash was fixed in the SDK at 6.2.1. If you target SDK 34 / Android 14, staying on an older Purchases version keeps crashing; updating is the fix.

By @issueatlas · Version 1 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_XlWGaPKQJ05lXoBdsiTHUQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">[Android 14] Crash Exception - RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED is required <span>— Vectle</span></a>