Unreadble errors with Firebase Crash Reporting on ios (Symbol files) - ios

I'm using firebase crash reporting to get crash on my iphone project.
But the logs that I receive are not readable :
Exception name: EXC_BREAKPOINT / EXC_ARM_BREAKPOINT
TPC_swift
4295841940 + 284820
TPC_swift
4295841344 + 284224
TPC_swift
4296852240 + 1295120
libdispatch.dylib
_dispatch_call_block_and_release + 5304
libdispatch.dylib
_dispatch_client_callout + 5240
libdispatch.dylib
_dispatch_main_queue_callback_4CF + 27520
CoreFoundation
__CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 920908
CoreFoundation
__CFRunLoopRun + 912308
9
CoreFoundation
CFRunLoopRunSpecific + 35916
GraphicsServices
GSEventRunModal + 49284
UIKit
UIApplicationMain + 516228
TPC_swift
4295904544 + 347424
libdyld.dylib
start + 10420
This is an issue with firebase or apple errors ?
In my Build Phases on my project, I have this script :
# Replace this path with the path to the key you just downloaded
JSON_FILE=/*****/TPC_Swift/TPC_swift/TPC_swift/Project-*****.json
# Replace this with the GOOGLE_APP_ID from your GoogleService-Info.plist file
GOOGLE_APP_ID=1:*********:ios:***************
defaults write com.google.SymbolUpload version -integer 1 # creates file if it does not exist
JSON=$(cat "${JSON_FILE}")
/usr/bin/plutil -replace "app_${GOOGLE_APP_ID//:/_}" -json "${JSON}" "$HOME/Library/Preferences/com.google.SymbolUpload.plist"
"${PODS_ROOT}"/FirebaseCrash/upload-sym
Thank you
EDIT :
On firebase, I have :
Upload symbol file to symbolicate future stack traces for UUID
68FD2AAC-F8A7-***********
I think the issue is linked to the symbol files
How to solve this ?
EDIT 2 :
I tried "dwarfdump --uuid /path/to/your/build/area/MyApp.app/MyApp"
but I can not retrieved this UUID...

Facing the same issue, this is what I got from firebase-support#google.com:
Thanks for waiting. Can you go over the following items and see it will work:
reset your OAuth credentials, run below command:
rm $HOME/Library/Preferences/com.google.SymbolUpload*
create new service account and make sure it has editor permission
Revise your script into below format:
# Replace this with the GOOGLE_APP_ID from your GoogleService-Info.plist file
GOOGLE_APP_ID=1:my:app:id
# Replace the /Path/To/ServiceAccount.json with the path to the key you just downloaded
"${PODS_ROOT}"/FirebaseCrash/upload-sym "/Path/To/ServiceAccount.json"
Please make sure your app id and json file path are correct.
I hope this helps. Let me know if you have other concern.

Did you find the answer for your question?
Your script seems to be a little different than the one recommended at the Firebase doc today (Sep 18 2016).
Have you tried this one?
# Replace this with the GOOGLE_APP_ID from your GoogleService-Info.plist file
GOOGLE_APP_ID=1:my:app:id
# Replace the /Path/To/ServiceAccount.json with the path to the key you just downloaded
"${PODS_ROOT}"/FirebaseCrash/upload-sym "/Path/To/ServiceAccount.json"

Related

All framework error when launch framework/Info.plist: No such file or directory

