Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New GPlay Icon rules return HTTP-Statuscode #500 and GPP process locks up #597

Closed
Catfriend1 opened this issue Jun 17, 2019 · 10 comments
Closed
Labels
blocked-by-api Indicates issues blocked by a missing feature or bug in the Publishing API bug Indicates an unexpected problem or unintended behavior feature:listing Involves resource generation and app metadata

Comments

@Catfriend1
Copy link

Describe the bug

Trying to "gradlew publisReleaseListing" fails repeatedly with GPlay HTTP API Error #500 and no messages pointing to the cause.

How To Reproduce

  • Try to publish multiple play language files (descriptions, images) via play-publisher. ( "gradlew publisReleaseListing" )
com.google.api.client.googleapis.json.GoogleJsonResponseException: 500 Internal Server Error
  {
    "code" : 500,
    "message" : null
  }
https://www.googleapis.com/upload/androidpublisher/v3/applications/com.github.catfriend1.syncthingandroid/edits/055435675
51180603900/listings/ca/icon?uploadType=resumable

It didn't go away after clicking "Switch to the new image format" on GPlay console - still error 500.
I also tried to replace the transparent PNG by a PNG with solid background as described in https://developer.android.com/google-play/resources/icon-design-specifications , enforced by GPlay from 24/06/2019 + .

AFTER THAT: A java process is left behind in windows task manager and the lang resource file where the "publishReleaseListing" stopped is still open "in background" with no indication to the user that this is the case. It can be proven by running the following command in a terminal:

rd /s /q F:\GitHub\syncthing-android\app\build\generated\gpp
F:\GitHub\syncthing-android\app\build\generated\gpp\release\res\listings\ar\graphics\icon\5185990009863024024.png - Der Prozess kann nicht auf die Datei zugreifen, da sie von einem anderen Prozess verwendet wird.

Versions

  • Gradle Play Publisher: 2.2.1
  • Gradle Wrapper: 3.4.1 (beforehand 3.3.2)
  • Android Gradle Plugin: 5.1.1

Tasks executed

publishRelease OR publishReleaseListing

Expected behavior

Resource upload takes place and finishes successfully. / I expect to be able to retry with another PNG resource for "icon".

Additional context (if a crash, provide stack trace)

@Catfriend1 Catfriend1 added the bug Indicates an unexpected problem or unintended behavior label Jun 17, 2019
@Catfriend1
Copy link
Author

Catfriend1 commented Jun 17, 2019

About that #500 error:

  • I spent hours to find a workaround to push my resources finally to gplay.

What I did:

taskkill /f /im java.exe
rd /s /q F:\GitHub\syncthing-android\app\build\generated\gpp
REM Deleted every ".../play/listings/[lang]/graphics/icon" folder manually in Windows Explorer.
REM Re-ran the publishReleaseListing command.

Related posts:

Catfriend1 added a commit to Catfriend1/syncthing-android that referenced this issue Jun 17, 2019
@Catfriend1
Copy link
Author

One more question: Is there any way to set "uploadImages = false" in the v2.2.1 of the plugin?

Catfriend1 added a commit to Catfriend1/syncthing-android that referenced this issue Jun 17, 2019
Catfriend1 pushed a commit to Catfriend1/syncthing-android that referenced this issue Jun 17, 2019
* Create tx_pull_all_translations.cmd

* Add script: build_and_release.cmd

* Workaround play-publisher issue 597

ref: Triple-T/gradle-play-publisher#597

* Display generated APK versionCode after build

* Create versions.gradle

* postbuild_rename_apk: Get versionCode from "versions.gradle", copy instead of rename

* Fix Workaround for GPP left-over process kill

* Update build.gradle
Catfriend1 pushed a commit to Catfriend1/syncthing-android that referenced this issue Jun 17, 2019
* Update transifex config

* build.gradle: Update play-publisher from 1.2.2 to 2.2.1

Remove unsupported play-publisher flags

* Create .gitattributes

* Move files to new locations

* Delete files from old locations

* Delete build_and_release.cmd

