Skip to main content

I checked some other related issues (this, this) but seems different.  I just made an SDK update and am running into issues:

SDK and Versions:

  • "react-native": "0.76.7",
  • "react-native-purchases": "^8.5.3",

    "react-native-purchases-ui": "^8.5.3",

  • "expo": "~52.0.32",

  • Android Studio Ladybug Feature Drop | 2024.2.2
    Build #AI-242.23726.103.2422.12816248, built on December 17, 2024
    Runtime version: 21.0.4+-12422083-b607.1 aarch64
    VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
    Toolkit: sun.lwawt.macosx.LWCToolkit
    macOS 15.3
    GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
    Memory: 2048M
    Cores: 12
    Metal Rendering is ON
    Registry:
      ide.experimental.ui=true
      i18n.locale=
  • Android Device: Samsung Galaxy S22, running Android 14

 

I have had the Paywall running for some time on Expo SDK51 as described in your docs with the custom font family:

<RevenueCatUI.Paywall
onDismiss={onPressDown}
onPurchaseCompleted={handleContinue}
onPurchaseError={handleError}
onRestoreCompleted={restoreComplete}
options={{
fontFamily: 'Inter_400Regular',
}}
/>


However, now, when I try to display on Android with the new version, the app crashes.  From the logs:

 E  Error while updating property 'options' of a view managed by: Paywall

null

null
com.facebook.react.bridge.JSApplicationIllegalArgumentException: Error while updating property 'options' of a view managed by: Paywall
at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:101)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:136)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:56)
at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:93)
at com.facebook.react.uimanager.ViewManager.createViewInstance(ViewManager.java:195)
at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:122)
at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:292)
at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:171)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:1076)
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1047)
at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.kt:22)
at com.facebook.react.modules.core.ReactChoreographer.frameCallback$lambda$1(ReactChoreographer.kt:60)
at com.facebook.react.modules.core.ReactChoreographer.$r8$lambda$nSkFhrr5T7rop_XKwzlLov4NLLw(Unknown Source:0)
at com.facebook.react.modules.core.ReactChoreographer$$ExternalSyntheticLambda0.doFrame(D8$$SyntheticClass:0)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1648)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1659)
at android.view.Choreographer.doCallbacks(Choreographer.java:1129)
at android.view.Choreographer.doFrame(Choreographer.java:1045)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1622)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8893)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:93)
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:136) 
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:56) 
at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:93) 
at com.facebook.react.uimanager.ViewManager.createViewInstance(ViewManager.java:195) 
at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:122) 
at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:292) 
at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:171) 
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:1076) 
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1047) 
at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.kt:22) 
at com.facebook.react.modules.core.ReactChoreographer.frameCallback$lambda$1(ReactChoreographer.kt:60) 
at com.facebook.react.modules.core.ReactChoreographer.$r8$lambda$nSkFhrr5T7rop_XKwzlLov4NLLw(Unknown Source:0) 
at com.facebook.react.modules.core.ReactChoreographer$$ExternalSyntheticLambda0.doFrame(D8$$SyntheticClass:0) 
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1648) 
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1659) 
at android.view.Choreographer.doCallbacks(Choreographer.java:1129) 
at android.view.Choreographer.doFrame(Choreographer.java:1045) 
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1622) 
at android.os.Handler.handleCallback(Handler.java:958) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loopOnce(Looper.java:230) 
at android.os.Looper.loop(Looper.java:319) 
at android.app.ActivityThread.main(ActivityThread.java:8893) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103) 
Caused by: java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:207)
at com.facebook.react.bridge.DynamicFromMap.asMap(DynamicFromMap.java:100)
at com.revenuecat.purchases.react.ui.BasePaywallViewManager.setOfferingIdProp(BasePaywallViewManager.kt:66)
at com.revenuecat.purchases.react.ui.BasePaywallViewManager.setOptions(BasePaywallViewManager.kt:58)
at java.lang.reflect.Method.invoke(Native Method) 
at com.facebook.react.uimanager.ViewManagersPropertyCache$PropSetter.updateViewProp(ViewManagersPropertyCache.java:93) 
at com.facebook.react.uimanager.ViewManagerPropertyUpdater$FallbackViewManagerSetter.setProperty(ViewManagerPropertyUpdater.java:136) 
at com.facebook.react.uimanager.ViewManagerPropertyUpdater.updateProps(ViewManagerPropertyUpdater.java:56) 
at com.facebook.react.uimanager.ViewManager.updateProperties(ViewManager.java:93) 
at com.facebook.react.uimanager.ViewManager.createViewInstance(ViewManager.java:195) 
at com.facebook.react.uimanager.ViewManager.createView(ViewManager.java:122) 
at com.facebook.react.uimanager.NativeViewHierarchyManager.createView(NativeViewHierarchyManager.java:292) 
at com.facebook.react.uimanager.UIViewOperationQueue$CreateViewOperation.execute(UIViewOperationQueue.java:171) 
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.dispatchPendingNonBatchedOperations(UIViewOperationQueue.java:1076) 
at com.facebook.react.uimanager.UIViewOperationQueue$DispatchUIFrameCallback.doFrameGuarded(UIViewOperationQueue.java:1047) 
at com.facebook.react.uimanager.GuardedFrameCallback.doFrame(GuardedFrameCallback.kt:22) 
at com.facebook.react.modules.core.ReactChoreographer.frameCallback$lambda$1(ReactChoreographer.kt:60) 
at com.facebook.react.modules.core.ReactChoreographer.$r8$lambda$nSkFhrr5T7rop_XKwzlLov4NLLw(Unknown Source:0) 
at com.facebook.react.modules.core.ReactChoreographer$$ExternalSyntheticLambda0.doFrame(D8$$SyntheticClass:0) 
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1648) 
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1659) 
at android.view.Choreographer.doCallbacks(Choreographer.java:1129) 
at android.view.Choreographer.doFrame(Choreographer.java:1045) 
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1622) 
at android.os.Handler.handleCallback(Handler.java:958) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loopOnce(Looper.java:230) 
at android.os.Looper.loop(Looper.java:319) 
at android.app.ActivityThread.main(ActivityThread.java:8893) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103) 

