Open morlupib opened 5 years ago
The versions that I installed are the following: "nativescript-onesignal": "^1.0.8", "nativescript-plugin-firebase": "^7.6.1",
After app build, it breaks and shows the following log: JS: ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'firebase' of undefined JS: TypeError: Cannot read property 'firebase' of undefined JS: at file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js:122288:38 JS: at new ZoneAwarePromise (file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js:114087:29) JS: at addOnMessageReceivedCallback (file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js:122285:12) JS: at Object.initFirebaseMessaging (file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js:122220:9) JS: at runInit (file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js:120201:35) JS: at file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js:120220:17 JS: at new ZoneAwarePromise (file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js:114087:29) JS: at Object.push.../CORE_MOBILE/node_modules/nativescript-plugin-firebase/firebase.js.firebase_common_1.firebase.init (file:///data/data/org.nativescript.CoreMobile/files/app/v... System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.CoreMobile/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: System.err: Calling js method onCreate failed System.err: System.err: TypeError: Cannot read property 'firebase' of undefined System.err: File: "file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js, line: 122228, column: 29 System.err: System.err: StackTrace: System.err: Frame: function:'onAppModuleLaunchEvent', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 122228, column: 30 System.err: Frame: function:'', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 119911, column: 31 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/data/observable/observable.js.Observable.notify', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 144837, column: 23 System.err: Frame: function:'notifyLaunch', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 162597, column: 17 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/ui/frame/frame.js.ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 162530, column: 28 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/ui/frame/frame.js.ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 162404, column: 14 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/ui/frame/activity.js.NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 160391, column: 25 System.err: System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778) System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) System.err: at android.app.ActivityThread.-wrap11(Unknown Source:0) System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) System.err: at android.os.Handler.dispatchMessage(Handler.java:106) System.err: at android.os.Looper.loop(Looper.java:164) System.err: at android.app.ActivityThread.main(ActivityThread.java:6494) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) System.err: Caused by: com.tns.NativeScriptException: System.err: Calling js method onCreate failed System.err: System.err: TypeError: Cannot read property 'firebase' of undefined System.err: File: "file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js, line: 122228, column: 29 System.err: System.err: StackTrace: System.err: Frame: function:'onAppModuleLaunchEvent', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 122228, column: 30 System.err: Frame: function:'', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 119911, column: 31 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/data/observable/observable.js.Observable.notify', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 144837, column: 23 System.err: Frame: function:'notifyLaunch', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 162597, column: 17 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/ui/frame/frame.js.ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 162530, column: 28 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/ui/frame/frame.js.ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 162404, column: 14 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/ui/frame/activity.js.NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 160391, column: 25 System.err: System.err: at com.tns.Runtime.callJSMethodNative(Native Method) System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116) System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:996) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:983) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:967) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:959) System.err: at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:18) System.err: at android.app.Activity.performCreate(Activity.java:7009) System.err: at android.app.Activity.performCreate(Activity.java:7000) System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731) System.err: ... 9 more
The versions that I installed are the following: "nativescript-onesignal": "^1.0.8", "nativescript-plugin-firebase": "^7.6.1",
After app build, it breaks and shows the following log: JS: ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'firebase' of undefined JS: TypeError: Cannot read property 'firebase' of undefined JS: at file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js:122288:38 JS: at new ZoneAwarePromise (file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js:114087:29) JS: at addOnMessageReceivedCallback (file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js:122285:12) JS: at Object.initFirebaseMessaging (file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js:122220:9) JS: at runInit (file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js:120201:35) JS: at file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js:120220:17 JS: at new ZoneAwarePromise (file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js:114087:29) JS: at Object.push.../CORE_MOBILE/node_modules/nativescript-plugin-firebase/firebase.js.firebase_common_1.firebase.init (file:///data/data/org.nativescript.CoreMobile/files/app/v... System.err: java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.CoreMobile/com.tns.NativeScriptActivity}: com.tns.NativeScriptException: System.err: Calling js method onCreate failed System.err: System.err: TypeError: Cannot read property 'firebase' of undefined System.err: File: "file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js, line: 122228, column: 29 System.err: System.err: StackTrace: System.err: Frame: function:'onAppModuleLaunchEvent', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 122228, column: 30 System.err: Frame: function:'', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 119911, column: 31 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/data/observable/observable.js.Observable.notify', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 144837, column: 23 System.err: Frame: function:'notifyLaunch', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 162597, column: 17 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/ui/frame/frame.js.ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 162530, column: 28 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/ui/frame/frame.js.ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 162404, column: 14 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/ui/frame/activity.js.NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 160391, column: 25 System.err: System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2778) System.err: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) System.err: at android.app.ActivityThread.-wrap11(Unknown Source:0) System.err: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) System.err: at android.os.Handler.dispatchMessage(Handler.java:106) System.err: at android.os.Looper.loop(Looper.java:164) System.err: at android.app.ActivityThread.main(ActivityThread.java:6494) System.err: at java.lang.reflect.Method.invoke(Native Method) System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) System.err: Caused by: com.tns.NativeScriptException: System.err: Calling js method onCreate failed System.err: System.err: TypeError: Cannot read property 'firebase' of undefined System.err: File: "file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js, line: 122228, column: 29 System.err: System.err: StackTrace: System.err: Frame: function:'onAppModuleLaunchEvent', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 122228, column: 30 System.err: Frame: function:'', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 119911, column: 31 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/data/observable/observable.js.Observable.notify', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 144837, column: 23 System.err: Frame: function:'notifyLaunch', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 162597, column: 17 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/ui/frame/frame.js.ActivityCallbacksImplementation.setActivityContent', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 162530, column: 28 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/ui/frame/frame.js.ActivityCallbacksImplementation.onCreate', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 162404, column: 14 System.err: Frame: function:'push.../CORE_MOBILE/node_modules/tns-core-modules/ui/frame/activity.js.NativeScriptActivity.onCreate', file:'file:///data/data/org.nativescript.CoreMobile/files/app/vendor.js', line: 160391, column: 25 System.err: System.err: at com.tns.Runtime.callJSMethodNative(Native Method) System.err: at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:1116) System.err: at com.tns.Runtime.callJSMethodImpl(Runtime.java:996) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:983) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:967) System.err: at com.tns.Runtime.callJSMethod(Runtime.java:959) System.err: at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:18) System.err: at android.app.Activity.performCreate(Activity.java:7009) System.err: at android.app.Activity.performCreate(Activity.java:7000) System.err: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) System.err: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731) System.err: ... 9 more