EddyVerbruggen / nativescript-admob

NativeScript plugin to earn some precious :moneybag::moneybag: with ads by Google AdMob
MIT License
69 stars 26 forks source link

Error In TNS Preview - ReferenceError: Can't find variable: GADInterstitialDelegate #89

Open JimLynchCodes opened 4 years ago

JimLynchCodes commented 4 years ago

Hello!

Thanks for making this plugin. I am developing an app for ios currently. It seems to work fine when I am in the simulator, but when I try it on my phone via tns preview the app blows up immediately on startup with this error:

LOG from device hadxain’s iPhone: 2020-09-16 14:45:09.342 nsplaydev[330:97063] ***** Fatal JavaScript exception - application has been terminated. *****
2020-09-16 14:45:09.342 nsplaydev[330:97063] Native stack trace:
1   0x10172e928 NativeScript::reportFatalErrorBeforeShutdown(JSC::ExecState*, JSC::Exception*, bool)
2   0x101779058 -[TNSRuntime executeModule:referredBy:]
3   0x102a7a25c -[UIApplication(PlayLiveSync) swizzled_executeModule:]
4   0x100fcb524
5   0x1e1ea68e0 <redacted>
2020-09-16 14:45:09.343 nsplaydev[330:97063] JavaScript stack trace:
2020-09-16 14:45:09.344 nsplaydev[330:97063] file:///app/vendor.js:88:69
at ../node_modules/nativescript-admob/admob.js(file:///app/vendor.js:90:3)
at __webpack_require__(file:///app/runtime.js:751:34)
at fn(file:///app/runtime.js:121:39)
at ./app/utils/video-ad-manager/video-ad-manager.service.ts(file:///app/bundle.js:782:32)
at __webpack_require__(file:///app/runtime.js:751:34)
at fn(file:///app/runtime.js:121:39)
at ./app/app.module.ts(file:///app/bundle.js:210:125)
at __webpack_require__(file:///app/runtime.js:751:34)
at fn(file:///app/runtime.js:121:39)
at file:///app/bundle.js:986:92
at ./main.ts(file:///app/bundle.js:1037:34)
at __webpack_require__(file:///app/runtime.js:751:34)
at checkDeferredModules(file:///app/runtime.js:44:42)
at webpackJsonpCallback(file:///app/runtime.js:31:39)
at anonymous(file:///app/bundle.js:2:61)
at evaluate([native code])
at moduleEvaluation([native code])
at [native code]
at asyncFunctionResume([native code])
at [native code]
at promiseReactionJob([native code])
2020-09-16 14:45:09.344 nsplaydev[330:97063] JavaScript error:
file:///app/vendor.js:88:69: JS ERROR ReferenceError: Can't find variable: GADInterstitialDelegate
2020-09-16 14:45:09.346 nsplaydev[330:97063] PlayLiveSync: Uncaught Exception
2020-09-16 14:45:09.346 nsplaydev[330:97063] *** JavaScript call stack:
(

)
2020-09-16 14:45:09.346 nsplaydev[330:97063] *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: ReferenceError: Can't find variable: GADInterstitialDelegate
 at 
file:///app/vendor.js:88:69
at ../node_modules/nativescript-admob/admob.js(file:///app/vendor.js:90:3)
at __webpack_require__(file:///app/runtime.js:751:34)
at fn(file:///app/runtime.js:121:39)
at ./app/utils/video-ad-manager/video-ad-manager.service.ts(file:///app/bundle.js:782:32)
at __webpack_require__(file:///app/runtime.js:751:34)
at fn(file:///app/runtime.js:121:39)
at ./app/app.module.ts(file:///app/bundle.js:210:125)
at __webpack_require__(file:///app/runtime.js:751:34)
at fn(file:///app/runtime.js:121:39)
at file:///app/bundle.js:986:92
at ./main.ts(file:///app/bundle.js:1037:34)
at __webpack_require__(file:///app/runtime.js:751:34)
at checkDeferredModules(file:///app/runtime.js:44:42)
at webpackJsonpCallback(file:///app/runtime.js:31:39)
at anonymous(file:///app/bundle.js:2:61)
at evaluate([native code])
at moduleEvaluation([native code])
at [native code]
at asyncFunctionResume([native code])
at [native code]
at promiseReactionJob([native code])
', reason: '(null)'
*** First throw call stack:
(0x1e2457180 0x1e162f9f8 0x10172ee00 0x101779058 0x102a7a25c 0x100fcb524 0x1e1ea68e0)
libc++abi.dylib: terminating with uncaught exception of type NSException
2020-09-16 14:45:09.346 nsplaydev[330:97063] PlayLiveSync: Uncaught Exception
JimLynchCodes commented 4 years ago

I see this issue was opened and closed without a real solution, but I'm having a similar issue.

I ran "pod update" in my project root and also in the "/platforms/ios/" directory, but I'm still getting the error. 🤔

JimLynchCodes commented 4 years ago

Bump! 🙃

Just wondering about this as it's still an issue for me.

It works fine in the simulator, but my apps instantly crashes on startup with tns preview.

Is that expected? 🤔