* Rename listing folders

* Create tx_pull_all_translations.cmd

* Add values-et/strings.xml

* Removed languages from transifex

* Fix ca short description length

* Remove unsupported languages

* Imported translations: title

* Remove unsupported languages which are not on transifex from res/values

* Shorten the short play descriptions

* Imported translation for play: zh-CN

* Update .gitignore

* Update tx mappings

* build.gradle: Update deleteUnsupportedPlayTranslations

* Add script: build_and_release.cmd

* Add supported language: tx:no => gplay:no-NO

* Update .tx/config source_lang for play resources

* Add dummy files

* build.gradle: Update dependencies

* build.gradle: Update gradle for Android Studio 3.4.1

* Add resolutionStrategy = 'auto'

* Workaround play-publisher issue 597

ref: Triple-T/gradle-play-publisher#597

* Display generated APK versionCode after build

* Create versions.gradle

* Fix Workaround for GPP left-over process kill

* build.gradle: Calculate versionCode from "versions.gradle"

* Update versions.gradle

* postbuild_rename_apk: Get versionCode from "versions.gradle", copy instead of rename
@SUPERCILEX
Copy link
Collaborator

The file resource leak will be fixed by googleapis/google-api-java-client#1324.

@SUPERCILEX
Copy link
Collaborator

And I don't understand your issue. No, you can't disable image uploading. Simply don't put images in the graphics folder if you don't want them uploaded. If it works after running bootstrap that means your images were bad.

@SUPERCILEX
Copy link
Collaborator

SUPERCILEX commented Jun 17, 2019

A simple way to check would be: can the image be uploaded through the Play Console. If yes, it should work with GPP, if no, then it's bad.

Can you please clarify exactly what you're trying to do?

@imsodin
Copy link

imsodin commented Jun 17, 2019

A simple way to check would be: can the image be uploaded through the Play Console. If yes, it should work with GPP, if no, then it's bad.

I just tried and I could upload and set the icon in the Play Console, but I get the same error using GPP (./gradlew publishReleaseListing) as Catfriend1 reported. The failing image is in https://github.com/syncthing/syncthing-android/tree/master/app/src/main/play/listings/en-GB/graphics/icon and the full log can be found at https://gist.github.com/imsodin/8a40073de6f3192dd1e7c15842b15b7c

If it works after running bootstrap that means your images were bad.

I just ran bootstrap and it does rename the icon without modifying it's content:

app/src/main/play/listings/en-GB/graphics/icon/{12150231666510658317.png => 9834354722760385987.png} | Bin

I retried publishReleaseListing with the renamed icon, but the error remains.

@Catfriend1
Copy link
Author

Thanks, imsodin for joining in. This drove me crazy last night looking for a solution. I was trying to upload a png without transparency which also led to the 500 error. Deleting the icon png made the upload complete successfully.

@SUPERCILEX
Copy link
Collaborator

I've contacted some people at Google who should know more. Unfortunately, there's nothing GPP can really do. I'll update when I get more info.

@SUPERCILEX SUPERCILEX added blocked-by-api Indicates issues blocked by a missing feature or bug in the Publishing API feature:listing Involves resource generation and app metadata labels Jun 18, 2019
@gitterandgold
Copy link

This reason for this image upload error is described here: https://developer.android.com/google-play/resources/icon-design-specifications#instructions_for_api_users.
As the date mentioned on the page is now passed, you should not get the error anymore. That said the new specification is now automatically applied to all icon upload, so make sure you follow the guidelines.

@imsodin
Copy link

imsodin commented Jun 20, 2019

@gitterandgold Yes it works now :)
Thanks for the info. That was really unfortunate timing, a bit later and we would have never encountered this (and arguably not ideal error reporting by the API, I don't see how I should have found that starting at a generic error 500).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked-by-api Indicates issues blocked by a missing feature or bug in the Publishing API bug Indicates an unexpected problem or unintended behavior feature:listing Involves resource generation and app metadata
Projects
None yet
Development

No branches or pull requests

4 participants