Search code examples
swiftfirebasecrashlyticsgoogle-fabric

Firebase Crashlytics 'Error loading your issues' and upload-symbols script error - iOS App using XCode


I recently noticed all of my crash reports in Firebase Crashlytics were not being deobfuscated, they were all returning compiler errors and memory locations (eg <compiler-generated> - Line 4331771636, EXC_BREAKPOINT 0x0000000102afd6f4), rather than function names and line numbers. I realised it's because Fabric has been shutdown (4th May 2020), so I began the transition to Firebase Crashlytics.

I changed my pod file and added the Firebase/Crashlytics pod, and followed the transition instructions located here.

I've put the following code in my Run script under Build Phases in Xcode:

"${PODS_ROOT}/FirebaseCrashlytics/run"
"${PODS_ROOT}/FirebaseCrashlytics/upload-symbols" -gsp "${PROJECT_DIR}/GoogleService-Info.plist" -p ios "${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}"

When I build my project I get the following error returned from upload-symbols:

Fetching upload-symbols settings...
[31merror: Could not fetch upload-symbols settings: Could not connect to the server.[0m
Command PhaseScriptExecution failed with a nonzero exit code

If I manually run the upload-symbols script in terminal, I get the same error error: Could not fetch upload-symbols settings: Could not connect to the server.

I also noticed that on the Crashlytics dashboard in Firebase, I had lost all my previous crash data and was receiving the message Error loading your issues.

How can I fix the errors and get Crashlytics working like before?


Solution

  • The solution was to force a crash in my app using fatalError(). It is not obvious that this is required to finalise the registration of the new SDK with the Firebase Crashlytics backend.

    After doing this, all my historical crash data is available like before, and upload-symbols completes successfully.