NativeScript / nativescript-marketplace-demo

NativeScript kitchen sink demo. All of NativeScript’s functionality in one app.
http://www.nativescript.org
Apache License 2.0
325 stars 97 forks source link

Crash with firebase #240

Closed readytopark closed 7 years ago

readytopark commented 7 years ago

I ran a fresh downloaded version of demo app and it crashed right after clicking "Get Started".

Project successfully built
Successfully deployed on device with identifier '46191794-A1E4-4AEF-BB25-4E1A40D5ECC1'.
Firebase automatic screen reporting is enabled. Call +[FIRAnalytics setScreenName:setScreenClass:] to set the screen name or override the default screen class name. To disable automatic screen reporting, set the flag FirebaseAutomaticScreenReportingEnabled to NO in the Info.plist
CONSOLE INFO file:///app/common/analytics.js:10:59: Analytics: Successfully initialized monitor with settings
CONSOLE INFO file:///app/common/analytics.js:10:59: Analytics: Started new session with id 6096ef3ba26c48b38ed3174488b8150b and device id ios-simulator
CONSOLE LOG file:///app/app.js:27:16: Resume
CONSOLE INFO file:///app/common/analytics.js:10:59: Analytics: Sending statistics
CONSOLE INFO file:///app/common/analytics.js:10:59: Analytics: Statistics successfully sent
CONSOLE INFO file:///app/common/analytics.js:10:59: Analytics: Sending statistics
CONSOLE INFO file:///app/common/analytics.js:10:59: Analytics: Statistics successfully sent
CONSOLE INFO file:///app/common/analytics.js:10:59: Analytics: The event name must be a non empty string
CONSOLE LOG file:///app/common/firebase.js:31:16: Firebase init!!!
1   0x106b9ea6b NativeScript::FFICallback<NativeScript::ObjCMethodCallback>::ffiClosureCallback(ffi_cif*, void*, void**, void*)
Nov 30 15:31:15 Joes-MacBook-Pro.local nativescriptmarketplacedemo[61828]: 2   0x10731e90e ffi_closure_unix64_inner
Nov 30 15:31:15 Joes-MacBook-Pro.local nativescriptmarketplacedemo[61828]: 3   0x10731f2c2 ffi_closure_unix64
4   0x109760f64 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
5   0x109760b25 __CFRunLoopDoTimer
6   0x109723e5d __CFRunLoopRun
7   0x109723486 CFRunLoopRunSpecific
8   0x10aa9e9f0 GSEventRunModal
9   0x107aad420 UIApplicationMain
10  0x10731f11d ffi_call_unix64
Nov 30 15:31:15 Joes-MacBook-Pro.local nativescriptmarketplacedemo[61828]: 11  0x117e0ae90
file:///app/common/firebase.js:35:13: JS ERROR TypeError: undefined is not an object (evaluating 'firebase.init')

While looking at firebase.js:35:13 I found var firebase is not actually defined.

NickIliev commented 7 years ago

Hey @readytopark thank you for reporting this one - we have committed some changes and along with them also a fix for this specific issue so now the master branch is working as expected.

update your app

rm -rf platforms
git pull
tns run ios
readytopark commented 7 years ago

Such a quick response! Thank you!