RevenueCat / RevenueCat/react-native-purchases
Purchase Package Error in React Native
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 1.2k
- Forks
- 117
- Avg merge
- 14h 40m
- Merged PRs (30d)
- 40
Description
When attempting to make a purchase using RevenueCat's purchasePackage method, the app throws a "Malformed calls from JS" error with a TypeError indicating properties are not configurable.
Environment
- React Native version: 0.74.5
- RevenueCat SDK version: 8.2.4, 8.2.5 also show this error
- Expo version (if applicable): ~51.0.38
- Platform: iOS
- Device: iPhone 14 Pro and iOS Simulator
- OS version: iOS 17.1.1
Steps to Reproduce
- Select a package for purchase
- Call
Purchases.purchasePackage(package) - Error occurs during the purchase process
Code example
typescript
try {
const purchaseResult = await RevenueCat.purchasePackage(selectedPackage);
return purchaseResult;
} catch (error) {
console.log("Error during purchase:", error);
throw error;
}
Error Log
iOS Bundled 277ms node_modules/expo-router/entry.js (1 module)
ERROR Error: Exception in HostFunction: Malformed calls from JS: field sizes are different.
[[9,77,77,79,79,56],[7,0,1,1,1,3],[[500,100,1730706566431,false],[500],["{\"type\":\"log\",\"level\":\"error\",\"mode\":\"BRIDGE\",\"data\":[\"Failed to purchase package:\",\"[TypeError: property is not configurable]\"]}",1],["{\"type\":\"log\",\"level\":\"log\",\"mode\":\"BRIDGE\",\"data\":[\"Error during purchase:\",\"[TypeError: property is not configurable]\"]}",1],[2967,"RCTRawText",1,{"text":""}]],2569]
This error is located at:
in RCTText (created by Text)
in Text (created by Icon)
in Icon (created by Icon)
in Icon
in NativeWind.Icon
in NativeWind.NoName
in Unknown (created by MenuItem)
in RCTView (created by View)
in View
in NativeWind.View
in NativeWind.NoName
in Unknown (created by MenuItem)
in RCTView (created by View)
in View
in NativeWind.View
in NativeWind.NoName
in Unknown (created by SlotClone)
in SlotClone (created by Slot)
in Slot
in ExpoRouterLink (created by MenuItem)
in RCTView (created by View)
in View (created by Pressable)
in Pressable (created by Pressable)
in MenuItem
in RCTView (created by View)
in View
in NativeWind.View
in RCTView (created by View)
in View
in NativeWind.View
in NativeWind.NoName
in Unknown
in RCTView (created by View)
in View
in NativeWind.View
in NativeWind.NoName
in Unknown
in RCTScrollContentView (created by ScrollView)
in RCTScrollView (created by ScrollView)
in ScrollView (created by ScrollView)
in ScrollView
in NativeWind.ScrollView
in NativeWind.NoName
in Unknown
in RCTView (created by View)
in View
in NativeWind.View
in NativeWind.NoName
in Unknown
in Unknown
in Unknown (created by Route(profile))
in Suspense (created by Route(profile))
in Route (created by Route(profile))
in Route(profile) (created by SceneView)
in StaticContainer
in EnsureSingleNavigator (created by SceneView)
in SceneView (created by SceneView)
in RCTView (created by View)
in View (created by DebugContainer)
in RCTView (created by View)
in View (created by AppContainer)
in RCTView (created by View)
in View (created by AppContainer)
in AppContainer (created by DebugContainer)
in DebugContainer (created by MaybeNestedStack)
in MaybeNestedStack (created by SceneView)
in RCTView (created by View)
in View (created by SceneView)
in RNSModalScreen (created by Animated(Anonymous))
in Animated(Anonymous) (created by InnerScreen)
in Suspender (created by Freeze)
in Suspense (created by Freeze)
in Freeze (created by DelayedFreeze)
in DelayedFreeze (created by InnerScreen)
in InnerScreen (created by Screen)
in Screen (created by SceneView)
in SceneView (created by NativeStackViewInner)
- I have updated Purchases SDK to the latest version
- I have read the Contribution Guidelines
- I have searched the Community
- I have read docs.revenuecat.com
- I have searched for existing Github issues
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 by reproducing the failure at the Purchases.purchasePackage entry point on the listed React Native, RevenueCat, Expo, and iOS versions. Trace the purchase call through the React Native bridge and verify that the purchase completes without the “Malformed calls from JS” or “property is not configurable” errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, react-native, typescript
- Domain
- mobile, payments
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100