on iOS, all works fine.

 

if I remove the `options` then the Paywall loads on Android, so at least there’s a workaround.

Hi, can you please try putting the options first and let me know if it works?

<RevenueCatUI.Paywall
options={{
fontFamily: 'Inter_400Regular',
}}
onDismiss={onPressDown}
onPurchaseCompleted={handleContinue}
onPurchaseError={handleError}
onRestoreCompleted={restoreComplete}
/>

 


I’m getting the same error after upgrading to Expo SDK52.

"react-native-purchases": "^8.6.1",

"react-native-purchases-ui": "^8.6.1",
"expo": "^52.0.0",

"react-native": "0.76.7",

 

 

My options are first:

<RevenueCatUI.Paywall

options={{

closeButton: true,

displayCloseButton: true,

offering: offeringToDisplay,

}}

Works fine on iOS.


Same error here on Android react-native

"react-native-purchases": "^8.7.0","react-native-purchases-ui": "^8.7.0",
    <View style={{ flex: 1 }}>
<RevenueCatUI.Paywall
options={{
displayCloseButton: true,
fontFamily: null, // Replace with your custom font family if needed
}}
onDismiss={() => {
navigate('/map', {replace: false, state: {fromTab: true}});
}}
/>
</View>

 


Hi ​@Supergood ​@womo the team is looking into this and I will update here with a solution.


Hi ​@Supergood ​@womo to confirm when using the options for the fontFamily you made sure to add the custom font family in your react native app and made sure to run npx react-native-asset so it's added to the native components? Also the font types must be either .ttf or .otf
Can you also make sure to be on our most recent SDK version 8.8.1: https://github.com/RevenueCat/react-native-purchases/releases/tag/8.8.1


Reply