Description
We're seeing fatal IllegalStateException: Unable to load font crashes on Android originating from RevenueCat's paywall UI. The error fires during Compose layout/measure when loading a downloaded OTF font from RC's cache directory.
The exception is uncaught and the app terminates. We've observed this in production via Sentry on react-native-purchases@9.15.1 / react-native-purchases-ui@9.15.1.
Stack trace (ProGuard-mapped, frames not symbolicated)
IllegalStateException: Unable to load font Font(file=/data/user/0/<app>/cache/rc_paywall_fonts/8ca61878210e82fbc279cb412ab67adb.otf, weight=FontWeight(weight=600), style=Normal)
Caused by: IllegalStateException: Could not load font
at c (SourceFile:81)
at h (SourceFile:8)
...
at measure-3p2s80s (SourceFile:9)
at u0 (SourceFile:41)
at measure-3p2s80s (SourceFile:1)
The crash happens at measure time within Compose (measure-3p2s80s), so the paywall is mid-layout when the font fails to load.
Environment
| Field |
Value |
react-native-purchases |
9.15.1 |
react-native-purchases-ui |
9.15.1 |
react-native |
0.81.5 |
| Device |
Samsung SM-S721U (Galaxy S24) |
| OS |
Android 16 (BP2A.250605.031.A3.S721USQSBCZD1) |
| Distribution |
Play Store |
| Handled |
no (fatal) |
What we expect
A downloaded paywall font that can't be loaded shouldn't take the app down. Either:
- The font load should be wrapped in a try/catch and fall back to the system font, or
- If the cached font file is corrupt, the SDK should redownload it before raising.
Questions
- Is this a known issue with a specific paywall template / font weight (we see weight=600)?
- Could the cached file at
cache/rc_paywall_fonts/<hash>.otf be partially written / corrupt under low-storage or interrupted-download conditions?
- Any guidance for users currently on 9.15.1 — clear cache, downgrade, etc.?
Happy to provide more Sentry breadcrumbs / exact paywall template ID if useful.
Description
We're seeing fatal
IllegalStateException: Unable to load fontcrashes on Android originating from RevenueCat's paywall UI. The error fires during Compose layout/measure when loading a downloaded OTF font from RC's cache directory.The exception is uncaught and the app terminates. We've observed this in production via Sentry on
react-native-purchases@9.15.1/react-native-purchases-ui@9.15.1.Stack trace (ProGuard-mapped, frames not symbolicated)
The crash happens at measure time within Compose (
measure-3p2s80s), so the paywall is mid-layout when the font fails to load.Environment
react-native-purchasesreact-native-purchases-uireact-nativeWhat we expect
A downloaded paywall font that can't be loaded shouldn't take the app down. Either:
Questions
cache/rc_paywall_fonts/<hash>.otfbe partially written / corrupt under low-storage or interrupted-download conditions?Happy to provide more Sentry breadcrumbs / exact paywall template ID if useful.