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.1k stars 340 forks source link

Error completing final release promotion #983

Closed la-eln closed 3 years ago

la-eln commented 3 years ago

Hi! When I execute this gradle command I get an error with code 400

Tasks executed

./gradlew promoteArtifact --from-track production --promote-track production --release-status completed

Response:

      {
        "code": 400,
        "errors": [
          {
            "domain": "global",
            "message": "COMPLETED release must not have fraction",
            "reason": "badRequest"
          }
        ],
        "message": "COMPLETED release must not have fraction",
        "status": "INVALID_ARGUMENT"
      }

Though, as you can see, no fraction was supplied

Versions

Additional context (if a crash, provide stack trace)

However, there are no problems with the execution of these commands (with any percentage) ./gradlew promoteArtifact --from-track production --promote-track production --release-status inProgress --user-fraction 0.5

SUPERCILEX commented 3 years ago

Interesting. I'll need to check, but my guess is that we're carrying over the previous user fraction when we actually need to null it out if the release status is completed.

Relevant code: https://github.com/Triple-T/gradle-play-publisher/blob/05e8949498b966589b3e99d89fb497767add56bb/play/android-publisher/src/main/kotlin/com/github/triplet/gradle/androidpublisher/internal/TrackManager.kt#L205-L211

dvdciri commented 3 years ago

I'm also having the same issue, looking forward to the fix.