I have a project on react native,
I'm Stack all day with this error I try a lot of things but nothing works, build successfully but the application is not launched on device or simulator here is the error I got
Could not install at this time.
Failed to load Info.plist from bundle at path /Users/BT/Library/Developer/CoreSimulator/Devices/32A76497-8C7B-4639-B3F9-80379AF5CB9A/data/Library/Caches/com.apple.mobile.installd.staging/temp.SEVqpI/extracted/XXXXXX.app/Frameworks/RCTVibration.framework; Extra info about Info.plist: Couldn't stat /Users/BT/Library/Developer/CoreSimulator/Devices/32A76497-8C7B-4639-B3F9-80379AF5CB9A/data/Library/Caches/com.apple.mobile.installd.staging/temp.SEVqpI/extracted/XXXXX.app/Frameworks/RCTVibration.framework/Info.plist: No such file or directory
Even I reset to the old version of the project witch worked perfectly I'm getting the error
When I add a info.plist to RCTVibration other library has the same problem as 20 library
I tried to clean project, close xcode, delete derived data, restart Mac i tried Embded Framework copy only when installing ... but still stuck i can't delete use_frameworks! because i have dynamic and no dynamic framework
On device i'm getting a different error :
Details
Unable to install "XXXXX"
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653103
Could not inspect the application package.
Domain: com.apple.dt.MobileDeviceErrorDomain
Code: -402653103
User Info: {
DVTRadarComponentKey = 282703;
MobileDeviceErrorCode = "(0xE8000051)";
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x0000000129dbe93f DTDKCreateNSErrorFromAMDErrorCode + 220
1 DTDeviceKitBase 0x0000000129dfd124 __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 155
2 DVTFoundation 0x000000010d9a1b43 DVTInvokeWithStrongOwnership + 71
3 DTDeviceKitBase 0x0000000129dfce65 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1440
4 IDEiOSSupportCore 0x0000000129c6dd28 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.292 + 3513
5 DVTFoundation 0x000000010dad02aa DVT_CALLING_CLIENT_BLOCK + 7
6 DVTFoundation 0x000000010dad1ecc __DVTDispatchAsync_block_invoke + 1191
7 libdispatch.dylib 0x00007fff6d0416c4 _dispatch_call_block_and_release + 12
8 libdispatch.dylib 0x00007fff6d042658 _dispatch_client_callout + 8
9 libdispatch.dylib 0x00007fff6d047c44 _dispatch_lane_serial_drain + 597
10 libdispatch.dylib 0x00007fff6d0485d6 _dispatch_lane_invoke + 363
11 libdispatch.dylib 0x00007fff6d051c09 _dispatch_workloop_worker_thread + 596
12 libsystem_pthread.dylib 0x00007fff6d29ca3d _pthread_wqthread + 290
13 libsystem_pthread.dylib 0x00007fff6d29bb77 start_wqthread + 15
);
}
System Information
macOS Version 10.15.7 (Build 19H2)
Xcode 12.0.1 (17220)
any help will be appreciated
I tried even uninstall xcode and install again another version, also pull project git on a new location, create new simulator, restart device nothing worked
What worked for is adding for every framework, click on choose info.plist file like image show it and pods-Project-info.plist and it will be filled with correct information
It's not the best solution because it takes me a lot of time to associate all plist file, but it's the only solution that worked for me
Try running your project with npx react-native run-ios.
After hours of struggling and trying everything I found (cleaning derived data, erasing content and settings of simulators, reinstalling Xcode...)
This is the only thing that made it work, I was even able to build with Xcode after running the build with npx.
I was getting a similar error even after the builds passed and the simulator popped up. But the app was prevented from opening as it seems there was some .plist file missing in the frameworks.
I rechecked and set the Embed mode to "Do not Embed" for each of the frameworks added in the .xcworkspace target > General.
I also might had Clean the build folder (Cmd + Shift + K), closed the xcode, deleted DerivedData, pod deintegrate && pod update before shooting the Run in xcode again.
Other Info: Xcode-13.2.1, React Native project, M1Pro mac, Xcode running in Rosetta, Excluded Architecture - arch64 (in target & project Build Settings)
Clean drive data in XCODE preferences, clean and then rebuild the project. Hope it works!
One probable solution is following the steps:
Run pod install command in your terminal
Before installing App again delete content of your Derived Data
folder
Build and run to install the app.
Moreover if the above 2 steps doesn't work the try removing use_frameworks! from your Podfile and follow steps 1 & 2.
I also tried all the methods mentioned above, but they didn't work, and when I debugged all the Cocoapod and XcodeProj in Ruby, it was confirmed that the problem occurred due to the special setting. It may be a unique case, but it is very simple to check, so I recommend you to try it...
if ENV['INFOPLIST_FILE'] has a file for any Info.plist,
CocoaPods doesn't make Info.plist for Pod targets.
reference: https://github.com/CocoaPods/Xcodeproj/blob/29cd0821d47f864abbd1ca80f23ff2aded0adfed/lib/xcodeproj/project/object/build_configuration.rb#L115
I put this phrase in for the test and I was able to confirm that the file existed.
puts "#{ENV['INFOPLIST_FILE']}"
Finally, I could solved adding this line on top of Podfile.
ENV['INFOPLIST_FILE'] = nil
By the way, I don't know how I ended up assigning a specific Info.plist file to ENV...

Step to configure ML Kit library model in podfile - flutter apps

