dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.19k stars 1.75k forks source link

Only releases with status draft may be created on draft app. #16291

Open kdubious opened 1 year ago

kdubious commented 1 year ago

Description

I am getting this error trying to publish the Android app to the Play store.

I have already manually uploaded the first AAB bundle. I'm using the Intrnal track.

Is there a way to tell Visual Studio to set that flag during the "Distribute..." process?

Steps to Reproduce

  1. Create MAUI app
  2. Publish with Release and Android Emulator selected
  3. Distribute the bundle manually (Ad Hoc) on the "Internal" track
  4. Edit the app
  5. Increment the version
  6. Publish the new version with Release and Android Emulator selected
  7. Distribute the bundle with the Google Play option for the channel
  8. Select the "Internal" track

Link to public reproduction project repository

Any Maui Project

Version with bug

Unknown/Other

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

All?

Did you find any workaround?

No response

Relevant log output

No response

Redth commented 1 year ago

I believe you want to keep your android:versionName the same while updating your android:versionCode.

To do this with MAUI project properties, keep in mind that <ApplicationVersion>1</ApplicationVersion> maps to android:versionCode and that <ApplicationDisplayVersion>1.0.0</ApplicationDisplayVersion> maps to android:versionName.

So, you'd want to increment your <ApplicationVersion> value and leave the other one the same for now.

kdubious commented 1 year ago

Thanks, @Redth, I'm trying this out now.

To expand on your post:

kdubious commented 1 year ago

Well, it seems I have been doing that right:

In the Google Play console: image

In VS2022: image

For reference, both of the top 2 entries below failed to upload with the same message: image

image

@Redth, are we sure the publishing tool is calling the Google API with the Draft flag? All my search results (none of which have been related to publishing Maui) all seem to indicate that flag is required in our scenario.

SKSniperSK commented 1 year ago

Hi, I am having the exact same issue. I followed the guide at https://learn.microsoft.com/en-us/dotnet/maui/android/deployment/publish-google-play step by step and everything worked until the very end, where I also received the error message "Only releases with status draft may be created on draft app." This happens even though VS states that it will upload the release in draft state: image

carljohansen commented 1 year ago

I'm also having the same issue. I'm not using MAUI; I'm actually using MonoGame for Android. I had been uploading my bundles to my internal track manually using Google Play Console (the first step is to do an 'Ad Hoc' distribution in VS2022). That's a tedious process so I finally decided to give the VS2022 'Google Play' distribution a try. But I get the "Only releases with status draft may be created on draft app" error.

ninachen03 commented 9 months ago

Verified this issue with Visual Studio Enterprise 17.9.0 Preview 5. Can repro on Android platform with default maui project. error

here is a workaround, you must Discard release your draft in Google play Console( find your Application go to Testing->internal testing->Discard release) Discard

then upload again in vs

hegold commented 8 months ago

@ninachen03 Please note that while you are correct that it errors when there is an existing draft release (Only one draft release is allowed), that is not the reported issue (Only releases with status draft may be created on draft app). I am experiencing the reported issue and there is no existing draft release, and I cannot find a workaround other than to manually upload. Is VS correctly identifying the release as a draft when trying to publish it?

osyyyS commented 6 months ago

Same problem here.

bradyguyc commented 5 months ago

exact same problem. Anyone know if there are log files anywhere that we can confirm if the draft flag is being used?