Premature end of Content-Length delimited message body

Bitrise Build Issue Report template

Description of the issue

Builds have been recently failing inconsistently with this error message during gradle dependencies downloads:

* What went wrong:
Execution failed for task ':react-native-appearance:generateReleaseRFile'.
> Could not resolve all files for configuration ':react-native-appearance:releaseCompileClasspath'.
   > Could not download appcompat-1.0.2.aar (androidx.appcompat:appcompat:1.0.2)
      > Could not get resource 'https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.0.2/appcompat-1.0.2.aar'.
         > Premature end of Content-Length delimited message body (expected: 1,077,153; received: 1,048,576)

This looks like a bad internet connection. Are there any known instability in Bitrise’s network stack?

Environment:

Where did the issue happen?

Gen2 Elite Machine ## macOS 8 vCPU / 35 GB RAM, Xcode 12.5.x, on macOS 11.4 (Big Sur)

Which build Step causes the issue and which version of the step?

android-build v1.0.1

Reproducibility

Not consistently.

Local reproduction

No at all.