Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Only releases with status draft may be created on draft app

I'm using the Jenkins AndroidAPKUpload plugin.

I have a draft version of an app in the Play store. The app is intended only for internal testing and it will never be released to the public. I assume that means it will be a draft forever.

When I try to upload the APK via the plugin I receive the error "Only releases with status draft may be created on draft app"

Is there a way I can mark my app as draft? A setting in the build.gradle file perhaps?

like image 828
Bryan Deemer Avatar asked Nov 22 '19 15:11

Bryan Deemer


4 Answers

if you switch to fastlane, then you can:

  • specify that it's going to be a draft release, and
  • make sure the track you're uploading to is specified as internal

https://docs.fastlane.tools/actions/upload_to_play_store/

lane: deploy
  upload_to_play_store(
    track: 'internal',
    release_status: 'draft',
    apk: path_to_your_apk
  )
end
like image 114
airtonix Avatar answered Oct 08 '22 09:10

airtonix


I've had the same issue while using Bitrise's Google Play Deploy step, and the reason for this is that if your app on Google console is not set up (privacy policy, app access, content rating etc.), then you cannot create alpha track, only internal track.

So once you first manually put the first app version in internal track, the mentioned Google Play Deploy step will work fine, you just have to set it's status property to draft.

like image 35
bra.Scene Avatar answered Oct 08 '22 08:10

bra.Scene


I did solve the problem, although to be honest, I don't remember exactly what I did. I believe I manually uploaded the first APK to the Alpha channel in the Play console. Then I released that version internally. After that I was able to upload automatically from Jenkins.

like image 17
Bryan Deemer Avatar answered Oct 08 '22 09:10

Bryan Deemer


If your app is in "draft" state, the Play Console API refuses releases that are not in the "draft" state. It's unclear whether the API supports releasing without submitting the app setup forms (I filed feedback). You can then release on the web page once the draft release is created, but it's a manual step.

See this issue for a similar tool: https://github.com/eventOneHQ/apkup/issues/49

The problem probably resolved itself for you because by creating an Alpha channel release also completed the app setup, moving the app away from the draft state (it should say "Closed testing" in the app selector).

like image 5
Christian Z. Avatar answered Oct 08 '22 08:10

Christian Z.