Open ryanlangton opened 5 years ago
I updated my firebase.nativescript.json
file to match a new application with the nativescript-plugin-firebase
added fresh (some of the properties names not match)
{
"external_push_client_only": false,
"using_ios": true,
"using_android": true,
"firestore": true,
"realtimedb": false,
"authentication": true,
"remote_config": false,
"performance_monitoring": false,
"messaging": false,
"in_app_messaging": false,
"crashlytics": false,
"crash_reporting": false,
"storage": true,
"facebook_auth": true,
"google_auth": true,
"admob": false,
"dynamic_links": false,
"ml_kit": false
}
Now it's still crashing but doesn't give me an error.. the stack trace seems to indicate it's somewhere around the same place in code (when it calls didFinishLaunchingWithOptions)
NativeScript debugger attached.
CONSOLE INFO file:///app/vendor.js:91964:36: HMR: Hot Module Replacement Enabled. Waiting for signal.
CONSOLE LOG file:///app/bundle.js:383:20: auth service set up current user stream
NativeScript caught signal 11.
Native Stack:
1 0x1055151df sig_handler(int)
2 0x10c13db5d _sigtramp
3 0x600000840e00
4 0x10c083b4d libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step()
5 0x10c087e4c _Unwind_RaiseException
6 0x10bc614aa __cxa_throw
7 0x10a682bfa _objc_exception_destructor(void*)
8 0x10b825555 +[NSException raise:format:]
9 0x1030bc462 +[FIRApp configure]
10 0x105e3151d ffi_call_unix64
11 0x12ec41790
JS Stack:
1 configure@[native code]
2 @file:///app/vendor.js:96240:37
3 ZoneAwarePromise@file:///app/vendor.js:90905:37
4 init@file:///app/vendor.js:96215:23
5 FirebaseModule@file:///app/bundle.js:766:31
6 _createClass@file:///app/vendor.js:53986:28
7 _createProviderInstance@file:///app/vendor.js:53956:38
8 initNgModule@file:///app/vendor.js:53889:55
9 NgModuleRef_@file:///app/vendor.js:54616:21
10 createNgModuleRef@file:///app/vendor.js:54605:28
11 @file:///app/vendor.js:60322:49
12 onInvoke@file:///app/vendor.js:59830:39
13 run@file:///app/vendor.js:90141:49
14 run@file:///app/vendor.js:90141:49
15 @file:///app/vendor.js:90886:37
16 runTask@file:///app/vendor.js:90191:57
17 drainMicroTaskQueue@file:///app/vendor.js:90598:42
18 @file:///app/vendor.js:86653:44
19 notify@file:///app/vendor.js:116736:31
20 @[native code]
21 notifyAppStarted@file:///app/vendor.js:113712:36
22 didFinishLaunchingWithOptions@file:///app/vendor.js:113704:30
23 @[native code]
24 onReceive@file:///app/v<…>
Line 113704 is the line: this.notifyAppStarted(notification);
IOSApplication.prototype.didFinishLaunchingWithOptions = function (notification) {
if (!displayedOnce) {
displayedLinkTarget = CADisplayLinkTarget.new();
displayedLink = CADisplayLink.displayLinkWithTargetSelector(displayedLinkTarget, "onDisplayed");
displayedLink.addToRunLoopForMode(NSRunLoop.mainRunLoop, NSDefaultRunLoopMode);
displayedLink.addToRunLoopForMode(NSRunLoop.mainRunLoop, UITrackingRunLoopMode);
}
this._window = UIWindow.alloc().initWithFrame(UIScreen.mainScreen.bounds);
this._window.backgroundColor = UIColor.whiteColor;
this.notifyAppStarted(notification);
};
Has there been any progress on this issue? I am seeing a similar problem.
I'd be happy to take a look if anyone shared a minimal repo with me that reproduces the issue.
I'll try and get a small demo up and link here.
Here is a link that reproduces the issue: https://github.com/adonus19/ns-firebase-demo.git
This is a basic NativeScript project created using "tns create" with tabs.
I don't know why I didn't think of this sooner. But, I tried connecting without any configuration passed to firebase.init() and I was able to connect. Seems there may be an issue with the configuration I am passing in.
After doing some more research, I see that firebase is already configured and does not need to have configuration properties passed to it like how it would be done in a web based project. Simply running firebase.init().then(() => {}) resolves the issue.
@adonus19 I'd be happy to try your repo, but it won't run because the import '../../firebase-config'
is missing. Can you share it with me?
@EddyVerbruggen the firebase-config file was all the specifics to my firebase account, i.e. apiKey and so on.
Had the same issue, moving
const firebase = require("nativescript-plugin-firebase");
from Angular example inside ngOnInit right before
firebase.init({...
solved it.
Having the same issue here! :(
I am also experiencing the same issue here on the iOS emulator :( "tns-ios": { "version": "6.2.0" }
Has anyone found a solution to this?
Upgraded to v9.0.1 with NS 5.4.2 and getting the following error
Here is the code in vendor.js