I'm trying to get the FlutterFire Database working on the iOS part (it works fine on Android) of my application, but I'm getting some error messages saying that my GoogleService-Info.plist file is no where to be found. But I'm pretty sure it is placed correctly in my project.
This is the console output:
[Firebase/Core][I-COR000003] The default Firebase app has not yet been configured. Add [FIRApp configure] to your application initialization. Read more: https://firebase.google.com/docs/ios/setup#initialize_firebase_in_your_app.
[Firebase/Core][I-COR000012] Could not locate configuration file: 'GoogleService-Info.plist'.
[Firebase/Core][I-COR000005] No app has been configured yet.
*** Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure] could not find a valid GoogleService-Info.plist in your project. Please download one from https://console.firebase.google.com/.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ccad34b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010c70e21e objc_exception_throw + 48
2 CoreFoundation 0x000000010cd16265 +[NSException raise:format:] + 197
3 Runner 0x0000000109bdeb67 +[FIRApp configure] + 353
4 Runner 0x0000000109b79979 -[FirebaseDatabasePlugin init] + 185
5 Runner 0x0000000109b79838 +[FirebaseDatabasePlugin registerWithRegistrar:] + 168
6 Runner 0x0000000109b765e9 +[GeneratedPluginRegistrant registerWithRegistry:] + 121
7 Runner 0x0000000109b76473 -[AppDelegate application:didFinishLaunchingWithOptions:] + 99
8 UIKit 0x000000010d0c70be -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 290
9 UIKit 0x000000010d0c8a43 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4236
10 UIKit 0x000000010d0cede9 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1731
11 UIKit 0x000000010d0cbf69 -[UIApplication workspaceDidEndTransaction:] + 188
12 FrontBoardServices 0x0000000110fd4723 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
13 FrontBoardServices 0x0000000110fd459c -[FBSSerialQueue _performNext] + 189
14 FrontBoardServices 0x0000000110fd4925 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
15 CoreFoundation 0x000000010cc52311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
16 CoreFoundation 0x000000010cc3759c __CFRunLoopDoSources0 + 556
17 CoreFoundation 0x000000010cc36a86 __CFRunLoopRun + 918
18 CoreFoundation 0x000000010cc36494 CFRunLoopRunSpecific + 420
19 UIKit 0x000000010d0ca7e6 -[UIApplication _run] + 434
20 UIKit 0x000000010d0d0964 UIApplicationMain + 159
21 Runner 0x0000000109b7654f main + 111
22 libdyld.dylib 0x000000010ea9d68d start + 1
23 ??? 0x0000000000000008 0x0 + 8
)
And here is a screenshot of my project tree:
I'm trying this in the GeoFire plugin example folder, which can be found here: https://github.com/bramvbilsen/Flutter-GeoFire/tree/master/example I'd love to hear whether you guys have more luck and a possible solution of course!
Alright, I found the solution!
Apparently Xcode 9 doesn't add the file to your actual project!
This can be fixed be clicking on the GoogleServices-info.plist file
Checking the Runner project in the Target Membership tab
Related
MY application consist of both bottom and upper tabs, I am calling a network request on each tab but sometimes it crash application on iOS and don't know the reason for this.
Below are logs i got on crashlytics.
Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x199a9b180 __exceptionPreprocess
1 libobjc.A.dylib 0x198c739f8 objc_exception_throw
2 CoreFoundation 0x1999b488c +[_CFXNotificationTokenRegistration keyCallbacks]
3 Foundation 0x19a478b38 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4 Flutter 0x1014953ec (Missing)
5 Runner 0x101062c30 +[GeneratedPluginRegistrant registerWithRegistry:] + 88 (GeneratedPluginRegistrant.m:88)
6 flutter_downloader 0x101f77404 (Missing)
7 flutter_downloader 0x101f7a850 (Missing)
8 flutter_downloader 0x101f7d218 (Missing)
9 Flutter 0x101517768 (Missing)
10 Flutter 0x1014b2240 (Missing)
11 Flutter 0x101508398 (Missing)
12 Flutter 0x1014c1fd0 (Missing)
13 Flutter 0x1014c3c48 (Missing)
14 CoreFoundation 0x199a2d554 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
15 CoreFoundation 0x199a2d284 __CFRunLoopDoTimer
16 CoreFoundation 0x199a2cab8 __CFRunLoopDoTimers
17 CoreFoundation 0x199a27a08 __CFRunLoopRun
18 CoreFoundation 0x199a26fb4 CFRunLoopRunSpecific
19 GraphicsServices 0x19bc2879c GSEventRunModal
20 UIKitCore 0x1c6288c38 UIApplicationMain
21 Runner 0x1010633bc main + 8 (AppDelegate.swift:8)
22 libdyld.dylib 0x1994ea8e0 start
Crashed: com.twitter.crashlytics.ios.exception
0 Runner 0x10107cc20 CLSProcessRecordAllThreads + 4308732960
1 Runner 0x10107d008 CLSProcessRecordAllThreads + 4308733960
2 Runner 0x10106c874 CLSHandler + 4308666484
3 Runner 0x10107b218 __CLSExceptionRecord_block_invoke + 4308726296
4 libdispatch.dylib 0x1994d97d4 _dispatch_client_callout + 16
5 libdispatch.dylib 0x199487c1c _dispatch_lane_barrier_sync_invoke_and_complete + 56
6 Runner 0x10107ac84 CLSExceptionRecord + 4308724868
7 Runner 0x10107aab0 CLSExceptionRecordNSException + 4308724400
8 Runner 0x10107a6a4 CLSTerminateHandler() + 4308723364
9 libc++abi.dylib 0x198c68838 std::__terminate(void (*)()) + 16
10 libc++abi.dylib 0x198c68434 __cxa_rethrow + 144
11 libobjc.A.dylib 0x198c73bc8 objc_exception_rethrow + 44
12 CoreFoundation 0x199a27020 CFRunLoopRunSpecific + 544
13 GraphicsServices 0x19bc2879c GSEventRunModal + 104
14 UIKitCore 0x1c6288c38 UIApplicationMain + 212
15 Runner 0x1010633bc main + 8 (AppDelegate.swift:8)
16 libdyld.dylib 0x1994ea8e0 start + 4
I am stuck at this and couldn't find any reason or solution.
Thanks in advance
What version of crashlytics are you running? If you are running iOS 13 you should upgrade to 3.14.0. as it will give you better detailed information about the crash.
I am trying to run a Xamarin.IOS app through visual studio community on macos but encounter the following exception on the splash screen, both in simulator and on a physical device. It previously worked, but after pushing changes (which worked) and taking a coffee break, the next time I built it stopped working. There is no VCS diff to the main repository, which runs fine for coworkers.
Objective-C exception thrown. Name: NSInvalidArgumentException Reason: Could not find a storyboard named 'Main' in bundle NSBundle </Users/User/Library/Developer/CoreSimulator/Devices/3AD1FBAC-EA67-4CC0-8D8D-212DA5429B51/data/Containers/Bundle/Application/7D30F8AC-D3A4-46FA-AA22-8EA50F1ABA43/Test.app> (loaded)
Native stack trace:
0 CoreFoundation 0x000000011bc371bb __exceptionPreprocess + 331
1 libobjc.A.dylib 0x000000011cc18735 objc_exception_throw + 48
2 UIKitCore 0x000000012312e27a +[UIStoryboard storyboardWithName:bundle:] + 676
3 UIKitCore 0x0000000122f8d016 -[UIApplication _loadMainStoryboardFileNamed:bundle:] + 76
4 UIKitCore 0x0000000122f8d50c -[UIApplication _loadMainInterfaceFile] + 272
5 UIKitCore 0x0000000122f8bb25 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1357
6 UIKitCore 0x00000001227aa4e9 __111-[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:]_block_invoke + 866
7 UIKitCore 0x00000001227b329c +[_UICanvas _enqueuePostSettingUpdateTransactionBlock:] + 153
8 UIKitCore 0x00000001227aa126 -[__UICanvasLifecycleMonitor_Compatability _scheduleFirstCommitForScene:transition:firstActivation:completion:] + 233
9 UIKitCore 0x00000001227aaae0 -[__UICanvasLifecycleMonitor_Compatability activateEventsOnly:withContext:completion:] + 1085
10 UIKitCore 0x00000001227a8cb5 __82-[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:]_block_invoke + 795
11 UIKitCore 0x00000001227a895f -[_UIApplicationCanvas _transitionLifecycleStateWithTransitionContext:completion:] + 435
12 UIKitCore 0x00000001227ada90 __125-[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:]_block_invoke + 584
13 UIKitCore 0x00000001227ae80e _performActionsWithDelayForTransitionContext + 100
14 UIKitCore 0x00000001227ad7ef -[_UICanvasLifecycleSettingsDiffAction performActionsForCanvas:withUpdatedScene:settingsDiff:fromSettings:transitionContext:] + 221
15 UIKitCore 0x00000001227b293a -[_UICanvas scene:didUpdateWithDiff:transitionContext:completion:] + 392
16 UIKitCore 0x0000000122f8a44e -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 515
17 UIKitCore 0x0000000122b2ed09 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 357
18 FrontBoardServices 0x000000011e76a2da -[FBSSceneImpl _didCreateWithTransitionContext:completion:] + 448
19 FrontBoardServices 0x000000011e775443 __56-[FBSWorkspace client:handleCreateScene:withCompletion:]_block_invoke_2 + 271
20 FrontBoardServices 0x000000011e774b3a __40-[FBSWorkspace _performDelegateCallOut:]_block_invoke + 53
21 libdispatch.dylib 0x000000011df3a54b _dispatch_client_callout + 8
22 libdispatch.dylib 0x000000011df3d60b _dispatch_block_invoke_direct + 312
23 FrontBoardServices 0x000000011e7a9ba8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
24 FrontBoardServices 0x000000011e7a9860 -[FBSSerialQueue _performNext] + 457
25 FrontBoardServices 0x000000011e7a9e40 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
26 CoreFoundation 0x000000011bb9c721 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
27 CoreFoundation 0x000000011bb9bf93 __CFRunLoopDoSources0 + 243
28 CoreFoundation 0x000000011bb9663f __CFRunLoopRun + 1263
29 CoreFoundation 0x000000011bb95e11 CFRunLoopRunSpecific + 625
30 GraphicsServices 0x000000011fdf51dd GSEventRunModal + 62
31 UIKitCore 0x0000000122f8d81d UIApplicationMain + 140
32 ??? 0x0000000187cb6bce 0x0 + 6573222862
33 ??? 0x0000000187cb6963 0x0 + 6573222243
I've been searching around and have found a few potential solutions to this issue, none have worked. I've tried:
https://stackoverflow.com/a/8776005/2751571 - In my case the storyboard is named 'Main'. This is consistent in the relevant locations
https://stackoverflow.com/a/37502912/2751571 - The target membership box is checked. I have tried unchecking this, returning to visual studio, and rechecking it.
https://stackoverflow.com/a/11547232/2751571 - Tried these steps, no avail.
https://stackoverflow.com/a/19240408/2751571 - Resulted in a black screen (though it did not crash after removing the row from info.plist)
Note that a clean + rebuild was done for each of these steps. I've additionally verified that Main.storyboard is in the 'Copy Bundle Resources' build phase, cloned my repository into a separate directory, fully re-installed visual studio (along with downloaded frameworks), and a number of other things I've came across searching around. No luck.
It is worth noting that the default Xamarin.IOS project does run on my machine, but does not explain why this project only fails to run on mine, but works on others.
Hi did you check the Main.storyboard added in the info.plist
I do my own error handling by catching any exceptions and logging them manually. I use NSSetUncaughtExceptionHandler(&myExceptionHandler); and log the stack trace using [NSException callStackSymbols]. Up until recently my logs contained the symbolicated stack trace. Now they don't and there weren't any code changes related to the logging. This is occurring on all devices and versions of iOS. I am able to manually symbolicate my logs but it is quite cumbersome. Any insight would be greatly appreciated.
Previously my logs looked like:
0 libobjc.A.dylib 0x352925b0 objc_msgSend + 16
1 MYAPP 0x0006573a -[MyViewController(Images) didReceiveImage:context:etag:expires:] + 42
2 MYAPP 0x0004fb26 -[MyImageTask didReceiveImage:] + 98
3 Foundation 0x361ac8e8 __NSThreadPerformPerform
4 CoreFoundation 0x3b37d680 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
5 CoreFoundation 0x3b37cee4 __CFRunLoopDoSources0
6 CoreFoundation 0x3b37bcb2 __CFRunLoopRun
7 CoreFoundation 0x3b2eeeb8 CFRunLoopRunSpecific
8 CoreFoundation 0x3b2eed44 CFRunLoopRunInMode
9 GraphicsServices 0x396bc2e6 GSEventRunModal
10 UIKit 0x3452e2f4 UIApplicationMain
11 MYAPP 0x0004934a main + 70
12 MYAPP 0x000492fc start + 36
After my last release they look like:
0 libobjc.A.dylib 0x352925b0 objc_msgSend + 16
1 MYAPP 0x0006573a - MYAPP + 42
2 MYAPP 0x0004fb26 - MYAPP + 98
3 Foundation 0x361ac8e8 __NSThreadPerformPerform
4 CoreFoundation 0x3b37d680 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__
5 CoreFoundation 0x3b37cee4 __CFRunLoopDoSources0
6 CoreFoundation 0x3b37bcb2 __CFRunLoopRun
7 CoreFoundation 0x3b2eeeb8 CFRunLoopRunSpecific
8 CoreFoundation 0x3b2eed44 CFRunLoopRunInMode
9 GraphicsServices 0x396bc2e6 GSEventRunModal
10 UIKit 0x3452e2f4 UIApplicationMain
11 MYAPP 0x0004934a main + 70
12 MYAPP 0x000492fc start + 36
Looks like Apple now performs a kind of repackaging and eventually stripping debug info.
2016-10-28 16:59:42.288 HuaYang[16997:681263] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[HYNewGiftInfoModel id]: unrecognized selector sent to instance 0x6080000f8200'
*** First throw call stack:
(
0 CoreFoundation 0x000000010efa834b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x000000010dfb821e objc_exception_throw + 48
2 CoreFoundation 0x000000010f017f34 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x000000010ef2dc15 ___forwarding___ + 1013
4 CoreFoundation 0x000000010ef2d798 _CF_forwarding_prep_0 + 120
5 HuaYang 0x000000010abdecdb HuaYang + 4332763
6 HuaYang 0x000000010ab7a99e HuaYang + 3922334
7 UIKit 0x0000000111d5edd0 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:isFocused:notify:] + 467
8 UIKit 0x0000000111d5ebf7 -[UICollectionView _createPreparedCellForItemAtIndexPath:withLayoutAttributes:applyAttributes:] + 35
9 UIKit 0x0000000111d640cf -[UICollectionView _updateVisibleCellsNow:] + 4803
10 UIKit 0x0000000111d69d63 -[UICollectionView layoutSubviews] + 313
11 UIKit 0x00000001114e1344 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1237
12 QuartzCore 0x000000011115ccdc -[CALayer layoutSublayers] + 146
13 QuartzCore 0x00000001111507a0 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
14 QuartzCore 0x000000011115061e _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
15 QuartzCore 0x00000001110de62c _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 280
16 QuartzCore 0x000000011110b713 _ZN2CA11Transaction6commitEv + 475
17 UIKit 0x0000000111416067 _UIApplicationFlushRunLoopCATransactionIfTooLate + 206
18 UIKit 0x0000000111c25b30 __handleEventQueue + 5672
19 CoreFoundation 0x000000010ef4d311 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
20 CoreFoundation 0x000000010ef32517 __CFRunLoopDoSources0 + 423
21 CoreFoundation 0x000000010ef31a86 __CFRunLoopRun + 918
22 CoreFoundation 0x000000010ef31494 CFRunLoopRunSpecific + 420
23 GraphicsServices 0x0000000113b50a6f GSEventRunModal + 161
24 UIKit 0x000000011141cf34 UIApplicationMain + 159
25 HuaYang 0x000000010a9514cf HuaYang + 1656015
26 libdyld.dylib 0x0000000112db968d start + 1
5 HuaYang 0x000000010abdecdb HuaYang + 4332763
My own code has no function name, while the system library has.
Is there any xcode build switch I need to turn on to show the symbol while my app crash?
Steps to analyze crash report from apple:
Copy the release .app file which was pushed to the appstore, the .dSYM file that was created at the time of release and the crash report receive from APPLE into a FOLDER.
OPEN terminal application and go to the folder created above (using cd command)
Run atos -arch armv7 -o APPNAME.app/APPNAME MEMORY_LOCATION_OF_CRASH. The memory location should be the one at which the app crashed as per the report.
Ex: atos -arch armv7 -o 'APPNAME.app'/'APPNAME' 0x0003b508
This would show you the exact line, method name which resulted in crash.
Ex: [classname functionName:]; -510
Symbolicating IPA
if we use IPA for symbolicating - just rename the extention .ipa with .zip , extract it then we can get a Payload Folder which contain app. In this case we don't need .dSYM file.
Note
This can only work if the app binary does not have symbols stripped. By default release builds stripped the symbols. We can change it in project build settings "Strip Debug Symbols During Copy" to NO.
More details see this post
You can choose "Exception Breakpoint..." in Breakpoint panel, and then choose "All exceptions".
I did a manually install of the Firebase SDK to my iOS project. Following the instruction from README.md
I included all the files from the Analytics folder:
FirebaseAnalytics.framework
FirebaseInstanceID.framework
GoogleInterchangeUtilities.framework
GoogleSymbolUtilities.framework
GoogleUtilities.framework
And I included "import FirebaseAnalytics" to my AppDelegate. and then I called:
FIRApp.configure()
But Xcode is still telling me this:
*** Terminating app due to uncaught exception 'com.firebase.core', reason: '[FIRApp configure] Firebase Analytics is not available.'
*** First throw call stack:
(
0 CoreFoundation 0x0000000104178d85 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x0000000106761deb objc_exception_throw + 48
2 CoreFoundation 0x0000000104178cbd +[NSException raise:format:] + 205
3 helloworld 0x0000000103f17190 -[FIRApp configureCore] + 325
4 helloworld 0x0000000103f16bb1 +[FIRApp addAppToAppDictionary:] + 100
5 helloworld 0x0000000103f162e2 +[FIRApp configureDefaultAppWithOptions:sendingNotifications:] + 268
6 helloworld 0x0000000103f16027 +[FIRApp configure] + 302
7 helloworld 0x0000000103ee9d81 _TFC6mognet11AppDelegate11applicationfTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVs10DictionaryCSo8NSObjectPs9AnyObject____Sb + 97
8 helloworld 0x0000000103ee9ea4 _TToFC6mognet11AppDelegate11applicationfTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVs10DictionaryCSo8NSObjectPs9AnyObject____Sb + 180
9 UIKit 0x00000001051a49ac -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272
10 UIKit 0x00000001051a5c0d -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3415
11 UIKit 0x00000001051ac568 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1769
12 UIKit 0x00000001051a9714 -[UIApplication workspaceDidEndTransaction:] + 188
13 FrontBoardServices 0x00000001091bd8c8 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 24
14 FrontBoardServices 0x00000001091bd741 -[FBSSerialQueue _performNext] + 178
15 FrontBoardServices 0x00000001091bdaca -[FBSSerialQueue _performNextFromRunLoopSource] + 45
16 CoreFoundation 0x000000010409e301 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17 CoreFoundation 0x000000010409422c __CFRunLoopDoSources0 + 556
18 CoreFoundation 0x00000001040936e3 __CFRunLoopRun + 867
19 CoreFoundation 0x00000001040930f8 CFRunLoopRunSpecific + 488
20 UIKit 0x00000001051a8f21 -[UIApplication _run] + 402
21 UIKit 0x00000001051adf09 UIApplicationMain + 171
22 helloworld 0x0000000103eea832 main + 114
23 libdyld.dylib 0x000000010722592d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb)
What am I doing wrong here? FYI. I am running Xcode Version 7.3.1 and I have the latest SDK.
Did you add the -ObjC flag in "Other Linking Flags" setting? When I did this in my Objective-C project, the app stopped crashing when trying to load Firebase. I also included all the Firebase files, used the Firebase.h header and [FIRApp configure] to call Firebase.
I am running Xcode 8.