Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to compile #769

Closed
Elijah23Johnson opened this issue Oct 7, 2019 · 7 comments
Closed

Failure to compile #769

Elijah23Johnson opened this issue Oct 7, 2019 · 7 comments
Labels
🐛 bug Something isn't working

Comments

@Elijah23Johnson
Copy link

Version of react-native-iap

"react-native-iap": "^4.0.1",

Version of react-native

60

Platforms you faced the error (IOS or Android or both?)

Android

Expected behavior

Android studios project at least builds

Actual behavior

Crash on compile

Tested environment (Emulator? Real Device?)

Real Device

Steps to reproduce the behavior

Install library sync gradle build app → Crash

image

image

image

@Elijah23Johnson
Copy link
Author

Elijah23Johnson commented Oct 7, 2019

Line 113 has a problem with the promise

image

If i comment out that line -- and try to run app compiles but complains when attempt a purchase.
Saying the RNIapModule.buyItemByType got 6 arguments, expected 8

6 arguments
image

7 arguments
image

@hyochan hyochan closed this as completed in 4f6b0ad Oct 7, 2019
@hyochan hyochan added the 🐛 bug Something isn't working label Oct 7, 2019
@hyochan
Copy link
Owner

hyochan commented Oct 7, 2019

Could you try 4.0.2 and come back? Sorry that my debugging circumstance isn't good today since I don't have my main computer (it's being fixed these days).

@Elijah23Johnson
Copy link
Author

4.0.2 seems like its going to work I am going to publish app now and see if it works in a live environment. Locally it is running fine. Thanks!

@Elijah23Johnson
Copy link
Author

Quick Question:

Screenshot_20191007-090945

wIll this resolve itself once app is published?

If not what do i need to do before I initiate a purchase?

@meanking
Copy link

meanking commented Oct 11, 2019

I got same error.

I am using react-native-iap 4.0.4

And I updated according to modified version of it.
By the way I got this error.
How can I fix this problem?

Screenshot_20191011-072309_DazzledDate

@meanking
Copy link

When I load the page with react-native-iap.

At first I got this error

Screenshot_20191011-064505_DazzledDate

How can I fix it?

@Elijah23Johnson
Copy link
Author

Upgrade your library to the latest version 4.0.3 maybe higher by now → is working for me.. In your componentDidMount or before you click buy initiate items

Like so
const itemSkus = Platform.select({
ios: [
"propducts_sku"
],
android: [
"propducts_sku"
]
});
RNIap.getProducts(itemSkus).then((result) =>
console.log('IAPInitialize', result)
);

everything should be fine after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants