quickstart-ios icon indicating copy to clipboard operation
quickstart-ios copied to clipboard

Firebase Crash Reporting: Failed to transmit crash: Error 400

Open windless opened this issue 10 years ago • 3 comments

Firebase Crash Reporting: Failed to transmit crash: Error Domain=com.google.FirebaseCrash Code=1 "Upload failed" UserInfo={NSLocalizedDescription=Upload failed, NSLocalizedFailureReason=HTTP Error Code 400: <NSHTTPURLResponse: 0x14042c580> { URL: https://mobilecrashreporting.googleapis.com/v1/crashes:batchCreate?key=AIzaSyDASjryPZ%2DxEbhyE9hu09Fw7dhWs4Wj61c&alt=json } { status code: 400, headers {
"Cache-Control" = private;
"Content-Encoding" = gzip;
"Content-Length" = 136;
"Content-Type" = "application/json; charset=UTF-8";
Date = "Thu, 01 Sep 2016 09:08:42 GMT";
Server = ESF;
Vary = "Origin, X-Origin, Referer";
"alt-svc" = "quic=\":443\"; ma=2592000; v=\"36,35,34,33,32,31,30\"";
"alternate-protocol" = "443:quic";
"x-content-type-options" = nosniff;
"x-frame-options" = SAMEORIGIN;
"x-xss-protection" = "1; mode=block";} }}

windless avatar Sep 01 '16 09:09 windless

I also get the same error. But when I checked with the simulator its sends the crash reports. its actually failed on the device. This is the error that I got.

Sandbox: FirebaseCrash(12907) deny(1) file-write-create /private/var/containers/Bundle/Application/FIREBASE_LAST_TIMESTAMP : <FIRAnalytics/DEBUG> Logging event: origin, name, params: crash, _ae, { "_o" = crash; fatal = 1; timestamp = 1473590630476; } : <FIRAnalytics/DEBUG> Event logged. Event name, event params: _ae, { "_o" = crash; fatal = 1; timestamp = 1473590630476; } : <FIRAnalytics/DEBUG> Timer scheduled to fire in approx. (s): 3415.880964100361 : <FIRAnalytics/DEBUG> Upload task scheduled to be executed in approx. (s): 3415.880964100361 : Firebase Crash Reporting: Failed to transmit crash: Error Domain=com.google.FirebaseCrash Code=1 "Upload failed" UserInfo={NSLocalizedDescription=Upload failed, NSLocalizedFailureReason=HTTP Error Code 400: <NSHTTPURLResponse: 0x156f85850> { URL: https://mobilecrashreporting.googleapis.com/v1/crashes:batchCreate?key=AIzaSyBgMAegeAHGTuquq2YeImmFJ5ynNyNf79o&alt=json } { status code: 400, headers { "Cache-Control" = private; "Content-Encoding" = gzip; "Content-Length" = 156; "Content-Type" = "application/json; charset=UTF-8"; Date = "Tue, 06 Sep 2016 10:45:08 GMT"; Server = ESF; Vary = "Origin, X-Origin, Referer"; "alt-svc" = "quic=":443"; ma=2592000; v="36,35,34,33,32""; "x-content-type-options" = nosniff; "x-frame-options" = SAMEORIGIN; "x-xss-protection" = "1; mode=block"; } }}

vrkkarthi avatar Sep 06 '16 10:09 vrkkarthi

Install Charles Proxy (or whatever your favorite way to inspect requests is), go to Help>SSL Proxying>Install Charles Root Certificate in iOS Simulators. Then get it to fail to send the crash report again in the simulator and look for the request to mobilecrashreporting.googleapis.com in Charles. Click on response to view the actual response JSON, which should have the reason the request is failing.

Mine was an invalid BundleVersion value, yours will probably be something else: { "error": { "code": 400, "message": "Invalid iOS internal version: '1A001'.", "status": "INVALID_ARGUMENT" } }

Once I fixed the version number crash reporting started working. This info should really be in the failure log, so I'm going to make a feature request for that. Hope this helps

bmcd avatar Sep 08 '16 20:09 bmcd

I have encountered this problem.

[Firebase/Crash][I-CRA100001] Failed to transmit crash: Error Domain=com.google.FirebaseCrash Code=1 "Upload failed" UserInfo={NSLocalizedDescription=Upload failed, NSLocalizedFailureReason=HTTP Error Code 400: <NSHTTPURLResponse: 0x17403eec0> { URL: https://mobilecrashreporting.googleapis.com/v1/crashes:batchCreate?key=AIzaSyBFFt4mgU8WOLJmaizi1KWgv3KxnobL3MU&alt=json } { status code: 400, headers { "Cache-Control" = private; "Content-Encoding" = gzip; "Content-Length" = 157; "Content-Type" = "application/json; charset=UTF-8"; Date = "Tue, 17 Oct 2017 08:09:20 GMT"; Server = ESF; Vary = "Origin, X-Origin, Referer"; "alt-svc" = "quic=":443"; ma=2592000; v="39,38,37,35""; "x-content-type-options" = nosniff; "x-frame-options" = SAMEORIGIN; "x-xss-protection" = "1; mode=block"; } }}

can you help me?

ZhengXueNing avatar Oct 17 '17 08:10 ZhengXueNing