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

400 Bad Request: Track names in request path and request body must match. #791

Closed mrimvo closed 4 years ago

mrimvo commented 4 years ago

Describe the bug

Promoting artifacts worked fine for several month, but a few days ago, an error message started popping up.

My build.gradle

play {
    track = "alpha"
    serviceAccountEmail = "android-developer-for-uploadin@........gserviceaccount.com"
    serviceAccountCredentials = .......
}

Command I execute is:

./gradlew promote...Artifact \
  --from-track alpha --promote-track beta

The error message I got from this is:

> A failure occurred while executing com.github.triplet.gradle.play.tasks.PromoteRelease$Promoter
   > 400 Bad Request
     {
       "code" : 400,
       "errors" : [ {
         "domain" : "global",
         "message" : "Track names in request path and request body must match.",
         "reason" : "badRequest"
       } ],
       "message" : "Track names in request path and request body must match.",
       "status" : "INVALID_ARGUMENT"
     }

Versions

\--- com.github.triplet.play:com.github.triplet.play.gradle.plugin:2.4.2
     \--- com.github.triplet.gradle:play-publisher:2.4.2
Gradle 5.6.4
+--- com.android.tools.build:gradle:3.6.1
     +--- com.android.tools.build:gradle:3.4.0 -> 3.6.1 (*)

Expected behavior

I expected the artifact to be promoted in Google Play Console. This did not work out, instead the error message provided above showed up in my local command line terminal.

SUPERCILEX commented 4 years ago

Please upgrade to GPP v2.7.2, that bug was fixed.