presentCustomerCenter never resolves when it can't present
Maintainers usually reply within 1 day
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- ios, react-native, swift, typescript
- Domain
- mobile-dev
Research direction
Start with CustomerCenterProxy.present and PaywallProxy in the native iOS UI module, where the paywall walks up presentedViewController and the customer center does not. Compare the two, then check how the presentation promise is settled on failure. Done means the promise rejects when UIKit refuses the presentation, and presentCustomerCenter() opens from a formSheet like presentPaywall() does.
Written by the indexing model from the issue text.
Description
Hey! I hit the same thing as #1201 in my app. Using CustomerCenterView in a modal works, so I switched to that. Two things still seem worth fixing though.
When UIKit refuses the presentation, the promise from presentCustomerCenter() never settles. UIKit logs "Attempt to present CustomerCenterUIViewController on ScreenOrientationViewController which is already presenting RNSScreen" and that's it. My app awaited that promise to undo a portrait lock, so the lock stayed until a restart. Rejecting the promise when the presentation fails would make this easy to catch.
The paywall already handles this. PaywallProxy walks up presentedViewController before it presents, so presentPaywall() opens fine from a formSheet. CustomerCenterProxy.present uses the key window's root view controller as is. The same walk there would make both APIs behave the same.
Steps
- Open a screen as a formSheet (react-native-screens or expo-router)
- Call
await RevenueCatUI.presentCustomerCenter()from it - Nothing shows and the promise never resolves
Versions
react-native-purchases-ui 10.16.0, PurchasesHybridCommonUI 19.17.0, RevenueCatUI 5.99.0, Expo SDK 58, iOS 27 simulator
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 124
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 69
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing 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.
More from RevenueCat/react-native-purchases
-
`entitlementVerificationMode` defaults to `DISABLED` and overrides the native default (`INFORMATIONAL`)Possibly taken @AlvaroBrey claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
RevenueCat/react-native-purchases#2127 ·
Maintainers usually reply within 1 day
-
AdMob: show-time placement override persists after the ad is loaded againPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
RevenueCat/react-native-purchases#2104 ·
Maintainers usually reply within 1 day
-
TypeScript helpers (`__awaiter`, `__generator`, `__createBinding`, …) are inlined in every file of `dist`Possibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
RevenueCat/react-native-purchases#2079 · 1 comment ·
Maintainers usually reply within 1 day
-
presentCustomerCenter throws in preview API mode when callbacks are passedPossibly taken @RaphaelFakhri claimed this 20 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
RevenueCat/react-native-purchases#2050 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
RevenueCat/react-native-purchases#1912 ·
Maintainers usually reply within 1 day
All issues in RevenueCat/react-native-purchases
Similar issues
-
Bug: Cloudflare Pages static _redirects identity rule causes RSC Flight to reload as HTMLPossibly taken @Donvero claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Mantitup-Org/vista#210 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
simstudioai/sim#9831 ·
Maintainers usually reply within 1 day
-
status: waiting for maintainer
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
mui/material-ui#49751 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
diplodoc-platform/transform#1184 ·
Maintainers usually reply within 1 day