swift 当FirebaseCrashlytics构建阶段运行脚本中的upload-symbols时,Xcode构建永远不会完成

llycmphe  于 2023-04-28  发布在  Swift
关注(0)|答案(3)|浏览(239)

我已经在我的应用程序中应用Firebase Crashlytics。我在运行脚本中,在Xcode中的Build Phases下实现了以下内容:

我也配置到构建设置:

和Xcode构建时收到的消息:
Running upload-symbols in Build Phase mode
Validating build environment for Crashlytics...
Validation succeeded. Exiting because upload-symbols was run in validation mode Fetching upload-symbols settings...
Command PhaseScriptExecution failed with a nonzero exit code
是否有人成功地在他们的运行脚本中实现了upload-symbols脚本?你知道为什么我的“构建”会拖延而且永远不会完成吗

1l5u6lss

1l5u6lss1#

你不需要“调用upload-symbols”(脚本中的第二行),你应该只调用“run”。对于运行,还为脚本添加2个输入文件:

./GoogleService-Info.plist //path to your plist
"${DWARF_DSYM_FOLDERPATH}/${DWARF_DSYM_FILE_NAME}"

您还可以添加--debug参数来运行,以验证它是否找到正确的dsym文件位置“${PODS_ROOT}/FirebaseCrashlytics/run --debug”
如果您查看Firebase\FirebaseCrashlytics\run,您将看到以下内容:

# This script calls upload-symbols twice:
#
# 1) First it calls upload-symbols synchronously in "validation" mode. If the
#    script finds issues with the build environment, it will report errors to Xcode.
#    In validation mode it exits before doing any time consuming work.
#
# 2) Then it calls upload-symbols in the background to actually send the build
#    event and upload symbols. It does this in the background so that it doesn't
#    slow down your builds. If an error happens here, you won't see it in Xcode.
zc0qhyus

zc0qhyus2#

几天前我遇到了同样的问题,升级Firebase到最新版本解决了这个问题。

rbpvctlc

rbpvctlc3#

//参见项目“granite”

错误:

Running upload-symbols in Build Phase mode
Validating build environment for Crashlytics...
Processing dSYMs...
Command PhaseScriptExecution failed with a nonzero exit code


2023-04-25 22:08:31.703 upload-symbols[23280:103455] Unable to get file attributes for dSYM file at path "/Users/abdallahandroid/Library/Developer/Xcode/DerivedData/Runner-gefdrreutulmdwdzwzzvbbjmuntb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/App.framework.dSYM/Contents/Resources/DWARF"
2023-04-25 22:08:32.709 upload-symbols[23280:103455] Unable to get file attributes for dSYM file at path "/Users/abdallahandroid/Library/Developer/Xcode/DerivedData/Runner-gefdrreutulmdwdzwzzvbbjmuntb/Build/Intermediates.noindex/ArchiveIntermediates/Runner/BuildProductsPath/Release-iphoneos/App.framework.dSYM/Contents/Resources/DWARF"
Running upload-symbols in Build Phase mode
Validating build environment for Crashlytics...
Processing dSYMs...

修复:

1-更新项目依赖包
2-使您的flutter版本是最后更新稳定版本
3-更新你的mac和xcode到最新版本
4-flutter clean和pub get命令
5-首先删除旧pod:

pod deintegrate
pod cache clean --all

6-净Flutter

flutter clean
flutter pub get 
flutter pub upgrade

7-重新安装pod

pod install

相关问题