Closed GLSinthu closed 3 months ago
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out!
I am facing this exact issue on iOS. It is happening when I call Purchases.configure({apiKey:
Hello @GLSinthu @bilal1031
Thanks for reporting this issue. Could you tell us more about what you did to update the library right before the error occurred?
This issue could present itself if the native side of the library is not in sync with the javascript side. We recommend to always run pod install
and recompile the app after updating the npm package.
If you are working across different git branches of your app, where some branches are using version 7 of the SDK whereas others are using version 8. you'll need to make sure you run pod install every time you switch branches to ensure the javascript and the native side of the library remain in sync.
Just for context: version 8 of the library introduces a new parameter to the native configure function that the javascript function passes in. The reason you're seeing this error could be the javascript side has not been updated but the native one was.
@MarkVillacampa, Yes you are correct, version 8.0.0 fixes this issue.
@MarkVillacampa pod native side is in sync, the following is from podfile.lock
- RNPurchases (8.0.0):
- PurchasesHybridCommon (= 13.0.0)
Initializing like so:
await Purchases.configure({
apiKey,
appUserID,
});
Other than the required In-App Purchase Key
, there was no other configuration in the documentation.
Is the Javascript part using v8 of the SDK as well?
The exact error you experienced can happen if you're using v8 on the native side (as you seem to be doing based on the podfile.lock) but v7 on the Javascript side.
This following is from our yarn.lock file:
react-native-purchases@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/react-native-purchases/-/react-native-purchases-8.0.0.tgz#da7c0aac33e8e6346e6b91d8ee9fd81e1ea2cd85"
integrity sha512-GnFqVoYfiugUv0XtPVld365ixoPdM9U4EH9IKJIvJBXcwyKqJ2Uno5ubmNOlNbcAeuR8X7+1V+rQVbAReGdwDA==
dependencies:
"@revenuecat/purchases-typescript-internal" "13.0.0"
You were right @MarkVillacampa, my bundler on was not updating after installing the new version. Marking as closed.
I'm also seeing this issue, but for android only. Currently using package v8.0.0, crashes seem to happen before reaching the metro bundler, so it doesn't seem to be because of a JS/native mis-match.
I have cleared cradle cache and synched the gradle project in android studio. I have re-installed all yarn packages, restarted the metro bundler and cleared the cache, but still getting native android crash.
Updated to the latest version.
Additional context Add any other context about the problem here.