gradle-play-publisher: Error: insufficient data written

Describe the bug

My nightly release is started failing today with the error:

A failure occurred while executing com.github.triplet.gradle.play.tasks.PublishBundle$BundleUploader
         > insufficient data written

How To Reproduce

Upload a bundle

Versions

  • Gradle Play Publisher: 3.8.4
  • Gradle Wrapper: 8.3
  • Android Gradle Plugin: 8.2.0-beta03

Tasks executed

publishReleaseBundle

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Reactions: 8
  • Comments: 24

Most upvoted comments

I suggest raising support tickets with Google Play as well, maybe we get a better answer and resolution as the issue seems to be more widespread and only affecting API usage (I was able to consistently upload via the web Console): https://support.google.com/googleplay/android-developer/contact/general_contact

Google seems to have fixed something in the meantime, because my apps got finally uploaded after many tries in the last three days.

I contacted Google yesterday. They said they need time to look into it. I pointed them to this issue, but the more reports they get, the more real it will be to them.

I just finally got my act together and reached out to Google, I’ll keep you posted when I hear back.

@SUPERCILEX , thanks for the tip. It might have occurred to me.

However, I’m quite sure the problem is not just the incomplete store listing. Our store listing is updated according to the comments above, and the store console does not show any issues. In our case, there are 4 APKs to upload due to different ABIs. The sizes of the apks are from 70 to around 100 MB. So ‘gradle-play-publisher’ tries to upload 4 APKs and 4 times the same mapping = 8 files.

Here are my observations after setting the gradle log level to ‘–info’ and observing the task multiple times:

  • The number of failed uploads is random. Sometimes just 1 file fails, sometimes 4. Once (after manually deleting the mapping), the task uploaded all APKs successfully.
  • There are a lot of responses with http code 308. That is expected, due to resumable file transfers.
  • But there are a couple of http 401 responses with a subsequent reauthentication.
  • I believe the uploads do not resume correctly after the auth and fail with insufficient data written.
  • The count of authentication calls is the same as the count of failed uploads.
  • I do not see a subsequent request with the same upload ID to the response with code 308, that happened prior to the authentication.

So, if the gradle error is:


> A failure occurred while executing com.github.triplet.gradle.play.tasks.PublishApk$Processor
    > There were multiple failures while executing work items
       > A failure occurred while executing com.github.triplet.gradle.play.tasks.PublishApk$ApkUploader
             > insufficient data written
       > A failure occurred while executing com.github.triplet.gradle.play.tasks.PublishApk$ApkUploader
             > insufficient data written
       > A failure occurred while executing com.github.triplet.gradle.play.tasks.PublishApk$ApkUploader
             > insufficient data written

with 3 failed uploads, then there were 3 authentification calls during the task execution.

@SUPERCILEX , could you please have a look at it? Should I create a new issue?

We just ran into this issue as well. This is caused by an incomplete declaration of app’s Financial features.

The deadline for that was August 31st. And it seems that they started rejecting builds into accounts that are not setup.

To fix this:

  1. Go to Google Play Store
  2. Open your app
  3. Go to App Content (under Policy and programs)
  4. Finish Financial Features declaration
  5. Submit changes for review (seems to take minutes)
  6. Publish your app
image