fastlane: Google Api Error: Server error when releasing to Google Play
New Issue Checklist
- Updated fastlane to the latest version
- I read the Contribution Guidelines
- I read docs.fastlane.tools
- I searched for existing GitHub issues
Issue Description
When publishing to Google Play we’re receiving Google Api Error: Server error. Tried many stuffs, update fastlane, change parameters, execute on different machines, but it still.
Command executed
lane :deployToAlpha do |options|
upload_to_play_store(json_key: options[:jsonKey],
track: 'alpha',
mapping: options[:mappingPath],
apk: options[:apkPath])
end
Complete output when running fastlane, including the stack trace and command used
bash scripts/release_alpha.sh [16:50:04]: [33mGet started using a Gemfile for fastlane https://docs.fastlane.tools/getting-started/ios/setup/#use-a-gemfile[0m DEBUG [2019-06-17 16:50:05.24]: Checking if there are any plugins that should be loaded... [33mSuccessfully loaded Appfile at path '/Users/pnonaka/projects/latammobileandroid/fastlane/Appfile'[0m - [36mpackage_name[0m: '[32mmobile.latam.com.latamapp[0m' ------- DEBUG [2019-06-17 16:50:05.37]: Using jsonKey: /Users/pnonaka/projects/latammobileandroidcertificates/fastlane.json DEBUG [2019-06-17 16:50:05.37]: Using mappingPath: app/build/outputs/mapping/prod/release/mapping.txt DEBUG [2019-06-17 16:50:05.37]: Using apkPath: app/build/outputs/apk/prod/release/app-prod-release.apk INFO [2019-06-17 16:50:05.37]: [32m------------------------------[0m INFO [2019-06-17 16:50:05.37]: [32m--- Step: default_platform ---[0m INFO [2019-06-17 16:50:05.37]: [32m------------------------------[0m INFO [2019-06-17 16:50:05.38]: [32mDriving the lane 'android deployToAlpha' 🚀[0m INFO [2019-06-17 16:50:05.38]: [32m----------------------------------[0m INFO [2019-06-17 16:50:05.38]: [32m--- Step: upload_to_play_store ---[0m INFO [2019-06-17 16:50:05.38]: [32m----------------------------------[0m [33mSuccessfully loaded Appfile at path '/Users/pnonaka/projects/latammobileandroid/fastlane/Appfile'[0m - [36mpackage_name[0m: '[32mmobile.latam.com.latamapp[0m' ------- [33mSuccessfully loaded Appfile at path '/Users/pnonaka/projects/latammobileandroid/fastlane/Appfile'[0m - [36mpackage_name[0m: '[32mmobile.latam.com.latamapp[0m' ------- [33mSuccessfully loaded Appfile at path '/Users/pnonaka/projects/latammobileandroid/fastlane/Appfile'[0m - [36mpackage_name[0m: '[32mmobile.latam.com.latamapp[0m' ------- [33mSuccessfully loaded Appfile at path '/Users/pnonaka/projects/latammobileandroid/fastlane/Appfile'[0m - [36mpackage_name[0m: '[32mmobile.latam.com.latamapp[0m' ------- [33mSuccessfully loaded Appfile at path '/Users/pnonaka/projects/latammobileandroid/fastlane/Appfile'[0m - [36mpackage_name[0m: '[32mmobile.latam.com.latamapp[0m' -------±------------------------±--------------------------------------------------------------+ | [32mSummary for supply 2.125.2[0m | ±------------------------±--------------------------------------------------------------+ | json_key | /Users/pnonaka/projects/latammobileandroidcertificates/fastl | | | ane.json | | track | alpha | | mapping | app/build/outputs/mapping/prod/release/mapping.txt | | apk | app/build/outputs/apk/prod/release/app-prod-release.apk | | package_name | mobile.latam.com.latamapp | | metadata_path | ./fastlane/metadata/android | | skip_upload_apk | false | | skip_upload_aab | false | | skip_upload_metadata | false | | skip_upload_images | false | | skip_upload_screenshots | false | | validate_only | false | | check_superseded_tracks | false | | timeout | 300 | | deactivate_on_promote | true | ±------------------------±--------------------------------------------------------------+
DEBUG [2019-06-17 16:50:05.39]: Fetching a new access token from Google… INFO [2019-06-17 16:50:06.78]: Preparing to upload for language ‘en-US’… INFO [2019-06-17 16:50:07.32]: Uploading image file ./fastlane/metadata/android/en-US/images/icon.png… WARN [2019-06-17 16:50:44.90]: [33m[33mLane Context:[0m INFO [2019-06-17 16:50:44.90]: {:DEFAULT_PLATFORM=>:android, :PLATFORM_NAME=>:android, :LANE_NAME=>“android deployToAlpha”} ERROR [2019-06-17 16:50:44.90]: [31mGoogle Api Error: Server error - [0m INFO [2019-06-17 16:50:44.90]: [32mSuccessfully generated documentation at path '/Users/pnonaka/projects/latammobileandroid/fastlane/README.md’[0m
±-----±---------------------±------------+ | [32mfastlane summary[0m | ±-----±---------------------±------------+ | Step | Action | Time (in s) | ±-----±---------------------±------------+ | 1 | default_platform | 0 | | 💥 | [31mupload_to_play_store[0m | 39 | ±-----±---------------------±------------+
ERROR [2019-06-17 16:50:44.91]: [31mfastlane finished with errors[0m
Environment
✅ fastlane environment ✅
Stack
Key Value OS 10.14.2 Ruby 2.6.0 Bundler? false Git git version 2.21.0 Installation Source ~/.rbenv/versions/2.6.0/bin/fastlane Host Mac OS X 10.14.2 (18C54) Ruby Lib Dir ~/.rbenv/versions/2.6.0/lib OpenSSL Version OpenSSL 1.0.2q 20 Nov 2018 Is contained false Is homebrew false Is installed via Fabric.app false Xcode Path /Applications/Xcode-10.1.app/Contents/Developer/ Xcode Version 10.1 System Locale
Variable Value LANG en_US.UTF-8 ✅ LC_ALL en_US.UTF-8 ✅ LANGUAGE fastlane files:
`./fastlane/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(:android) platform :android do desc "Deploy a new APK to Alpha" lane :deployToAlpha do |options| upload_to_play_store(json_key: options[:jsonKey], track: 'alpha', mapping: options[:mappingPath], apk: options[:apkPath]) end desc "Promote current APK from Alpha to Beta" lane :promoteToBeta do |options| upload_to_play_store(json_key: options[:jsonKey], track: 'alpha', track_promote_to: 'beta', rollout: '1.0', skip_upload_apk: true, skip_upload_metadata: false, skip_upload_images: true, skip_upload_screenshots: true) end desc "Promote current APK from Alpha to Production" lane :promoteToProduction do |options| upload_to_play_store(json_key: options[:jsonKey], track: 'alpha', track_promote_to: 'production', rollout: '1.0', skip_upload_apk: true, skip_upload_metadata: false, skip_upload_images: true, skip_upload_screenshots: true) end end`./fastlane/Appfile`
package_name("mobile.latam.com.latamapp") # e.g. com.krausefx.appfastlane gems
Gem Version Update-Status fastlane 2.125.2 ✅ Up-To-Date Loaded fastlane plugins:
No plugins Loaded
Loaded gems
Gem Version did_you_mean 1.3.0 slack-notifier 2.3.2 atomos 0.1.3 CFPropertyList 3.0.0 claide 1.0.2 colored2 3.1.2 nanaimo 0.2.6 xcodeproj 1.8.2 rouge 2.0.7 xcpretty 0.3.0 terminal-notifier 2.0.0 terminal-table 1.8.0 plist 3.5.0 multipart-post 2.0.0 word_wrap 1.0.0 public_suffix 2.0.5 tty-screen 0.6.5 tty-spinner 0.9.0 babosa 1.0.2 colored 1.2 highline 1.7.10 commander-fastlane 4.4.6 faraday 0.15.4 unf 0.1.4 domain_name 0.5.20180417 http-cookie 1.0.3 faraday-cookie_jar 0.0.6 fastimage 2.1.5 gh_inspector 1.1.3 mini_magick 4.5.1 multi_xml 0.6.0 rubyzip 1.2.2 security 0.1.3 xcpretty-travis-formatter 1.0.0 naturally 2.2.0 simctl 1.6.5 jwt 2.1.0 uber 0.1.0 declarative 0.0.10 declarative-option 0.1.0 representable 3.0.4 retriable 3.1.2 mime-types 3.2.2 multi_json 1.13.1 signet 0.11.0 memoist 0.16.0 os 1.0.0 googleauth 0.6.7 httpclient 2.8.3 google-api-client 0.23.9 emoji_regex 1.0.1 unicode-display_width 1.5.0 addressable 2.6.0 tty-cursor 0.6.1 excon 0.64.0 unf_ext 0.0.7.6 json 2.2.0 dotenv 2.7.2 bundler 2.0.1 faraday_middleware 0.13.1 mime-types-data 3.2019.0331 digest-crc 0.4.1 google-cloud-env 1.0.5 google-cloud-core 1.3.0 google-cloud-storage 1.16.0 forwardable 1.2.0 logger 1.3.0 ipaddr 1.2.2 openssl 2.1.2 ostruct 0.1.0 date 1.0.0 fileutils 1.1.0 mini_portile2 2.4.0 nokogiri 1.10.1 rexml 3.1.9 psych 3.1.0 mutex_m 0.1.0 generated on: 2019-06-17
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 17
- Comments: 22 (2 by maintainers)
we aren’t using
fastlane supply, but thought this might be useful.I noticed this late last week jun 13th
I use https://github.com/googleapis/google-api-ruby-client which is likely also being utilized by fastlane too i noticed a simple
Server Errorresponse coming fromupload_image(publisher_v2), even withGoogle::Apis.logger.level = Logger::DEBUGenabled, didn’t notice anything usefuli thought the issue might have to do with upgrading to publisher_v3, but this didn’t fix the issue. the only think i can see is the
resumable/mediaupload attribute might be broken, but i’m pretty sure the issue is on Google backend.I used 512x512 32bit PNG (8bit on R G B and alpha), and uploads fine on Google Play Publish.
UPDATE: logged issue https://github.com/googleapis/google-api-ruby-client/issues/804
Same for me. I received the exact same error from last Friday and it was working on last Thursday. More precisely, what does not work for me is uploading images. For example, those following configurations work:
but this configuration does not work:
Maybe it has something to do with: https://developer.android.com/google-play/resources/icon-design-specifications#instructions_for_api_users
However, I did force the new configuration for the icon on Google Play and it still does not work.
Any idea ?
@paulononakatw Yes. In my case, we need the upload of the icon.
For me it was due to Google Play new icon design spec. Fastlane had a metadata/ folder and tried to upload old icon from there, and by removing the folder the upload was success.
I received a response today from Google Play Developer Support:
I contacted Google Play Developer Support about this issue (my Google Play Developer Support issue is [8-0533000027049]). Their response:
I am asking them:
@sschendel that was it! i thought it was my image format, but even imagemagick’s
convert in.png PNG32:out.pngwill work, you just have to retry until it uploads successfully.do you think google publisher api is blue/green or canary deploying this change?
@sschendel There might be something to do with it since the date seems to match roughly. However, as explained above, I applied the new specifications on Google Play directly and it still does not work with fastlane. Uploading the same icon on Google Play does work. Did you manage to make it work via fastlane after changing the icon spec ?
I solved this by manually building as android app bundle (aab instead of apk) because my app was huge as apk (~34MB) and had to manually use fastlane supply action with supports uploading aab application.
Usually i use Fastfile but Fastfile only supports building/uploading apks and can be uploaded only with supply action.
Reference: https://github.com/googleapis/google-api-ruby-client/issues/804#issuecomment-503131447