fastlane: Fastlane supply aab to internal track fail with google api error bad request

Issue Description

fastlane supply aab to our publishing portal internal track was working fine, now we get the following error:

[!] Google Api Error: badRequest: Changes cannot be sent for review automatically. Please set the query parameter changesNotSentForReview to true. Once committed, the changes in this edit can be sent for review from the Google Play Console UI. - Changes cannot be sent for review automatically. Please set the query parameter changesNotSentForReview to true. Once committed, the changes in this edit can be sent for review from the Google Play Console UI.

Command executed

bundle exec fastlane supply --aab appname.aab --track internal

Complete output when running fastlane, including the stack trace and command used

$ bundle exec fastlane supply --aab lyriko.aab --track internal ±--------------------------------±------------------------------------------------------------+ | Summary for supply 2.182.0 | ±--------------------------------±------------------------------------------------------------+ | aab | lyriko.aab | | track | internal | | package_name | air.com.skylightgames.lyriko | | release_status | completed | | json_key | ./fastlane/api-4979299170780649289-597766-cab2b2122efe.json | | skip_upload_apk | false | | skip_upload_aab | false | | skip_upload_metadata | false | | skip_upload_changelogs | false | | skip_upload_images | false | | skip_upload_screenshots | false | | validate_only | false | | check_superseded_tracks | false | | timeout | 300 | | deactivate_on_promote | true | | ack_bundle_installation_warning | false | ±--------------------------------±------------------------------------------------------------+ [12:06:55]: Preparing aab at path ‘lyriko.aab’ for upload… [12:09:40]: Updating track ‘internal’… [12:09:40]: Uploading all changes to Google Play… [!] Google Api Error: badRequest: Changes cannot be sent for review automatically. Please set the query parameter changesNotSentForReview to true. Once committed, the changes in this edit can be sent for review from the Google Play Console UI. - Changes cannot be sent for review automatically. Please set the query parameter changesNotSentForReview to true. Once committed, the changes in this edit can be sent for review from the Google Play Console UI. Cleaning up file based variables 00:00 ERROR: Job failed: exit status 1

Environment

✅ fastlane environment ✅

Stack

Key Value
OS 11.2.3
Ruby 2.6.3
Bundler? false
Git git version 2.21.0
Installation Source /usr/local/bin/fastlane
Host macOS 11.2.3 (20D91)
Ruby Lib Dir /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
OpenSSL Version LibreSSL 2.8.3
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 12.5

System Locale

Variable Value
LANG en_US.UTF-8
LC_ALL en_US.UTF-8
LANGUAGE

fastlane files:

`./Fastfile`
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

default_platform(:ios)

platform :ios do
  desc "Description of what the lane does"
  lane :custom_lane do
    # add actions here: https://docs.fastlane.tools/actions
  end
end

`./Appfile`
json_key_file("./fastlane/api-4979299170780649289-597766-cab2b2122efe.json")
package_name("air.com.skylightgames.lyriko")


# For more information about the Appfile, see:
#     https://docs.fastlane.tools/advanced/#appfile

fastlane gems

Gem Version Update-Status
fastlane 2.182.0 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.3.0
atomos 0.1.3
claide 1.0.3
colored2 3.1.2
nanaimo 0.3.0
xcodeproj 1.19.0
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
unicode-display_width 1.7.0
terminal-table 1.8.0
plist 3.6.0
public_suffix 4.0.6
addressable 2.7.0
multipart-post 2.0.0
word_wrap 1.0.0
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
artifactory 3.0.15
babosa 1.0.4
colored 1.2
highline 2.0.3
commander 4.6.0
faraday-excon 1.1.0
faraday-net_http 1.0.1
faraday-net_http_persistent 1.1.0
ruby2_keywords 0.0.4
faraday 1.4.1
unf_ext 0.0.7.7
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.3
faraday-cookie_jar 0.0.7
faraday_middleware 1.0.0
fastimage 2.2.3
gh_inspector 1.1.3
mini_magick 4.11.0
naturally 2.2.1
rubyzip 2.3.0
security 0.1.3
xcpretty-travis-formatter 1.0.1
dotenv 2.7.6
bundler 2.2.16
simctl 1.6.8
jwt 2.2.3
uber 0.1.0
declarative 0.0.20
trailblazer-option 0.1.1
representable 3.1.1
retriable 3.1.2
mini_mime 1.1.0
multi_json 1.15.0
signet 0.15.0
httpclient 2.8.3
google-api-client 0.38.0
google-cloud-env 1.5.0
google-cloud-errors 1.1.0
google-cloud-core 1.6.0
google-apis-core 0.3.0
google-apis-iamcredentials_v1 0.3.0
google-apis-storage_v1 0.3.0
digest-crc 0.6.3
google-cloud-storage 1.31.0
emoji_regex 3.2.2
CFPropertyList 3.0.3
excon 0.81.0
json 2.5.1
os 1.1.1
memoist 0.16.2
googleauth 0.16.2
rexml 3.2.5
webrick 1.7.0
rake 13.0.3
aws-eventstream 1.1.1
aws-sigv4 1.2.3
aws-partitions 1.452.0
jmespath 1.4.0
aws-sdk-core 3.114.0
aws-sdk-kms 1.43.0
aws-sdk-s3 1.94.1
forwardable 1.2.0
logger 1.3.0
date 2.0.0
stringio 0.0.2
zlib 1.0.0
ipaddr 1.2.2
openssl 2.1.2
ostruct 0.1.0
strscan 1.0.0
io-console 0.4.7
fileutils 1.1.0
etc 1.0.1
libxml-ruby 3.1.0
psych 3.1.0
mutex_m 0.1.0

