RevenueCat / RevenueCat/react-native-purchases
[Android] IllegalStateException: Unable to load font from rc_paywall_fonts cache (FontWeight=600)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 117
- Avg merge
- 14h 40m
- Merged PRs (30d)
- 40
Description
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>.otfbe 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Android paywall UI font-loading path and the rc_paywall_fonts cache described in the report; use the Compose measure-time stack trace and reproduction environment to investigate. Done means an unreadable downloaded font no longer causes an uncaught fatal crash, with either safe fallback or redownload behavior verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, react-native
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100