无法上传上传符号文件

时间:2016-08-17 08:15:28

标签: ios firebase firebase-crash-reporting

Q1:添加上传脚本后,我的项目构建失败。

JSON_FILE=${PROJECT_DIR}/Blued-i-a3bc95921663.json
GOOGLE_APP_ID=1:XXXXXXXXXX:ios:XXXXXXXXXXX
defaults write com.google.SymbolUpload version -integer 1
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

记录失败:

...
warning: dump_syms: /Users/xiejing/Library/Developer/Xcode/DerivedData/Blued2015-c/Users/xiejing/Library/Preferences/com.google.SymbolUploadToken.plist: Could not modify plist, error: Failed to parse value  with type -json

kgekafhlpbizzczluukmcxwihwk/Build/Products/Debug-iphoneos/Blued2015.app.dSYM/Contents/Resources/DWARF/Blued2015: in compilation unit '/Users/xiejing/workspace/Blued2015/Blued-International-iOS/Blued/Blued/Blued2015/ThirdPart/libs/zxing/source/oned/Code128Reader.cpp' (offset 0x58c5ec):

....

warning: dump_syms: /Users/xiejing/Library/Developer/Xcode/DerivedData/Blued2015-ckgekafhlpbizzczluukmcxwihwk/Build/Products/Debug-iphoneos/Blued2015.app.dSYM/Contents/Resources/DWARF/Blued2015: in compilation unit '/Users/xiejing/workspace/Blued2015/Blued-International-iOS/Blued/Blued/Blued2015/ThirdPart/libs/zxing/source/common/BitArray.cpp' (offset 0x99deed):
warning: dump_syms:        /Users/xiejing/Library/Developer/Xcode/DerivedData/Blued2015-ckgekafhlpbizzczluukmcxwihwk/Build/Products/Debug-iphoneos/Blued2015.app.dSYM/Contents/Resources/DWARF/Blued2015: in compilation unit 'Blued2015/ThirdPart/libs/zxing/source/ResultPoint.cpp' (offset 0x9a6c2e):
Command /bin/sh failed with exit code 1

Q2:我手动上传时也失败了。

$/Pods/FirebaseCrash/batch-upload BF574806-B49C-3B5B-A17F-558534AF82FC
>/Users/xiejing/Library/Preferences/com.google.SymbolUploadToken.plist: Could not modify plist, error: Failed to parse value  with type -json

1 个答案:

答案 0 :(得分:0)

我建议尝试一些事情:

  1. 清除上传脚本使用的缓存文件:

    rm $HOME/Library/Preferences/com.google.SymbolUpload*
    
  2. 创建一个新的服务帐户并确保它具有编辑器 允许。请参阅(更新)说明 https://firebase.google.com/docs/crash/ios。下载 对应的密钥

  3. 确保您拥有最新的Firebase崩溃窗格(1.0.7开头) 这篇文章)。

  4. 将脚本更新为以下内容(也在上面提到 docs链接)

    # 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 ust downloaded
    "${PODS_ROOT}"/FirebaseCrash/upload-sym" /Path/To/ServiceAccount.json"        
    
  5. 希望这会有所帮助