generated on: 2021-05-10

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 28
  • Comments: 31 (6 by maintainers)

Commits related to this issue

Most upvoted comments

Maybe this could be a feature request for fastlane to allow users to set changesNotSentForReview with supply. That way people could update their scripts in the case that a previous build was rejected.

It is great to see that some people still put in an effort into managing their websites.

stopelon

Yeah that looks to be the case - our nightly internal builds got rejected due to some weird meta policy violation. Our app description doesn’t change but every one in a while we get rejected and then it goes away. That’s what happened here. Doesn’t seem to be a fastlane issue, the issue is on google’s side.

On Wed, May 12, 2021 at 12:36 PM Andy Wooller @.***> wrote:

Not sure if this is related. But i found this on the GPlay docs.

Depending on the your app’s update status, it may not be sent for review automatically. For example, if your app update was rejected and you’ve subsequently made changes in an attempt to resolve the issue, your changes aren’t sent for review automatically. You must go to the Publishing overview page and click Send for review to submit your changes. Learn more about app update statuses.

In my case a previous internal track release was rejected by google and therefore i submitted a new internal track release with fastlane to fix the problems. I’m guessing this is why i cant automatically send changes to review?

Would be interested to know if @Imtayaz https://github.com/Imtayaz and @oscargoldman https://github.com/oscargoldman were in the same situation?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fastlane/fastlane/issues/18670#issuecomment-840009678, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABAFBPSQ2L755ZJGPN4P3C3TNLDBRANCNFSM44R3BA5A .

Not sure if this is related. But i found this on the GPlay docs.

Depending on the your app’s update status, it may not be sent for review automatically. For example, if your app update was rejected and you’ve subsequently made changes in an attempt to resolve the issue, your changes aren’t sent for review automatically. You must go to the Publishing overview page and click Send for review to submit your changes. Learn more about app update statuses.

In my case a previous internal track release was rejected by google and therefore i submitted a new internal track release with fastlane to fix the problems. I’m guessing this is why i cant automatically send changes to review?

Would be interested to know if @Imtayaz and @oscargoldman were in the same situation?

Certainly very frustrating. Basically if there’s a rejected build then you have to set that property to true but if there isn’t then you must not set the property. And the proper setting varies build-by-build. Maybe there’s a way to derive the setting that won’t cause an error from the api but in the end it’ll end with inconsistent behavior

I think it needs to be fixed with a change along these lines:

diff --git a/supply/lib/supply/client.rb b/supply/lib/supply/client.rb
index fd745f76c..f17b110c3 100644
--- a/supply/lib/supply/client.rb
+++ b/supply/lib/supply/client.rb
@@ -162,7 +162,7 @@ module Supply
     def commit_current_edit!
       ensure_active_edit!
 
-      call_google_api { client.commit_edit(current_package_name, current_edit.id) }
+      call_google_api { client.commit_edit(current_package_name, current_edit.id, changes_not_sent_for_review: true) }
 
       self.current_edit = nil
       self.current_package_name = nil

I can make a Pull Request with this change, it may need to be configurable though?

@felixwortmann yeah what @LukevanTricht said seems to be the only work around at the moment. Thats what i did to resolve it too.

Unfortunately it still means that if a build fails review in the future, your pipeline will encounter this error again.

Not sure how this can be fixed from a supply point of view. i guess the only way would be to have an API call to check if the previous build failed review, and if so then don’t send the build automatically for review.