Crashlytics could not send build event. Error: HTTP_REDIRECT_ERROR
Issue:
Firebase Crashlytics SDK is not able to register the build during the build process.
The build id, unity version, and google-services xml files are properly generated, but any POST requests to the Crashlytics API is returning "HTTP REDIRECT ERROR". In the build log it states:
Crashlytics could not send build event. Error: HTTP_REDIRECT_ERROR
With this, no app crashes are reported to Crashlytics.
Environment:
Unity editor version: Unity 2018.1.8 Firebase Unity SDK version: 5.6.1 Firebase plugins in use (Auth, Database, etc.): Analytics, Messaging, Crashlytics Additional SDKs you are using (Facebook, AdMob, etc.): None Platform you are using the Unity editor on (Mac, Windows, or Linux): Mac and Windows Platform you are targeting (iOS, Android, and/or desktop): iOS and Android
Please describe the issue here:
- Fully remove all previous Fabric SDK and all Firebase Services SDKs.
- Import Firebase Analytics, Messaging, and Firebase (by this order) from SDK 5.6.1.
- AndroidManifest is also overwritten by Firebase SDK integration.
- Import Android and iOS Firebase config files from Firebase Console.
- Start build (either iOS or Android platforms)
- Build steps show log: "Crashlytics could not send build event Error: HTTP_REDIRECT_ERROR"
- Build succeeds, but upon forcing crashes, no crashes are shown in the Crashlytics dashboard.
Note: Result is the same for MacOS, Windows, and Unity Cloud Build.
Please answer the following, if applicable:
Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)? Haven't been able yet to try this with the Firebase Unity quickstarts project.
Hey Henrique, I have a feeling this is indicative of a mismatch in configuration between the app and our backend. A couple questions to investigate:
- Are you setting up this app as a new Firebase Crashlytics app, or migrating from Fabric so that you keep your historical crashes?
- If you're setting up as a new Firebase Crashlytics app, can you make sure you're gone to the Firebase Console and clicked "This app is new to Crashlytics"?
- If you're setting up as a migrated Fabric app, make sure you have linked using fabric.io/firebase_migration. In addition, make sure you have entered your Fabric API key in the menu in Window > Firebase > Crashlytics.
- Can you try force running the resolver (Assets > Play Services Resolver >
Resolver > Force Resolve)?
Hi @samedson , thanks for your quick reply.
I tried all the steps you presented and still have the same result.
- The app was new to Firebase Crashlytics (not created first via Fabric Dashboard). However we first started using the Fabric Crashlytics SDK (instead of the Firebase Crashlytics SDK).
- i. I remember I first configured this through "This app is new to Crashlytics" in the Firebase Console.
- ii. Thank you for mentioning this step, I was unaware of it. And I think this is not even mentioned in your documentation. Now I can see that the
network_request.exe(/py)command line now uses the proper Fabric API key. - I did Force Resolve after I configured the Fabric API key and still get the HTTP_REDIRECT_ERROR.
One extra question, is this Post-build process step inside the Crashlytics DLLs now (ie, not in open C# code)? Fabric used to have this in C# code that helped debugging and issue tracking.
(Edit) Note: The crash reports worked as expected with the Fabric Crashlytics SDK, before we migrated to the Firebase Crashlytics SDK.
Hey Henrique,
If you're using a Fabric API Key, then you should follow the setup in: https://firebase.google.com/docs/crashlytics/migrate-from-fabric?authuser=0 - it has the instructions for the Fabric API Key.
Since you have already clicked "This app is new to Crashlytics", you're in a state where we will have to "remove" the existing Firebase Crashlytics setup (that's not working), and replace it with the Fabric one you already got working. This is only a backend process - you can use the new Firebase Crashlytics Unity plugin, and keep your old Fabric data (that is why we have you enter your Fabric API Key)
When you go to https://fabric.io/firebase_migration you will be able to link it to your existing Fabric app, and it will remove the new Firebase setup, and start using your old Fabric setup (with all its existing crashes too).
Eg. you'll drag your Fabric app on the left to your Firebase Project on the right:

And then a popup will confirm you want to remove the Firebase Crashlytics setup:

Hello @samedson , thanks for the tips. However, I tried all these steps and I am still stuck with the same issue. I even tried unlinking the Crashlytics from the Firebase dashboard and then re-link, but still the same result.
Unlinked via (https://console.firebase.google.com/u/0/project/{project}/settings/integrations/fabric):

Then re-linked via (https://fabric.io/firebase_migration/apps):

Hello @samedson , just found out what was my problem! I was using the Fabric Build Secret instead of the Fabric API key... Sorry, the UX of the Fabric dashboard got the best of me. Thanks for all the help!
Now the builds properly register with the Firebase Crashlytics API.
Crashlytics build information sent
Ah makes sense - maybe we can add some validation to that box. Glad it's working!