Firebase Crashlytics:上传缺少的 dSYM 以查看 1 个版本的崩溃情况。(iOS)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/48296774/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Firebase Crashlytics: Upload missing dSYMs to see crashes from 1 versions.(iOS)
提问by jazzbpn
Error Message:Upload missing dSYMs to see crashes from 1 versions. Versions affected: 1.0 (1)
错误消息:上传丢失的 dSYM 以查看 1 个版本的崩溃情况。受影响的版本:1.0 (1)
I am trying to implement Firebase Crashlytics in my iOS project. I did all the setups according to Firebase Crashlytics Doucmentation. The crash is performed manually when the button is clicked just to see whether the crashlytics is working.
我正在尝试在我的 iOS 项目中实施 Firebase Crashlytics。我根据Firebase Crashlytics Doucmentation进行了所有设置。当单击按钮时手动执行崩溃只是为了查看 crashlytics 是否正常工作。
@IBAction func onTestCrashButtonClick(_ sender: UIButton) {
Crashlytics.sharedInstance().crash()
}
But when i tried to see the error report in the firebase console, it shows something like this image.
但是当我尝试在 firebase 控制台中查看错误报告时,它显示了类似于此图像的内容。
After reading Get Deobfuscated crash reportsI just Set Debug Information Format to DWARF with dSYM Filelike below but the problem not fixed till now.
在阅读了Get Deobfuscated 崩溃报告后,我只是使用 dSYM 文件将调试信息格式设置为DWARF,如下所示,但问题直到现在还没有解决。
回答by jnelson
I have been having this same issue for a while and I was finally able to resolve it, thought I would share what worked for me:
我已经有一段时间遇到同样的问题,我终于能够解决它,我想我会分享对我有用的东西:
For context, I am working on a larger app which uses several Cocoapods.
对于上下文,我正在开发一个更大的应用程序,它使用多个 Cocoapods。
I found that same red banner on my Firebase Crashlytics page and after following all of their instructionsI was still seeing it.
我在 Firebase Crashlytics 页面上发现了同样的红色横幅,在按照他们的所有说明进行操作后,我仍然看到它。
I tried the "archive/find .dSYMs/upload manually via terminal" solution several times to no avail.
我多次尝试“存档/查找 .dSYMs/通过终端手动上传”解决方案,但无济于事。
Finally, I decided to download the .dSYMs from iTunesConnect.
[Your App] > Activity > [Desired Build Number] > Download dSYM
最后,我决定从 iTunesConnect 下载 .dSYM。
[您的应用] > 活动 > [所需版本号] > 下载 dSYM
I then uploaded those .dSYMs manually and within minutes Firebase Crashlytics was happy and showing the crash reports.
然后我手动上传了这些 .dSYM,几分钟内 Firebase Crashlytics 就很高兴并显示了崩溃报告。
UPDATE
Google has added a swanky .dSYM upload feature on the Firebase Crashlytics dashboard, no more uploading from the terminal.
更新
谷歌在 Firebase Crashlytics 仪表板上添加了一个时髦的 .dSYM 上传功能,不再从终端上传。
Edit on March 16, 2020.
2020 年 3 月 16 日编辑。
Google is soon removing the upload feature on the Firebase Dashboard. An uploader script should be used from the terminal to upload dSYMs to Firebase. See Google's instructions here.
Google 很快将移除 Firebase 仪表板上的上传功能。应从终端使用上传器脚本将 dSYM 上传到 Firebase。在此处查看 Google 的说明。
回答by Nikunj Kumbhani
If everything is fine you setup all without missing any step and then also you see Upload missing dSYMs to see crasheserror in firebase.
如果一切正常,您可以在不遗漏任何步骤的情况下进行所有设置,然后您还会看到上传丢失的 dSYM 以查看 firebase 中的崩溃错误。
Download the .dSYMsfrom iTunesConnectonly no anywhere else and upload upload those to the Firebase.
仅从iTunesConnect下载.dSYM,不要在其他任何地方下载,然后将其上传到Firebase。
Google is soon removing the upload feature on the Firebase Dashboard
Google 即将移除 Firebase 仪表板上的上传功能
Run the script directly from your terminal to upload dSYMs:
直接从终端运行脚本以上传dSYM:
/path/to/pods/directory/FirebaseCrashlytics/upload-symbols -gsp /path/to/GoogleService-Info.plist -p ios /path/to/dSYMs
After two days of long research and try lots of solutions but no anyone works for me :(
经过两天的长期研究并尝试了很多解决方案,但没有人为我工作:(
But by this solution Firebase Crashlytics was happy and showing the crash reports within a few minutes.
但是通过这个解决方案,Firebase Crashlytics 很高兴并在几分钟内显示了崩溃报告。
回答by vinay
In my case, I have done the following things and it worked:
就我而言,我做了以下事情并且它奏效了:
Select 'Run script only when installing' in Build Phases -> Run Script (Shell = ${PODS_ROOT}/Fabric/run)
Build the app
Now you can find the .dsym file in the path, /Library/Developer/Xcode/DerivedData/XXX-arctjcalvfslmbakanpyivuuxjmm/Build/Products/Release-iphoneos
Upload the zipped .dsym file to firebase console
After few minutes, you can find the crash reports
在 Build Phases -> Run Script (Shell = ${PODS_ROOT}/Fabric/run) 中选择“仅在安装时运行脚本”
构建应用程序
现在你可以在路径中找到 .dsym 文件,/Library/Developer/Xcode/DerivedData/XXX-arctjcalvfslmbakanpyivuuxjmm/Build/Products/Release-iphoneos
将压缩的 .dsym 文件上传到 firebase 控制台
几分钟后,您可以找到崩溃报告
NOTE:
笔记:
- I have disabled bitcode while exporting ipa file (Adhoc or Appstore)
- If you need ipa with bitcode enabled, then download dsym file from iTunes connect
- 我在导出 ipa 文件(Adhoc 或 Appstore)时禁用了位码
- 如果您需要启用位码的 ipa,请从 iTunes 连接下载 dsym 文件
回答by nilobarp
Find and upload debug symbols for Crashlytics
查找并上传 Crashlytics 的调试符号
- Copy the UUID of your missing dSYM and run
mdfind "com_apple_xcode_dsym_uuids == <UUID>"
on a terminal window. - The above command will return something like
.../build/ios/Release-Staging-iphoneos/your.app.dSYM
- Zip up the package and upload to Crashlytics using Firebase dashboard
- 复制丢失的 dSYM 的 UUID 并
mdfind "com_apple_xcode_dsym_uuids == <UUID>"
在终端窗口上运行 。 - 上面的命令将返回类似
.../build/ios/Release-Staging-iphoneos/your.app.dSYM
- 使用 Firebase 仪表板压缩包并上传到 Crashlytics
Wait for 10-15 minutes before the crashes start to appear on the console.
等待 10-15 分钟,然后崩溃开始出现在控制台上。
回答by raNa
Pods/Fabric/upload-symbols -gsp APP/Resources/GoogleService_Info.plist -p ios /Users/ME/Desktop/APP.app.dSYM
This one I used recently to upload my dsym to fabric. I was using fabric with crashlytics SDK not firebase one(which is currently in beta). Just replace your app name for 'APP' and your DSYM path instead of '/Users/ME/Desktop/APP.app.dSYM.
这是我最近用来将我的 dsym 上传到结构的。我使用的是带有 crashlytics SDK 的结构,而不是 firebase one(目前处于测试阶段)。只需将您的应用名称替换为“APP”和您的 DSYM 路径,而不是“/Users/ME/Desktop/APP.app.dSYM”。
回答by Pallavi Srikhakollu
If you are using the dynamic library is your project using cocoa pods or any other tool then Firebase needs Duplicate Symbol files to locate the faulty code in your library. If you want to read more about dSysms read this : https://stackoverflow.com/questions/3656391/whats-the-dsym-and-how-to-use-it-ios-sdk
如果您使用的动态库是使用可可豆荚或任何其他工具的项目,那么 Firebase 需要重复符号文件来定位库中的错误代码。如果您想阅读有关 dSysms 的更多信息,请阅读:https://stackoverflow.com/questions/3656391/whats-the-dsym-and-how-to-use-it-ios-sdk
To find dsysm folder, you first need the .ipa file on which crash was reported on your firebase. In your case, I suppose you are running on the simulator for testing. To get IPA follow these steps: How to create ipa in xcode 6 without Apple Developer account?
要找到 dsysm 文件夹,您首先需要在您的 Firebase 上报告崩溃的 .ipa 文件。在您的情况下,我想您正在模拟器上运行以进行测试。要获得 IPA,请按照以下步骤操作:如何在没有 Apple Developer 帐户的情况下在 xcode 6 中创建 ipa?
When you reach .iPA then right click and select show package contents, or follow this link: iphone: Where the .dSYM file is located in crash report
当您到达 .iPA 时,右键单击并选择显示包内容,或点击此链接:iphone:.dSYM 文件在崩溃报告中的位置
There you will find system folder. Upload this folder to firebase crashalytics.
在那里你会找到系统文件夹。将此文件夹上传到 firebase crashalytics。
Hope this helps!
希望这可以帮助!
回答by Shahed
I also faced the same issue. Basically I was missing a simple step that is why Firebase script could not upload dSYM file.
我也面临同样的问题。基本上我错过了一个简单的步骤,这就是 Firebase 脚本无法上传 dSYM 文件的原因。
Step followed to solve it.
接下来的步骤来解决它。
- Click on project file
- Select target
- Go to build settings
- Search "debug information format"
- For all scheme change the settings to "DWARF with dYSM file"
- 点击项目文件
- 选择目标
- 转到构建设置
- 搜索“调试信息格式”
- 对于所有方案,将设置更改为“带有 dYSM 文件的 DWARF”
- Now run the project again
- dYSM error of firebase dashboard should go...
- 现在再次运行项目
- firebase 仪表板的 dYSM 错误应该...
回答by BadCode
After download dsym .zip file. You should run code below in Terminal.
下载 dsym .zip 文件后。您应该在终端中运行以下代码。
/ProjectPath/Pods/Crashlytics/Crashlytics.framework/upload-symbols -gsp /ProjectPathForGoogleServiceFile/GoogleService-Info.plist -p ios /dSYMFilePath/dSYMs.zip
If upload-symbols command not found, you should update pods for Firebase.
如果未找到 upload-symbols 命令,您应该为 Firebase 更新 pod。
回答by ankitjaiswal
I hope you have a resolved it till now. But for other who are using Firebase/Crashlytics. I uploaded the build and got crash but it was not showing in the console due to missing dsyms.
我希望你能解决它,直到现在。但对于其他使用 Firebase/Crashlytics 的人。我上传了构建并崩溃了,但由于缺少 dsyms,它没有显示在控制台中。
I logged into the itunes and goto the activity section. Then download the dsyms.
我登录到 iTunes 并转到活动部分。然后下载dsyms。
After that I uploaded the dsyms to firebase console using below command:
之后,我使用以下命令将 dsyms 上传到 firebase 控制台:
/Users/ankitjaiswal/Code/oliobox-ios/Pods/FirebaseCrashlytics/upload-symbols
-gsp /Users/ankitjaiswal/Code/oliobox-ios/HymansonArtGallery/GoogleService-Info.plist
-p ios /Users/ankitjaiswal/Downloads/appDsyms.zip
But in this way you always manually need to download and upload it. This is not recommended instead you can follow this link: https://firebase.google.com/docs/crashlytics/get-deobfuscated-reports-new-sdk
但是通过这种方式,您总是需要手动下载和上传它。不建议这样做,您可以点击此链接:https: //firebase.google.com/docs/crashlytics/get-deobfuscated-reports-new-sdk
回答by PrasadW
The accepted answer is perfect and what I also followed. I would just like to add another way to download these dSyms.
接受的答案是完美的,我也遵循了。我只想添加另一种下载这些 dSym 的方法。
Open Organizer from Xcode menu > Window > Organizer
从 Xcode 菜单 > 窗口 > 管理器打开管理器
Select the Application from left panel and select Archives tab.
从左侧面板中选择应用程序,然后选择存档选项卡。
Select the archive for the app release you want to download dSyms of. (If you have deleted archives, then you better follow the accepted answer)
选择要下载 dSyms 的应用程序版本的存档。(如果你已经删除了档案,那么你最好按照接受的答案)
On the right panel, click Download Debug Symbols. Now this will download those symbols into the archive itself. Simply right click the archive version > Show in Finder.
在右侧面板上,单击下载调试符号。现在这会将这些符号下载到存档本身中。只需右键单击存档版本 > 在 Finder 中显示。
Here in finder, right-click archive > Show package contents.
在 finder 中,右键单击存档 > 显示包内容。
This will open the contents to reveal the dSyms.
这将打开内容以显示 dSyms。
Now you don't need all of them, some of them will be your added frameworks/libs from pods and other imports.
现在您不需要所有这些,其中一些将是您从 pod 和其他导入添加的框架/库。
Select only the ones with alphanumeric labels.
仅选择带有字母数字标签的标签。
You can zip these and upload to Firebase.
您可以压缩这些文件并上传到 Firebase。