Xcode Error with Crash Symbol Upload: symbolFileUploadLocation: The caller does not have permission

浪尽此生 提交于 2019-12-02 17:38:52

You need to first accept ToS at https://console.cloud.google.com/

Then 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

There was a mistake in the documentation: steps were omitted. The role of the "Symbol Upload service account" has to have editor privileges to update the symbol database. The following ("step 1½") should have appeared between steps 1 and 2.

To ensure that the service account has write permission:

  1. On the Permissions page, select IAM from the left menu.
  2. Type "Symbol Upload" into the search box.
  3. The "Symbol Upload service account" must have at least the "Editor" role.

Sorry about the confusion.

let me add to the answers, rename the json file into ServiceAccount.json, drop it into xcode's pods folder and replace google's suggested path with this one, the advantage is the project will be portable if you transfer it to someone else...

# Replace the /Path/To/ServiceAccount.json with the path to the key you just downloaded
"${PODS_ROOT}"/FirebaseCrash/upload-sym "${PODS_ROOT}"/ServiceAccount.json
  1. Ensure that you give the "Symbol Upload service account" the Project > Editor role when you create the service account. The service account will not show up in Permissions > IAM if you neglect to assign a role.
  2. When the Xcode run script executes it creates two files int the $HOME/Library/Preferences/ directory: com.google.SymbolUpload.plist and com.google.SymbolUploadToken.plist. If you create a new service account (or private key), then you need to delete these two files to wipe out your old service account information. Firebase documentation highlights this, but it deserves repeating.

Worked for me if you add it from Service Account screen. Click Permissions and add it as an editor.

For those of you who are confused by the second step of the guide (mentioned in @Robert answer above), you need to be owner of the firebase app to change service accounts.

I was getting a similar error when I tried to use a second Firebase database in my project. However, I forgot that I added crash analytics code to the Run Script that was specific to the first database. Once I deleted the Run Script code in Build Phases, the problem with the symbol upload file went away.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!