Skip to content
This repository has been archived by the owner on Apr 4, 2023. It is now read-only.

App crashes on iOS emulator #349

Closed
ullalaaron opened this issue Apr 11, 2017 · 1 comment
Closed

App crashes on iOS emulator #349

ullalaaron opened this issue Apr 11, 2017 · 1 comment
Labels
Milestone

Comments

@ullalaaron
Copy link

While tns run ios --emulator , after saving a file ( and therefore refreshing the app ), the app crashes with the following stacktrace:

Class PLBuildVersion is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/AssetsLibraryServices.framework/AssetsLibraryServices (0x1207aacc0) and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/PhotoLibraryServices.framework/PhotoLibraryServices (0x1205c16f0). One of the two will be used. Which one is undefined.
[Firebase/Analytics][I-ACS023007] Firebase Analytics v.3700000 started
[Firebase/Analytics][I-ACS023008] To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/RfcP7r)
*** JavaScript call stack:
	(
		0   configure@[native code]
		1   runInit@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:427:25
		2   @file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:496:14
		3   initializePromise@:1:11
		4   Promise@[native code]
		5   init@file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:410:21
		6   anonymous@file:///app/app.js:12:14
		7   evaluate@[native code]
		8   moduleEvaluation@:1:11
		9   @:7:50
		10  promiseReactionJob@:1:11
	)
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[0]'
	*** First throw call stack:
	(
		0   CoreFoundation                      0x000000010a51eb0b __exceptionPreprocess + 171
		1   libobjc.A.dylib                     0x0000000109f83141 objc_exception_throw + 48
		2   CoreFoundation                      0x000000010a4335cd -[__NSPlaceholderArray initWithObjects:count:] + 269
		3   CoreFoundation                      0x000000010a43a314 +[NSArray arrayWithObjects:count:] + 52
		4   Haloose                             0x000000010549a463 -[RCNConfigDBManager loadMainTableWithBundleIdentifier:fromSource:] + 163
		5   Haloose                             0x000000010549a332 __62-[RCNConfigDBManager loadMainWithBundleIdentifier:fromSource:]_block_invoke + 34
		6   libdispatch.dylib                   0x000000010aa4a792 _dispatch_client_callout + 8
		7   libdispatch.dylib                   0x000000010aa2f3de _dispatch_barrier_sync_f_invoke + 126
		8   libdispatch.dylib                   0x000000010aa33304 _dispatch_barrier_sync_f_slow + 529
		9   Haloose                             0x000000010549a26d -[RCNConfigDBManager loadMainWithBundleIdentifier:fromSource:] + 249
		10  Haloose                             0x0000000105496baa -[RCNConfigContent loadConfigFromMainTable] + 70
		11  Haloose                             0x000000010549511c -[RCNConfigContent initWithDBManager:] + 380
		12  Haloose                             0x0000000105491f24 -[FIRRemoteConfig initWithDBManager:] + 156
		13  Haloose                             0x0000000105491e60 __31+[FIRRemoteConfig remoteConfig]_block_invoke + 86
		14  libdispatch.dylib                   0x000000010aa4a792 _dispatch_client_callout + 8
		15  libdispatch.dylib                   0x000000010aa35a8d dispatch_once_f + 69
		16  Haloose                             0x0000000105491e07 +[FIRRemoteConfig remoteConfig] + 45
		17  Haloose                             0x000000010549168b +[FIRRemoteConfig(FIRApp) receivedReadyToConfigureNotification:] + 127
		18  CoreFoundation                      0x000000010a4bdc2c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
		19  CoreFoundation                      0x000000010a4bdb29 _CFXRegistrationPost + 425
		20  CoreFoundation                      0x000000010a4bd892 ___CFXNotificationPost_block_invoke + 50
		21  CoreFoundation                      0x000000010a481162 -[_CFXNotificationRegistrar find:object:observer:enumerator:] + 1826
		22  CoreFoundation                      0x000000010a4802c1 _CFXNotificationPost + 673
		23  Foundation                          0x000000010756fb24 -[NSNotificationCenter postNotificationName:object:userInfo:] + 66
		24  Haloose                             0x00000001053cacc8 +[FIRApp sendNotificationsToSDKs:] + 296
		25  Haloose                             0x00000001053c9ae1 +[FIRApp configureDefaultAppWithOptions:sendingNotifications:] + 341
		26  Haloose                             0x00000001053c97d9 +[FIRApp configure] + 306
		27  NativeScript                        0x00000001072e697d ffi_call_unix64 + 85
		28  ???                                 0x000000012363a650 0x0 + 4888700496

{N} v 2.5.4
plugin v 3.10.10

@EddyVerbruggen
Copy link
Owner

EddyVerbruggen commented Jun 20, 2017

That's because FIRApp.configure() ran twice in that case (livesync) - which crashes the app. That's a bit of a bug in the Firebase iOS SDK, they should make it reentrant IMO.

In 4.0.0 I moved it to a different spot, but I doubt that will help. Please reopen if it doesn't.

@EddyVerbruggen EddyVerbruggen added this to the 4.0.0 milestone Jun 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants