2.4.1 & 2.5.5 (tried both)
0.59.8
Android (so far)
getProducts() works
An unknown or unexpected error has occured. Please try again later.
This error only occurs in a release build on an actual device. The error does NOT occur with a debug build on actual device, or a release build in an emulator.
Both emulator and real device tested, both debug and release builds.
This has been working in production for months, but recently I've upgraded react (16.5.0 to 16.8.3) and react native (0.57.0 to 0.59.8).
Other relevant changes:
I followed this migration recipie: https://docs.expo.io/versions/v33.0.0/expokit/expokit/#upgrading-expokit
android/app/build.gradleandroid.compileSdkVersion 27 => 28android.compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}I think I figured it out.
I guess during the upgrade I inadvertently switched:
compile project(':react-native-iap') to implementation project(':react-native-iap') in my build.gradle. Switching this back seemed to do the trick!
Hopefully this helps someone else :)
Hmmm. Actually now I am getting this error only in a release build on an android device - no issue in android emulators (using the same .apk), and no issue in a debug build on an android device. Very strange...
@gerbus Since version below 3.1 isn't properly supporting androidx which is configured in react-native >0.59, there might be a problem. Try to use our module below react-native 0.59 when you are using 2.x. Or, upgrade our module to the recent one.
I'm using ExpoKit SDK 33, which doesn't use androidx: (reference)
In Expo, we haven't done the migration yet. Upcoming SDK34 will use RN 0.59 and regular Android Support Libraries. We plan to migrate our codebase to AndroidX for SDK35 or SDK36. Until then it may be difficult to mix AndroidX-migrated projects with ExpoKit projects.
So I think actually I should stay on [email protected]
I have the same problem for version 2.5.5
React Native - 0.59.10
React - 16.8.3
compileSdkVersion - 28
getProductsWorker error: Error: An unknown or unexpected error has occured. Please try again later.
at createErrorFromErrorData (NativeModules.js:155)
at NativeModules.js:104
at MessageQueue.__invokeCallback (MessageQueue.js:414)
at MessageQueue.js:127
at MessageQueue.__guard (MessageQueue.js:314)
at MessageQueue.invokeCallbackAndReturnFlushedQueue (MessageQueue.js:126)
at RNDebuggerWorker.js:2
I have the same issue on old android real device (release and debug on Android 6.0.1).
android phone SDK = 23
gradle file:
compileSdkVersion = 28
versions:
"react": "16.9.0",
"react-native": "0.61.1",
"react-native-iap": "^3.3.6",
RNIAP error [Error: An unknown or unexpected error has occured. Please try again later.]
Turns out this was caused by being logged into multiple google accounts on my device. I've run into similar problems before with Google Play. Cleared it up by removing all Google accounts from my device, clearing Google Play's data/cache, and then logging in with only one Google account.
@gerbus hah, thanks for this hint! I have a few google accounts on my phone too. I'll check it later and let you know about my result :)
Yeah, the problem was with multiple google accounts on my device. After I've deleted a few and keep one, I got products from Play Market
Thanks one more time, @gerbus !
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.