Error : eas submit -p android

I have an issue while I update new version of my Expo app I try to submit :
eas submit -p android

And I had this error :


We couldn't figure out what went wrong. Please see logs to learn more.

[logs] Starting uploading Android app
[logs] Downloading archive
[logs] Preparing artifact
[logs] Uploading Android app to Play Store...
[logs] Uploading the app with fastlane supply
[logs] /var/lib/gems/2.7.0/gems/signet-0.17.0/lib/signet/oauth_2/client.rb:1028:in `fetch_access_token': [!] Authorization failed.  Server message: (Signet::AuthorizationError)
[logs] {"error":"invalid_grant","error_description":"Invalid JWT Signature."}
[logs]  from /var/lib/gems/2.7.0/gems/signet-0.17.0/lib/signet/oauth_2/client.rb:1039:in `fetch_access_token!'
[logs]  from /var/lib/gems/2.7.0/gems/googleauth-1.2.0/lib/googleauth/signet.rb:75:in `block in fetch_access_token!'
[logs]  from /var/lib/gems/2.7.0/gems/googleauth-1.2.0/lib/googleauth/signet.rb:102:in `retry_with_error'
[logs]  from /var/lib/gems/2.7.0/gems/googleauth-1.2.0/lib/googleauth/signet.rb:74:in `fetch_access_token!'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/client.rb:53:in `initialize'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/client.rb:19:in `new'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/client.rb:19:in `make_from_config'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/uploader.rb:425:in `client'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/uploader.rb:7:in `perform_upload'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/commands_generator.rb:40:in `block (2 levels) in run'
[logs]  from /var/lib/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
[logs]  from /var/lib/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
[logs]  from /var/lib/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
[logs]  from /var/lib/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/commands_generator.rb:61:in `run'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/commands_generator.rb:13:in `start'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/fastlane/lib/fastlane/cli_tools_distributor.rb:114:in `take_off'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/bin/fastlane:23:in `<top (required)>'
[logs]  from /usr/local/bin/fastlane:23:in `load'
[logs]  from /usr/local/bin/fastlane:23:in `<main>'
[logs] /var/lib/gems/2.7.0/gems/signet-0.17.0/lib/signet/oauth_2/client.rb:1028:in `fetch_access_token': Authorization failed.  Server message: (Signet::AuthorizationError)
[logs] {"error":"invalid_grant","error_description":"Invalid JWT Signature."}
[logs]  from /var/lib/gems/2.7.0/gems/signet-0.17.0/lib/signet/oauth_2/client.rb:1039:in `fetch_access_token!'
[logs]  from /var/lib/gems/2.7.0/gems/googleauth-1.2.0/lib/googleauth/signet.rb:75:in `block in fetch_access_token!'
[logs]  from /var/lib/gems/2.7.0/gems/googleauth-1.2.0/lib/googleauth/signet.rb:102:in `retry_with_error'
[logs]  from /var/lib/gems/2.7.0/gems/googleauth-1.2.0/lib/googleauth/signet.rb:74:in `fetch_access_token!'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/client.rb:53:in `initialize'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/client.rb:19:in `new'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/client.rb:19:in `make_from_config'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/uploader.rb:425:in `client'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/uploader.rb:7:in `perform_upload'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/commands_generator.rb:40:in `block (2 levels) in run'
[logs]  from /var/lib/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
[logs]  from /var/lib/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
[logs]  from /var/lib/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
[logs]  from /var/lib/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/commands_generator.rb:61:in `run'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/supply/lib/supply/commands_generator.rb:13:in `start'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/fastlane/lib/fastlane/cli_tools_distributor.rb:114:in `take_off'
[logs]  from /var/lib/gems/2.7.0/gems/fastlane-2.191.0/bin/fastlane:23:in `<top (required)>'
[logs]  from /usr/local/bin/fastlane:23:in `load'
[logs]  from /usr/local/bin/fastlane:23:in `<main>'
[logs] +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
[logs] |                                                                    Summary for supply 2.191.0
                                                   |
[logs] +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
[logs] | aab                             | /tmp/submissions/be636b4c-a7d5-4ae1-b253-2d9d7.aab |
[logs] | track                           | production
                                                   |
[logs] | json_key                        | /tmp/submissions/be636b4c-a7d5-4ae1-b253-2d9d7b8054c6/service-account.json                                                      |
[logs] | package_name                    | com.plant.name
                                                   |
[logs] | changes_not_sent_for_review     | false
                                                   |
[logs] | release_status                  | completed
                                                   |
[logs] | skip_upload_apk                 | false
                                                   |
[logs] | skip_upload_aab                 | false
                                                   |
[logs] | skip_upload_metadata            | false
                                                   |
[logs] | skip_upload_changelogs          | false
                                                   |
[logs] | skip_upload_images              | false
                                                   |
[logs] | skip_upload_screenshots         | false
                                                   |
[logs] | validate_only                   | false
                                                   |
[logs] | check_superseded_tracks         | false
                                                   |
[logs] | timeout                         | 300
                                                   |
[logs] | deactivate_on_promote           | true
                                                   |
[logs] | ack_bundle_installation_warning | false
                                                   |
[logs] +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------+
[logs]
[logs]
[logs] Looking for related GitHub issues on fastlane/fastlane...
[logs]
[logs] ➡️  Authorization failed: invalid_grant - Invalid JWT Signature.
[logs]     https://github.com/fastlane/fastlane/issues/15600 [closed] 5 💬
[logs]     15 Mar 2020
[logs] Fastlane supply failed
[logs] Failed to submit the app

Any suggestion please

Hi @keltouma

Does the GitHub issue mentioned in the error log help at all?

I didn’t get your question?

there is a link to a github issue in the output you posted, did you check that?

1 Like

This is what I am referring to. Go to that URL and see if it helps.

I fixed it butI still have this error :

[logs] [!] Google Api Error: Invalid request - Cannot replace a bundle of version code 2 with an APK.
[logs] Fastlane supply failed
[logs] Failed to submit the app

It looks like you previously submitted a .aab file and the Android “versionCode” in app.json for that build was 2. It looks like you are now trying to submit a .apk file.

You should rather submit .aab files to the Play Store because Google can then generate a smaller APK customized for the device when the device downloads it from Google Play. Also check that the versionCode in app.json for the version that you are trying to submit is higher than the previously submitted version. i.e. it should be 3 or higher.

Yeah I did what u said literally, still not working :confused:

If you log onto the Google Play Console and choose your app, then click on “Releases overview”, check the first number in the “Release” column and the number in the “Latest version” column. Add one to that and set the “versionCode” in app.json to that number. Then build again and submit the resulting .aab file.

e.g. if you previously had:

{
  "expo": {
    "name": "XXX",
    "slug": "xxx",
    "version": "1.0.0",
    "android": {
      "versionCode": 5
    },
[...]
  }
}

then you would need to update versionCode to 6, rebuild and submit it again.

I have the same error my first release was :

{
  "expo": {
    "name": "XXX",
    "slug": "xxx",
    "version": "1.0.0",
    "android": {
      "versionCode": 1
    },
[...]
  }
}

and now I’m trying to update my app so it’s my second release :

{
  "expo": {
    "name": "XXX",
    "slug": "xxx",
    "version": "1.0.1",
    "android": {
      "versionCode": 2
    },
[...]
  }
}

Which error are you referring to?

Cannot replace a bundle of version code 2 with an APK.

Or:

You’ve already submitted this version of the app

If it’s the latter, can you show a screenshot of the “Latest releases” of your app from the Google Play console?

Thank you now it’s working

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.