I get the following error when running the script to upload symbol files (everytime I try and build my project):
upload-sym-util.bash:351: error: symbolFileUploadLocation: The API Key and the authentication
credential are from different projects.
Here is my build script:
if [ "$CONFIGURATION" == "Debug" ]; then
GOOGLE_APP_ID=<app-id>
"${PODS_ROOT}"/FirebaseCrash/upload-sym "${SRCROOT}"/<app>/Firebase/CrashReportingKey-Dev.json
else
GOOGLE_APP_ID=<app-id>
"${PODS_ROOT}"/FirebaseCrash/upload-sym "${SRCROOT}"/<app>/Firebase/CrashReportingKey.json
fi
Things I've done/checked:
- The
GOOGLE_APP_ID
and CrashReportingKey*.json
are associated with the same project.
- My
GoogleService-Info*.plist
files have the API_KEY
field.
- Checking "Run script only when installing" box, which allows me to run the app, but doesn't actually run the script in a development environment. So crashes are sent to Firebase, but they aren't symbolicated.
I'm open to any ideas. Thanks!
You are correct that there's no way to override the GoogleService-Info.plist. However there's still a way to override the pieces of information the upload script uses from that file.
- Open the GoogleService-Info.plist corresponding to the .json.
- Search for GOOGLE_APP_ID and API_KEY.
Adjust the build script like so:
export FIREBASE_APP_ID=<GOOGLE_APP_ID>
export FIREBASE_API_KEY=<API_KEY>
"${PODS_ROOT}"/FirebaseCrash/upload-sym "ServiceAccount.json"
In your case, your final script should look something like:
if [ "$CONFIGURATION" == "Debug" ]; then
export FIREBASE_APP_ID=<app-id>
export FIREBASE_API_KEY=<API_KEY for dev>
"${PODS_ROOT}"/FirebaseCrash/upload-sym "${SRCROOT}"/<app>/Firebase/CrashReportingKey-Dev.json
else
export FIREBASE_APP_ID=<app-id>
export FIREBASE_API_KEY=<API_KEY for release>
"${PODS_ROOT}"/FirebaseCrash/upload-sym "${SRCROOT}"/<app>/Firebase/CrashReportingKey.json
fi
I resolved :
in terminal :
rm $HOME/Library/Preferences/com.google.SymbolUpload*
Xcode :
Product -> Clean
The issue is with the name of GoogleService-Info.plist
file.
In my project, I had the following files:
GoogleService-Info.plist
GoogleService-Info-Dev.plist
CrashReportingKey.json
CrashReportingKey-Dev.json
Firebase Crash Reporting upload script always looks for a file named GoogleService-Info.plist
exactly. Since it found one, and I was telling the script to use CrashReportingKey-Dev.json
, it threw the project mismatch error.
From my research, there is no way to tell the Firebase Crash Reporting upload script which *Info.plist
file you want to use, so I have decided to only upload symbol files for release builds, which is fine.
My run script is now the following, and works as it should.
if [ "$CONFIGURATION" == "Release" ]; then
GOOGLE_APP_ID=<app-id>
"${PODS_ROOT}"/FirebaseCrash/upload-sym "${SRCROOT}"/<app>/Firebase/CrashReportingKey.json
fi
I then removed CrashReportingKey-Dev.json
from my project.
In my case, I had to reset my OAuth credentials by running this command :
rm $HOME/Library/Preferences/com.google.SymbolUpload*
as described here : https://firebase.google.com/docs/crash/ios
Works fine for me now !
I have this error today.
And I found this config, simply replace this GOOGLE_APP_ID with the value in your GoogleService-Info.plist
View image here, sorry I don't have permission to post image
Replace GOOGLE_APP_ID