I am new in using ios, and right now I am using this package https://pub.dev/packages/firebase_ml_vision to do face detection... here is said that
If you're using one of the on-device APIs, include the corresponding ML Kit library model in your Podfile. Then run pod update in a terminal within the same directory as your Podfile. and right now I am using 'Firebase/MLVisionFaceModel' and I need to do pod 'Firebase/MLVisionFaceModel'... since I am new in using ios, I am trying to find a tutorial how to configure it in ios, but I still don't find yet... what I don't understand here is how to include the corresponding ML Kit library model in my Podfile... should I edit it inside Xcode or inside ios folder in my flutter project?... is anyone here know how step by step to configure it?
and here is what I get when I didn't set that up
Xcode build done. 26.9s
Configuring the default Firebase app...
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23c7127e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48
2 CoreFoundation 0x00007fff23c710bc +[NSException raise:format:] + 188
3 Runner 0x00000001064aafca +[FIRApp configure] + 138
4 Runner 0x0000000106a6dab6 -[FLTFirebaseMlVisionPlugin init] + 214
5 Runner 0x0000000106a6d8f3 +[FLTFirebaseMlVisionPlugin registerWithRegistrar:] + 211
6 Runner 0x00000001064a5bf5 +[GeneratedPluginRegistrant registerWithRegistry:] + 309
7 Runner <…>

Trouble reading output console Flutter

