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

We have failed to run 'bundletool build-apks' on this Android App Bundle. Please ensure your bundle is valid by running 'bundletool build-apks' locally and try again #900

Closed
mochadwi opened this issue Dec 31, 2020 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@mochadwi
Copy link

mochadwi commented Dec 31, 2020

Describe the bug

Execution failed for task ':legacy:publishProdReleaseBundle'.
> A failure occurred while executing com.github.triplet.gradle.play.tasks.PublishBundle$BundleUploader

Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
PUT https://androidpublisher.googleapis.com/upload/androidpublisher/v3/applications/<company package>/edits/<id>/bundles?uploadType=resumable&upload_id=<upload_id>
{
  "code" : 403,
  "errors" : [ {
    "domain" : "global",
    "message" : "We have failed to run 'bundletool build-apks' on this Android App Bundle. Please ensure your bundle is valid by running 'bundletool build-apks' locally and try again.",
    "reason" : "forbidden"
  } ],
  "message" : "We have failed to run 'bundletool build-apks' on this Android App Bundle. Please ensure your bundle is valid by running 'bundletool build-apks' locally and try again.",
  "status" : "PERMISSION_DENIED"
}
        at com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:149)

How To Reproduce

./gradlew publish<BuildVariant>Bundle --track=internal

Versions

+--- com.github.triplet.play:com.github.triplet.play.gradle.plugin:3.0.0
|    \--- com.github.triplet.gradle:play-publisher:3.0.0
|         +--- com.github.triplet.gradle:android-publisher:3.0.0
|         |    +--- com.github.triplet.gradle:common-utils:3.0.0
|         +--- com.github.triplet.gradle:common-utils:3.0.0
|         +--- com.github.triplet.gradle:common-validation:3.0.0
Gradle 6.6
+--- com.android.tools.build:gradle:4.1.1
|    \--- com.android.tools.build:gradle:1.1.0 -> 4.1.1 (*)
|    +--- com.android.tools.build:gradle:3.6.3 -> 4.1.1 (*)
  • Gradle Play Publisher: 3.0.0
  • Gradle Wrapper: 6.6
  • Android Gradle Plugin: 4.1.1

Tasks executed

publish<BuildVariant>Bundle

Expected behavior

Succeed to publish to playstore

Additional context (if a crash, provide stack trace)

Add any other context about the problem here. If this bug is a crash, run the task with
--stacktrace to get the full context.

@mochadwi mochadwi added the bug Indicates an unexpected problem or unintended behavior label Dec 31, 2020
@SUPERCILEX
Copy link
Collaborator

The status is permission denied, so maybe you didn't configure play perms correctly? https://github.com/Triple-T/gradle-play-publisher#service-account

Otherwise just make sure you can upload the bundle through the console. If you can, contacting support will probably get you farther since this isn't a plugin issue.

@mochadwi
Copy link
Author

mochadwi commented Jan 1, 2021

Looks like this is a false-positive error message, here's the culprit: google/bundletool#182 (comment)

Turns out this is due to bundletool unsupported for DFM

thanks for your response @SUPERCILEX closing this issue now

@mochadwi mochadwi closed this as completed Jan 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants