I'm using the Expo Admob library as part of my React Native app.
https://docs.expo.io/versions/latest/sdk/admob/
The Rewarded Admob Ad feature that works perfectly with a Test Admob Unit Id fails when using my production Admob Unit Id.
This works great! The ad loads.
await AdMobRewarded.setAdUnitID('ca-app-pub-3940256099942544/5224354917'); // Test ID, Replace with your-admob-unit-id
await AdMobRewarded.requestAdAsync();
await AdMobRewarded.showAdAsync();
If I replace setAdUnitID(...) with my production key, the ad does not load instead throws the following error. I am running this using the Expo client so I can capture the error message however I am still getting an error when running it in production (eg. installing the apk).
[Unhandled promise rejection: Error: ERROR_CODE_INTERNAL_ERROR]
- node_modules\react-native\Libraries\BatchedBridge\NativeModules.js:99:50 in fn
- node_modules\@unimodules\react-native-adapter\build\NativeModulesProxy.js:15:46 in moduleName.methodInfo.name
* http://192.168.1.108:19001/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&minify=false&hot=false:129676:102 in requestAdAsync$
- node_modules\regenerator-runtime\runtime.js:45:44 in tryCatch
- node_modules\regenerator-runtime\runtime.js:274:30 in invoke
- node_modules\regenerator-runtime\runtime.js:45:44 in tryCatch
- node_modules\regenerator-runtime\runtime.js:135:28 in invoke
- node_modules\regenerator-runtime\runtime.js:170:17 in PromiseImpl$argument_0
- node_modules\promise\setimmediate\core.js:45:7 in tryCallTwo
- node_modules\promise\setimmediate\core.js:200:23 in doResolve
- node_modules\promise\setimmediate\core.js:66:12 in Promise
- node_modules\regenerator-runtime\runtime.js:169:31 in PromiseImpl$argument_0
- node_modules\regenerator-runtime\runtime.js:192:38 in enqueue
- node_modules\regenerator-runtime\runtime.js:219:8 in exports.async
- node_modules\expo-ads-admob\build\AdMobRewarded.js:19:15 in <global>
- node_modules\regenerator-runtime\runtime.js:45:44 in tryCatch
- node_modules\regenerator-runtime\runtime.js:274:30 in invoke
- node_modules\regenerator-runtime\runtime.js:45:44 in tryCatch
- node_modules\regenerator-runtime\runtime.js:135:28 in invoke
- node_modules\regenerator-runtime\runtime.js:170:17 in PromiseImpl$argument_0
- node_modules\promise\setimmediate\core.js:45:7 in tryCallTwo
- node_modules\promise\setimmediate\core.js:200:23 in doResolve
- node_modules\promise\setimmediate\core.js:66:12 in Promise
- node_modules\regenerator-runtime\runtime.js:169:31 in PromiseImpl$argument_0
- node_modules\regenerator-runtime\runtime.js:192:38 in enqueue
- node_modules\regenerator-runtime\runtime.js:219:8 in exports.async
- node_modules\promise\setimmediate\core.js:37:14 in tryCallOne
- node_modules\promise\setimmediate\core.js:123:25 in setImmediate$argument_0
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:146:14 in _callTimer
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:194:17 in _callImmediatesPass
- node_modules\react-native\Libraries\Core\Timers\JSTimers.js:458:30 in callImmediates
* [native code]:null in callImmediates
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:407:6 in __callImmediates
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:143:6 in __guard$argument_0
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:384:10 in __guard
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:142:17 in __guard$argument_0
* [native code]:null in flushedQueue
* [native code]:null in invokeCallbackAndReturnFlushedQueue
I'm using
Expo: 37.0.3
expo-ads-admob: 8.1.0
react: 16.9.0
react-native: 0.61.4
Is there something here that I have missed?