Triple-T / gradle-play-publisher

GPP is Android's unofficial release automation Gradle Plugin. It can do anything from building, uploading, and then promoting your App Bundle or APK to publishing app listings and other metadata.
MIT License
4.13k stars 341 forks source link

Getting 403 ERROR for task `publishReleaseListing` #812

Closed YuryChislov closed 4 years ago

YuryChislov commented 4 years ago

Describe the bug

Execution failed for task publishReleaseListing.

Uploading ja-JP listing graphic for type 'phoneScreenshots': 4.png
-------------- REQUEST  --------------
POST https://www.googleapis.com/upload/androidpublisher/v3/applications/com.****.wrapper.*******/edits/0853167**********76/listings/ja-JP/phoneScreenshots?uploadType=resumable
Accept-Encoding: gzip
Authorization: <Not Logged>
User-Agent: gradle-play-publisher Google-API-Java-Client Google-HTTP-Java-Client/1.30.0 (gzip)
x-goog-api-client: java/11.0.2 http-google-androidpublisher/1.26.0 windows-10/10.0
x-upload-content-type: image/*
x-upload-content-length: 111929
Content-Length: 0

curl -v --compressed -X POST -H 'Accept-Encoding: gzip' -H 'Authorization: <Not Logged>' -H 'User-Agent: gradle-play-publisher Google-API-Java-Client Google-HTTP-Java-Client/1.30.0 (gzip)' -H 'x-goog-api-client: java/11.0.2 http-google-androidpublisher/1.26.0 windows-10/10.0' -H 'x-upload-content-type: image/*' -H 'x-upload-content-length: 111929' -d '@-' -- 'https://www.googleapis.com/upload/androidpublisher/v3/applications/com.*****.wrapper.********/edits/08531********4025976/listings/ja-JP/phoneScreenshots?uploadType=resumable' << $$$
-------------- RESPONSE --------------
HTTP/1.1 403 Forbidden
Alt-Svc: h3-27=":443"; ma=2592000,h3-25=":443"; ma=2592000,h3-T050=":443"; ma=2592000,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,quic=":443"; ma=2592000; v="46,43"
Server: UploadServer
X-GUploader-UploadID: AAANsUl3WVgmNKzDFfapRmFumPxgwobYrQONEN1HN5J8FJdOfFov28Oe-LlwHHm58BtmtQ8f9VfjENFwhMw817sDfMM
Vary: X-Origin
Vary: Origin
Content-Length: 221
Date: Mon, 25 May 2020 04:50:46 GMT
Content-Type: application/json; charset=UTF-8

Total: 221 bytes
{
 "error": {
  "errors": [
   {
    "domain": "androidpublisher",
    "reason": "invalidScreenshotImage",
    "message": "Invalid screenshot image."
   }
  ],
  "code": 403,
  "message": "Invalid screenshot image."
 }
}

How To Reproduce

To run task 'publishReleaseListing' that upload multiple lacates and images

I have 26 locales for this App. The 403 Error occurs only for one image in one locale. Each time when I re-run this task the 403 error happens with different image but others get 200 OK response.

Versions

Unsuccessfully uploaded image proprties: image

Tasks executed

publishReleaseListing

Expected behavior

All the files to upload. BUILD SUCCESSFUL

Additional context (if a crash, provide stack trace)

I thoroughly researched the similar https://github.com/Triple-T/gradle-play-publisher/issues/514 and followed the suggestions but I still can replicate this issue.

SUPERCILEX commented 4 years ago

Please use GPP v2.7.5 if possible. (There could be a race condition if a different screenshot is failing each time. Also, does uploading those images through the Play Store directly work?

YuryChislov commented 4 years ago

Upgraded publisher to 2.7.5 version and retested. Unfortunately the same result. And yes the images successfully uploading through Play Store (double checked). To me it looks like this bug is related to numbers of files to upload. There are 25 locales with 14 images in each. We have another app only with 3 locales in listing. It is the same directory structure and similar images and publishReleaseListing completes successfully there.

SUPERCILEX commented 4 years ago

Interesting, does it always happen with the same locale (ja-JP)? The tough part is that I can't repro. I just tried uploading screenshots for 14 locales and it worked fine. I could maybe be able to help if you isolate which screenshot failed, but contacting Play support is probably the best course of action since this is unlikely to be something on the GPP end.

YuryChislov commented 4 years ago

No it happens with different languages. If to delete ja-JP it would happen with the previous one that was uploaded successfully before.

YuryChislov commented 4 years ago

As it turned out there was an issue with an image for a previously uploading language within this task. Logs for this issue were quite confusing.