Google-api-ruby-client: Unable to get around 'cannotUpdateApksOnTrackWithDraftRelease' and 'multiApkDowngradedDevice'

Created on 8 Mar 2018  路  8Comments  路  Source: googleapis/google-api-ruby-client

Problem/Background

I'm one of the core contributors of fastlane and we've been running into a little bit of trouble with uploading APKs to Google Play. There are two errors that are getting reported to us: cannotUpdateApksOnTrackWithDraftRelease (https://github.com/fastlane/fastlane/issues/11735) and multiApkDowngradedDevice (https://github.com/fastlane/fastlane/issues/9363)

Both of these errors are impassable when trying to upload an APK through fastlane with the google-api-client. We are using approach very similar to the sample provided - https://github.com/google/google-api-ruby-client/blob/master/samples/cli/lib/samples/androidpublisher.rb. To make sure this wasn't simple just a fastlane implementation issue, I used this sample and was able to reproduce the same errors.

The thing that is puzzling is our users are able to get around these errors by uploading manually through the Google Play dashboard.

1) The Google Play dashboard seems to somehow clear a draft state when our users are seeing cannotUpdateApksOnTrackWithDraftRelease. The Google Play dashboard doesn't actually show any drafts when this error has occurred to us. It appears there is some invisible draft state that is causing the google-api-client to error out but allow the Google Play dashboard to keep going.
2) The Google Play dashboard seems to prompt/warn the user about multiApkDowngradedDevice but still allows them to go through with it. The Google Play dashboard warns the user but the google-api-client errors out on the user.

Is there a way for us to programmatically using google-api-client to produce these same expected behaviors that we see on the Google Play dashboard?

Current Solution

Our current solution (in fastlane) will be inform our users that they need to go manually upload APKs when cannotUpdateApksOnTrackWithDraftRelease and multiApkDowngradedDevice are encountered. This isn't the ideal case since it goes away from the processes being fully automated but it will allow our users to continue on.

Expect Behavior

  • Find a way to properly clear draft state when cannotUpdateApksOnTrackWithDraftRelease occurs (or understand why we are seeing this state/error occur)
  • Allow users to force through the multiApkDowngradedDevice error/warning
question

Most helpful comment

@TheRoyalTnetennba I have seen this myself a few times (I haven't personally run into it lately since I don't use this very often) but this is a thing that a lot of the Android _fastlane_ users do run into 馃槵

One happened on April 19 -https://github.com/fastlane/fastlane/issues/11735#issuecomment-382902172

If there is a way to clear the draft state by not having to go to the UI that would be 馃挴

All 8 comments

More info on cannotUpdateApksOnTrackWithDraftRelease

My screenshot below says there is a "beta release" but there actually isn't one in there if I click "Edit Release"

  • I tried using google-api-ruby-client to upload new APK (version 1.20) to beta track

    • I got cannotUpdateApksOnTrackWithDraftRelease

  • I tried using Google Play dashboard to create a new release with APK (version 1.20) to beta track

    • I was able to create a new draft of version 1.20 and rollout

    • This "cleared" my hidden/zombie draft

    • After this I was able to upload APK version 1.2.1 using google-api-ruby-client again

I'm not exactly sure what is going on but it seems like google-api-ruby-client won't allow me to upload an APK with this hidden/zombie draft but Google Play dashboard allows this

Screenshot

screen shot 2018-03-09 at 8 20 25 am

Shouldn't there be a way to overwrite releases on a certain stage with 'draft' state?

This happens because you are trying to upload a version of your app to play store (production, beta or alpha) and there is already a version there in Draft (inside production, beta or alpha, depends what of these buckets you are trying to upload)

@rm335 Is there a way remove/clear the draft state? I wasn't able to find anything but I may have not been looking in the right place

Thanks for reporting this! Sorry for the slow response. Are you still having trouble with the uploads?

@TheRoyalTnetennba I have seen this myself a few times (I haven't personally run into it lately since I don't use this very often) but this is a thing that a lot of the Android _fastlane_ users do run into 馃槵

One happened on April 19 -https://github.com/fastlane/fastlane/issues/11735#issuecomment-382902172

If there is a way to clear the draft state by not having to go to the UI that would be 馃挴

From what I can tell, the multiApkDowngradedDevice error doesn't seem to be a problem with the API client, but with how the API is being called. The error is being returned from the API. I found this comment about this error:

This is a problem caused by a change to the Google upload management where they try to give you better feedback. You have to make sure that you are ordering your split version codes so that higher codes are ALWAYS more specific. Before they would just let you upload these even if they were going to be served to nobody.

FWIW, I would also wager that the cannotUpdateApksOnTrackWithDraftRelease error is also a correct response from the API, and not an issue with the API client.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bekkou68 picture bekkou68  路  3Comments

dgobaud picture dgobaud  路  7Comments

MattMencel picture MattMencel  路  3Comments

ProbablyRusty picture ProbablyRusty  路  5Comments

bootstraponline picture bootstraponline  路  4Comments