Skip to content

React Native 0.81.1 android error "Nitro runtime not installed yet" #3120

@jhkette

Description

@jhkette

Hi,
Looking for help
I am using:
"react-native": "0.81.1",
"react-native-iap": "^14.5.0",
"react-native-nitro-modules": "^0.31.10"

node: 20.19.6
and Java 17

I am simply installing the react-native-iap and react native nitro modules and using the setup in the recent documentation. This works totally fine in ios. However, it isn't working on android (both emulator and physical device) and i cannot connect to the play store to get purchases/subscriptions. I'm getting this specific error.

[react-native-iap]: PurchaseError
Nitro runtime not installed yet. Ensure react-native-nitro-modules is initialized before calling IAP.

I initialise react-native-iap as in the docs very much like this:

const {connected, products, subscriptions, fetchProducts, requestPurchase} =
useIAP({
onPurchaseSuccess: (purchase) => {
console.log('Purchase successful:', purchase);
handleSuccessfulPurchase(purchase);
},
onPurchaseError: (error) => {
console.error('Purchase failed:', error);
handlePurchaseError(error);
},
});

Then i fetch products. I have left the native android files - i.e, I have briefly tried to initalise react-native-nitro-modules in the MainApplication.kt file - but removed it - as it wasn't helping. I also tried importing react-native-nitro-modules in the index.js file of my react-native project - but removed as it didn't help. Is there something I am doing wrong? Help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency file🙏 help wantedExtra attention is needed🤖 androidRelated to android

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions