iOS - Firebase Crash Reporting issue - ios

I have gone through this doc line by line.
https://firebase.google.com/docs/crash/ios
And I got the crash reported successfully.
But when I uploaded my code to git , other user get crash complaining upload-sym.
Because doc says to add the following to run script:
# 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"
I guess the error is due to that path to my private key "ServiceAccount.json"
Because I have my own path for that private key , but the another person will get my path to private key which is not possible .
So, can anyone tell where should I place that private key to excuse this error.

Place your ServiceAccount.json to root of your project,
and then give path as
"${PODS_ROOT}"/FirebaseCrash/upload-sym "$SRCROOT/ServiceAccount.json"
This will work for all your users.
Although it is not recommended to share your ServiceAccount.json to other user other than your team members.

Related

How to find Firebase Crashlytics initialization file paths and double check that they work?

I am following the instructions for enabling Firebase crashlytics on on iOS. There are a lot of file paths that I am not sure how to correctly resolve. The tutorial also says check Device Logs for checking if the script correctly uploaded dSYM files, but I can't see anything pertaining to this script in my device logs. Any advice?
Do I leave these paths as is for a default build or should I always be customizing them?
1. Script Path
Who sets this ${PODS_ROOT}? How can I print it to make sure it's correct?
"${PODS_ROOT}/FirebaseCrashlytics/run"
2. dSYM Path
Same question as above, but for ${DWARF_DSYM_FOLDER_PATH}.
${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Resources/DWARF/${TARGET_NAME}
3. Info.plist Path
$(SRCROOT)/$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)
4. How to check for correctness?
Am I correct in reading that this should show up in device logs?
Your device logs display the Firebase verification that initialization is complete.
Those default paths are correct, and do not need to be modified per release. They will always target the correct dSYM and root folder if you leave them as is. You can customize them to follow a specific upload path following these instructions, if you prefer.
In regards to initialization, yes in your device log, the Firebase SDK will indicate when it has been initialized. You can expect to see something like this "FirebaseCrashlytics: Initializing Crashlytics 17.2.2"

Firebase crash error: symbolFileMappings:upsert: Request contains an invalid argument

I have done all the required steps in https://firebase.google.com/docs/crash/ios to setup firebase crash reporting for my project. Then I set the run script as follow:
#Replaced GOOGLE_APP_ID
GOOGLE_APP_ID=1:app:Id
#Replaced the Path to serviceAccount.json
"${PODS_ROOT}"/FirebaseCrash/upload sym"${SRCROOT}/myProjectFolder/ServiceAccount.json"
I have read all the available links about firebase crash installing some said to check the "Run script only when installing", this will remove the error but will not send the crash to firebase console. On the other hand when I check "Show environment variables in build log" only I get the following error:
/Users/test/Documents/Projects/myproject/Pods/FirebaseCrash/upload-sym-util.bash:377: error: symbolFileMappings:upsert: Request contains an invalid argument.
Xcode 8.2.1
Actually I have done all these steps in another project and it works fine but I have problem in this project. Is there any reason for this error?
I am not sure but if you try then your problem may be solved.
accept ToS at https://console.cloud.google.com/
Give "Editor" role to your Service Account created for uploading symbols as described here https://firebase.google.com/docs/crash/ios#set_up_crash_reporting

Firebase Crash Reporting iOS - Unreadable Crashes - Upload Symbol Files?

I'm trying to integrate Firebase Crash reporting for my iOS app. I am using Xcode 8.1, Swift 3 and the latest Firebase Crash reporting version as of 29/11/16.
I have installed Firebase Crash reporting via Cocoapods and have I gone through the limited setup guide from the documentation shown below where I added a run script with my Google App ID and the path to my Google Crash Key son file (Service account)
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"
I am not sure if I have implemented the second step correctly. I did this
"${PODS_ROOT}"/FirebaseCrash/upload-sym "${SRCROOT}/******/GoogleCrashKey.json"
The problem I have is that my app crash reports are pretty unreadable. I believe I either need to upload a symbol file or I have got the second step wrong.
How would I upload the symbol files for crash reporting. I get this instruction when pressing the upload symbol file option in the Firebase Crash reporting console. However I am unsure how to implement it.
1: Using the command line, navigate to your Xcode project folder and run the following:
./Pods/FirebaseCrash/batch-upload < service-account-file > my_UUID
Any help would be great.
Thank you
I was making a mistake when I was trying to implement the second step. I had the Speech marks in the wrong place and had the whole file path as a string :(.
instead of doing this:
"${PODS_ROOT}"/FirebaseCrash/upload-sym "${SRCROOT}/******/GoogleCrashKey.json"
I changed it to this:
"${PODS_ROOT}"/FirebaseCrash/upload-sym "${SRCROOT}" /******/GoogleCrashKey.json"
My crash report now looks like the following:
Thanks for the help Martin. Much appreciated.
I had the same problem with the Firebase log - a bunch of unreadable information. After adding the symbol file, it worked fine.
Just in case someone is wondering how to add the symbol file, here is the link.

Firebase crashes unreadable

I have a problem reading crash reports on FireBase, my reports look like:
I've already followed these instructions to symbolicate the stacktrace, got the same result.
I'm using Xcode 8
My app is made in Swift 3
Already wrote "FIRApp.configure()" in my
appDelegate.didFinishLaunchingWithOptions method, did make it crash, deattach the debbuger, fix the error, re-run the app, got message "Crash successfully uploaded", etc...
I'm using pods(pod 'Firebase' and pod 'Firebase/Crash')
I see in the FireBase console my events and crashes(just are
unreadable)
Installed the script for symbolicate automatically on build(see image):
Already downloaded FireBase provided examples(crash example does not include the scripting for symbolicate automatically)
Already followed this solutions(which didn't work):
link1
link2
and many others.
Already visited last 6 months links on stackoverflow and google groups with this problem.
Nothing has worked, help please!!!
Update#1: I received an email from firebase-support#google.com saying:
reset your OAuth credentials
Didn't work, also I've been testing the script and the upload is correct, I'm starting to think is a Firebase bug
Your upload script doesn't appear to be setting the GOOGLE_APP_ID var.It should something like:
# Replace this with the GOOGLE_APP_ID from your GoogleService-Info.plist file
1:xxxxxxxxx:ios:xxxxxxxxxxx=1:my:app:id
# Replace the /Path/To/ServiceAccount.json with the path to the key you just downloaded
"${PODS_ROOT}"/FirebaseCrash/upload-sym "firebasecrash/firebasecrashreport.json"
Here firebasecrashreport.json is name of ServiceAccount JSON file and firebasecrash is name of my project.
Your upload script doesn't appear to be setting the GOOGLE_APP_ID env var. The upload run script step should look something like the following:
# Replace this with the GOOGLE_APP_ID from your GoogleService-Info.plist file
GOOGLE_APP_ID=1:1234567890123:ios:1234abc567de89
# Replace the /Path/To/ServiceAccount.json with the path to the key you just downloaded
"${PODS_ROOT}"/FirebaseCrash/upload-sym "/Users/yourname/yourproject/Your Project Name-5632e387efda6.json"
The below question I answered is a problem similar to yours.
Firebase iOS multiple errors when uploading symbol files
Finally, eureka!
I'm not sure about what was the mistake but I paste it here in case anyone is experiencig the same error:
1) I deleted my app on Firebase console
2) Create in Firebase console a new app with different name
3) Create and download a new GoogleService-Info.plist
4) Delete previous keys(rm $HOME/Library/Preferences/com.google.SymbolUpload*)
5) Create new firebase crash configuration
6) Copy the obtained file on step 5 to my root path on my project
7) Enable all permissions in firebase scripts
chmod -R 777 ./Pods/FirebaseCrash
8) Added the script phase as mentioned in the firebase configuration link mentioned in step 5 (I noticed that my not working previous configuration had blank spaces in name, so I created a non blank spaces name)
And finally(I don't know exactly wy) is working:

Publish Android Application does not work

Just created an .apk with the Publish Android Application option, created a keystore with key and uploaded to the Google Play app store. Everything worked, but when I tried to download the app from the app store i got an error message resembling "The application has an incorrect signature". I thought the "Publish Android Application" part of Xamarin.Studio was supposed to fix everything?
I ran the following command on the .apk afterwards: jarsigner -verify -verbose -certs app.apk At the bottom it said the following: This jar contains entries whose certificate chain is not validated.
Please help, would love to have the app out today :)
My problem was simple. XamarinStudio was setup to use Java1.7, setting it to use Java1.6 fixed it :)

Resources