firebase-tools: Firebase Distribution - Server Error. socket hang up
[REQUIRED] Environment info
firebase-tools: 7.13.1
Platform: macOS 10.14.5 Running on gitlab-runner: 11.10.1 fastlane-plugin-firebase_app_distribution: 0.1.4 fastlane: 2.143.0
[REQUIRED] Test case
Sorry, I can not provide an example, since it is reproducible on our CI on a project that is under NDA. The only difference that I have from your CI guide is that we’re using a Service Account’s Access Key in a .json format to authenticate.
[REQUIRED] Steps to reproduce
- Make an app via Fastlane
- Distribute it via fastlane-plugin-firebase_app_distribution
[REQUIRED] Expected behavior
App expected to be uploaded successfully in all of the cases or provide a more detailed error.
[REQUIRED] Actual behavior
Distribution randomly fails with a ** Server Error. socket hang up**.
Here is an example of a distribution failure logs taken out in the debug mode:
uploading distribution...
[2020-03-05T15:49:06.856Z] >>> HTTP REQUEST GET https://firebaseappdistribution.googleapis.com/v1alpha/apps/1:[REDACTED]:ios:[REDACTED]/jwt
[2020-03-05T15:49:07.787Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Thu, 05 Mar 2020 15:49:07 GMT, server=ESF, cache-control=private, x-xss-protection=0, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000, accept-ranges=none, transfer-encoding=chunked
[2020-03-05T15:49:07.788Z] >>> HTTP REQUEST POST
https://appdistribution-uploads.crashlytics.com/spi/v1/jwt_distributions
Error: failed to upload distribution. Server Error. socket hang up
According to the fastlane the distribution step took only 9 seconds in total before the error, therefore it is not a timeout or something similar.
Here is a log of a successful distribution:
[10:19:14]: ▸ i uploading distribution...
[10:19:14]: >>> HTTP REQUEST GET https://firebaseappdistribution.googleapis.com/v1alpha/apps/1:[REDACTED]:ios:[REDACTED]/jwt
[10:19:15]: <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Fri, 06 Mar 2020 08:19:15 GMT, server=ESF, cache-control=private, x-xss-protection=0, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000, accept-ranges=none, transfer-encoding=chunked
[10:19:15]: >>> HTTP REQUEST POST https://appdistribution-uploads.crashlytics.com/spi/v1/jwt_distributions
[10:19:22]: <<< HTTP RESPONSE 202 content-type=application/json, date=Fri, 06 Mar 2020 08:19:22 GMT, etag=[REDACTED], server=nginx, status=202 Accepted, x-content-type-options=nosniff, x-request-id=[REDACTED], content-length=66, connection=keep-alive
[10:19:22]: >>> HTTP REQUEST GET https://firebaseappdistribution.googleapis.com/v1alpha/apps/1:[REDACTED]:ios:[REDACTED]/upload_status/[REDACTED]
[10:19:23]: <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Fri, 06 Mar 2020 08:19:23 GMT, server=ESF, cache-control=private, x-xss-protection=0, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000, accept-ranges=none, transfer-encoding=chunked
[10:19:25]: >>> HTTP REQUEST GET https://firebaseappdistribution.googleapis.com/v1alpha/apps/1:[REDACTED]:ios:[REDACTED]/upload_status/[REDACTED]
[10:19:26]: <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Fri, 06 Mar 2020 08:19:26 GMT, server=ESF, cache-control=private, x-xss-protection=0, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=quic=":443"; ma=2592000; v="46,43",h3-Q050=":443"; ma=2592000,h3-Q049=":443"; ma=2592000,h3-Q048=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000, accept-ranges=none, transfer-encoding=chunked
[10:19:26]: ▸ ✔ uploaded distribution successfully!
Unfortunately, I can not identify some concrete steps, since it really looks randomly. Runner doesn’t use any VPN or any antivirus solution.
It would be also nice to debug it if possible to figure out the root of the issue, but I’m not a node js developer so any help on that (i.e. how to attach a debugger to your tool and where to look for an error) is highly appreciated 😃
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 15 (6 by maintainers)
@valeriomazzeo Got it. In that case, I would definitely reach out to Firebase Support and provide them with your IPA (if you’re willing) so we can do further debugging. This is likely an issue processing your IPA on the backend.