Error when trying to fetch Amazon App User ID using react-native-iap #2514
Replies: 4 comments 1 reply
-
are you using sandbox enviroment? if yes set your adb > adb shell setprop debug.amazon.sandboxmode debug |
Beta Was this translation helpful? Give feedback.
-
@pedrolmsin thanks. adb shell setprop debug.amazon.sandboxmode debug However, it seems that after executing below command, I'm not receiving any response or errors. The application remains unresponsive. let userObj = await RNIap.IapAmazon.AmazonModule.getUser(); I'd appreciate any help or insights into resolving this issue. Thank you! |
Beta Was this translation helpful? Give feedback.
-
@hyochan , @andresesfm , @JJMoon Could you please help me here. |
Beta Was this translation helpful? Give feedback.
-
Hmm, are you using which API version for your emulator? the amazon app tester only works with API 28- (android pie or less), are u calling initConnection() first? |
Beta Was this translation helpful? Give feedback.
-
Hello maintainers and community,
I'm using the react-native-iap package version 12.10.5 for my React Native application on Fire TV. I'm trying to fetch the Amazon App User ID using the following code:
let userObj = await RNIap.IapAmazon.AmazonModule.getUser();
However, I'm encountering an error with the message "Error not specified". Below is the detailed error stack:
Possible Unhandled Promise Rejection (id: 1): Error: Error not specified. Error: Error not specified. at promiseMethodWrapper (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:1678:45) at ?anon_0_ (http://192.168.2.91:8081/app/views/subscription.bundle//&platform=android&app=com.travelxp.firetv&modulesOnly=true&dev=true&minify=false&runModule=true&shallow=true:225:67) at next (native) at asyncGeneratorStep (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:20290:26) at next (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:20309:29) at anonymous (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:20314:14) at tryCallTwo (/Users/dlowder/iosProjects/react-native-tvos/ReactAndroid/hermes-engine/.cxx/Release/604k1y5k/armeabi-v7a/lib/InternalBytecode/InternalBytecode.js:61:9) at doResolve (/Users/dlowder/iosProjects/react-native-tvos/ReactAndroid/hermes-engine/.cxx/Release/604k1y5k/armeabi-v7a/lib/InternalBytecode/InternalBytecode.js:216:25) at Promise (/Users/dlowder/iosProjects/react-native-tvos/ReactAndroid/hermes-engine/.cxx/Release/604k1y5k/armeabi-v7a/lib/InternalBytecode/InternalBytecode.js:82:14) at anonymous (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:20306:25) at apply (native) at checkValidSubscription (http://192.168.2.91:8081/app/views/subscription.bundle//&platform=android&app=com.travelxp.firetv&modulesOnly=true&dev=true&minify=false&runModule=true&shallow=true:262:47) at ?anon_0 (http://192.168.2.91:8081/app/views/subscription.bundle//&platform=android&app=com.travelxp.firetv&modulesOnly=true&dev=true&minify=false&runModule=true&shallow=true:129:40) at next (native) at asyncGeneratorStep (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:20290:26) at _next (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:20309:29) at tryCallOne (/Users/dlowder/iosProjects/react-native-tvos/ReactAndroid/hermes-engine/.cxx/Release/604k1y5k/armeabi-v7a/lib/InternalBytecode/InternalBytecode.js:53:16) at anonymous (/Users/dlowder/iosProjects/react-native-tvos/ReactAndroid/hermes-engine/.cxx/Release/604k1y5k/armeabi-v7a/lib/InternalBytecode/InternalBytecode.js:139:27) at apply (native) at anonymous (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:25934:26) at _callTimer (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:25853:17) at _callReactNativeMicrotasksPass (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:25883:17) at callReactNativeMicrotasks (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:26046:44) at __callReactNativeMicrotasks (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:2076:46) at anonymous (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:1888:45) at __guard (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:2060:15) at flushedQueue (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:1887:21) at invokeCallbackAndReturnFlushedQueue (http://192.168.2.91:8081/index.bundle//&platform=android&dev=true&minify=false&app=com.travelxp.firetv&modulesOnly=false&runModule=true:1881:33)
Expected Behavior
The method should return the Amazon App User ID without any errors.
Actual Behavior
An error with the message "Error not specified" is thrown.
Environment:
react-native-iap: ^12.10.5
react-native: react-native-tvos@0.69.6-0
Platforms: Fire TV Stick 4k
Software Version - Fire OS 6.2.9.7
To Reproduce
Steps to reproduce the behavior:
Initialize the react-native-iap package.
Call the RNIap.IapAmazon.AmazonModule.getUser() method.
Observe the error.
Additional Context
I've followed the setup instructions for the react-native-iap package correctly, especially for the Amazon platform.
I've checked my Amazon Developer account setup and ensured that I have the necessary permissions.
Output of npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 13.4.1
CPU: (6) x64 Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz
Memory: 17.88 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 18.12.1 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.19.2 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.12.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: 2022.3 AI-223.8836.35.2231.10406996
Xcode: 14.3.1/14E300c - /usr/bin/xcodebuild
Languages:
Java: 11.0.19 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.2.0 => 18.2.0
react-native: Not Found
react-native-macos: Not Found
react-native-tvos: 0.69.6-0
npmGlobalPackages:
react-native: Not Found
I'd appreciate any help or insights into resolving this issue. Thank you!
Beta Was this translation helpful? Give feedback.
All reactions