I'm following the tutorial on flutter_bloc firebase login.
First I tried downloading the repo, adding my reversed Key in the Info.plist, my own GoogleService_Info.plist and launching the example it works.
Then I started again from scratch, but I get this output which I can't understand and the app doesn't start on iPhone simulator:
Xcode build done. 41.0s
Configuring the default Firebase app...
*** First throw call stack: ( 0 CoreFoundation 0x00000001082e46fb __exceptionPreprocess + 331 1 libobjc.A.dylib
0x0000000107888ac5 objc_exception_throw + 48 2 CoreFoundation
0x00000001082e4555 +[NSException raise:format:] + 197 3 Runner
0x0000000103ae64da +[FIRApp configure] + 138 4 Runner
0x0000000103bdae86 -[FLTFirebaseAuthPlugin init] + 214 5 Runner
0x0000000103bdac38 +[FLTFirebaseAuthPlugin registerWithRegistrar:] +
184 6 Runner 0x0000000103a8bbc0
+[GeneratedPluginRegistrant registerWithRegistry:] + 112 7 Runner <…>
I did put the reverse Key in the Info.plist and added my own GoogleService-Info.plist file in Runner but my app version doesn't start..
Actually when looking for the URL where to put the reverse Key I didn't see any, so I added it myself. Can it be a lead to where something gone wrong?
Thank you very much
OK found the problem.. Th GoogleService-Info.plist MUST be added to Runner through Xcode.. I must have just used Finder instead ..
Hope it helps others
Cheers

Xcode11 : Unable to install “AppName”

If you try to run the app on a real device
The following error appears and cannot be executed.
Why does this happen?
Are there any settings that should be reviewed?
Issue Details
Unable to install "AppName"
Domain: com.apple.dtdevicekit
Code: -402653103
--
App installation failed
Domain: com.apple.dtdevicekit
Code: -402653103
Failure Reason: Could not inspect the application package.
User Info: {
DVTRadarComponentKey = 487927;
"com.apple.dtdevicekit.stacktrace" = (
0 DTDeviceKitBase 0x0000000122d066e7 DTDKCreateNSError + 109
1 DTDeviceKitBase 0x0000000122d06de9 DTDK_AMDErrorToNSError + 792
2 DTDeviceKitBase 0x0000000122d4656a __90-[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:]_block_invoke + 164
3 DVTFoundation 0x0000000108a03156 DVTInvokeWithStrongOwnership + 73
4 DTDeviceKitBase 0x0000000122d46301 -[DTDKMobileDeviceToken installApplicationBundleAtPath:withOptions:andError:withCallback:] + 1589
5 IDEiOSSupportCore 0x0000000122bcea25 __118-[DVTiOSDevice(DVTiPhoneApplicationInstallation) processAppInstallSet:appUninstallSet:installOptions:completionBlock:]_block_invoke.352 + 4523
6 DVTFoundation 0x0000000108b343ba __DVT_CALLING_CLIENT_BLOCK__ + 7
7 DVTFoundation 0x0000000108b35a92 __DVTDispatchAsync_block_invoke + 809
8 libdispatch.dylib 0x00007fff588ea5f8 _dispatch_call_block_and_release + 12
9 libdispatch.dylib 0x00007fff588eb63d _dispatch_client_callout + 8
10 libdispatch.dylib 0x00007fff588f18e0 _dispatch_lane_serial_drain + 602
11 libdispatch.dylib 0x00007fff588f2396 _dispatch_lane_invoke + 385
12 libdispatch.dylib 0x00007fff588fa6ed _dispatch_workloop_worker_thread + 598
13 libsystem_pthread.dylib 0x00007fff58b2b611 _pthread_wqthread + 421
14 libsystem_pthread.dylib 0x00007fff58b2b3fd start_wqthread + 13
);
}
--
Tried
Provisioning profile has been recreated.
Installed the created profile on the device.
Cleaned the project.
Deleted data in ~ / Library / Developer / Xcode / DerivedData.
Environment
Xcode : 11.2.1
macOS : 10.14.6 Mojave
Device : iPhoneX
iOS : 13.1.2
Try to build for another device, then retry with the first one.
I know this is not a real solution but that was the only what worked for me.
Also I made a bug report with Apple feedback Assistant, I will update you if the gave a proper solution or response.
Update #1:
After Apple checked my sysdiagnose it was the following for me:
The app is malformed. The file at "$(PRODUCT_MODULE_NAME).app/Frameworks/SwiftyJSON.framework/Info.plist" is missing. Frameworks must be valid bundles with an Info.plist.
My current fix:
Clean Build Folder
Remove Derived Data (use DevCleaner)
Commit all changes to git
Delete Xcode project folder
Discard uncommitted changes
Pod install
Rebuild and cross fingers
As a 0. element I will insist you to make your coffee and take a snack ...
Update #2:
Now I fell into a hole where nothing above helped.
But for me, it looks like the issues framework is SwiftyJSON.
I made an issue, maybe someone has a proper solution.
Update #3:
I managed to build my project using Xcode Version 11.0 (11A420a) while using the latest command line tools from Xcode 11.3 (11C29).
Update #4:
I still got this mess after changing branches, this is the latest fix order for me, which works like 90% of the time ... the other 10% is due to a missed step I guess.
Clean Build Folder
Remove Derived Data (use DevCleaner)
Pod deintegrate
Pod install
Rebuild and cross fingers
Hello rebuilding(clean) the App helped me.
I face same issue. I checked i was using production professional profile then i select automatically manage sign.
It's work for me.
I'm on Apple M1, Device iOS 14.6, xcode 12.5.1
In my case Deleting project, Derived data, clean project, deinit & init pod, Delete project folder & clone it again nothing was worked out. But when I removed SwiftyJSON pod & install pod then install app on Device it was working. Then I add SwiftyJSON pod again & install pod so it was working fine. It's strange.
Before removing SwiftyJSON I had got Firebase/Crashlytics pod error which was suggesting me to run this command pod repo update.
I also faced this problem at many times:
Best solution: Try to get fresh clone of the project.
Some times below steps will work:
git reset
git checkout .
git clean -fdx
pod cache clean --all
pod install
It was an error that occurred due to a bug in the framework.
If you reinstall the problematic framework correctly
The error has disappeared.
Thank you very much.

Firebase error while configuring app - unrecognized selector sent to class

I'm using Firebase in an iOS app and have two separate Firebase projects, one for production and one for development. My two .plist files are GoogleService-Info.plist and GoogleService-Info-Dev.plist, which I have been able to select based on a flag set in Targets -> Build Settings -> Other Swift Flags.
Inside AppDelegate didFinishLaunchingWithOptions:
#if DEBUG
let buildFor = "DEV"
#else
let buildFor = "PROD"
#endif
let firebasePlistFileName = buildFor == "DEV" ? "GoogleService-Info-Dev" : "GoogleService-Info"
let firebaseOptions = FIROptions(contentsOfFile: NSBundle.mainBundle().pathForResource(firebasePlistFileName, ofType: "plist"))
FIRApp.configureWithOptions(firebaseOptions) // line causing new Firebase error
This has been working fine up until today, when I had a problem with another Cocoapod project. I think it started happening when I cleaned the Xcode project or deleted Derived Data folder:
dyld: Library not loaded: #rpath/OtherPod.framework/OtherPod
Referenced from:
/Users/me/Library/Developer/CoreSimulator/Devices/12345678-E1C4-480F-B1D9-C10823DEA810/data/Containers/Bundle/Application/AE7B6EB0-43AB-CCCC-BBBB-AAAA71BF/MyApp.app/MyApp
Reason: image not found
I eventually resolved that by choosing my app under Targets -> General -> Linked Frameworks and Libraries, then added all of the choices inside the Workspace folder (7 other pod projects) and set those ones I added as optional. Ever since then, I've been facing the error described in the title of this post:
2017-02-10 17:19:29.660 MyApp[12639:182433] +[NSData gtm_dataByGzippingData:error:]: unrecognized selector sent to class 0x10a0442e8
2017-02-10 17:19:29.680 MyApp[12639:182433] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[NSData gtm_dataByGzippingData:error:]: unrecognized selector sent to class 0x10a0442e8'
*** First throw call stack:
(
0 CoreFoundation 0x0000000109d88d4b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00000001097f121e objc_exception_throw + 48
2 CoreFoundation 0x0000000109df8e44 +[NSObject(NSObject) doesNotRecognizeSelector:] + 132
3 CoreFoundation 0x0000000109d0e005 ___forwarding___ + 1013
4 CoreFoundation 0x0000000109d0db88 _CF_forwarding_prep_0 + 120
5 MyApp 0x0000000102d73c9d -[FIRNetwork postURL:payload:queue:usingBackgroundSession:completionHandler:] + 331
6 MyApp 0x0000000102d70e72 -[FIRClearcutLogger sendNextPendingRequestWithCompletionHandler:] + 570
7 MyApp 0x0000000102d70918 -[FIRClearcutLogger sendLogsWithCompletionHandler:] + 447
8 libdispatch.dylib 0x000000010a6ab978 _dispatch_call_block_and_release + 12
9 libdispatch.dylib 0x000000010a6d50cd _dispatch_client_callout + 8
10 libdispatch.dylib 0x000000010a6b2e17 _dispatch_queue_serial_drain + 236
11 libdispatch.dylib 0x000000010a6b3b4b _dispatch_queue_invoke + 1073
12 libdispatch.dylib 0x000000010a6b402b _dispatch_queue_override_invoke + 683
13 libdispatch.dylib 0x000000010a6b6385 _dispatch_root_queue_drain + 720
14 libdispatch.dylib 0x000000010a6b6059 _dispatch_worker_thread3 + 123
15 libsystem_pthread.dylib 0x000000010aa3a712 _pthread_wqthread + 1299
16 libsystem_pthread.dylib 0x000000010aa3a1ed start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
I have tried a lot of different fixes, including adding to the Link Binary with Libraries, adding to the Other Linker Flags, and none of them have worked.
What could the unrecognized selector possibly be, and how would I change/remove it? Could this issue be due to the earlier one I was facing (library not loaded)?
For clarification, when the unrecognized selector sent to class error happens, the Xcode debug navigator is focused on Thread 7, with the FIRApp.configureWithOptions(firebaseOptions) line being highlighted.
Update
I found a temporary fix by reverting to a previous git commit (cloned my repository into a separate directory), then replacing the majority of the project contents from that old commit with the current error-producing copy, including the App-Name folder within root directory, App-Name.xcodeproj, and App-Name.xcworkspace. I only tested on the simulator (iPhone 7 running iOS 10.2), and that worked. I then successfully submitted a build to iTunes Connect and was able to run that build on my device (iPhone 5c with 10.2.1), but after deleting that and attempting to run a build from Xcode, I got the same error again. However, the error did not occur while running on the simulator. This is in contrast to the initial error scenario as it occurred on both physical device and simulator.
This made me remember that the stack trace I initially posted was that of running the app on the simulator. Running it on the device produced less output, specifically the content after *** First throw call stack: is only (0x1d01cdf7 0x1c27f077 0x1d022467 0x1d020579 0x1cf453d8 0x31ff3f 0x31d653 0x31d05d 0x1c57d57 0x1c63e63 0x1c5b205 0x1c64391 0x1c65d9f 0x1c65ba7 0x1c877937 0x1c877490) instead of the more descriptive output with file/function names.
Earlier, I have faced the same issue, I fixed the issue by reinstalling pod.
Please refer to the below-mentioned steps to resolve the issue.
Please make sure that you have added Add two-parameter in Other Linker Flags.
$(inherited)
-ObjC
Cocoapods:
Just install cocoa-pods again in the project. Please refer below command for remove and install pods.
Remove all Framework from project using below command.
pod deintegrate
pod clean
- Install framework using below pod command
pod install
Manual:
If you have added framework Manual in the project then remove it and add it into the project again.
Issue:
You have faced reference issue in your project (framework not found at
Specific Directory).
Hit the Clean and Build project. Everything worked as expected
Make sure GTMNSData+zlib.m from the GoogleToolboxForMac pod is still being built and linked into your app.
Make sure that -ObjC and -framework GoogleToolboxForMac is in the Link log:
To anyone experiencing this problem, while trying to add the firebase frameworks manually. I had the same issue, which was caused by having different versions of firebase. I tried to add additional frameworks as the readme suggested, but experienced the above mentioned error.
I resolved this by removing all the firebase frameworks from the project and build phases. Downloaded the newest version, and re-added all frameworks to the project, and the problem was resolved.
I just typed pod update and then closed out and reopened Xcode afterward. Worked for me.

Resources