App icon indicating copy to clipboard operation
App copied to clipboard

Android Production Deploys are failing

Open Jag96 opened this issue 5 years ago • 10 comments

Keeping this issue internal since this requires Google Play access to confirm the builds show up in the internal track cc @Expensify/mobile-deployers

Expected Result:

Android deploys such as this one should succeed

Actual Result:

Android deploys are failing with the following error message: Track 'internal' doesn't have any releases

Action Performed:

This happens during the Run Fastlane step of the Build and Deploy Android action

Platform:

Where is this issue occurring?

  • Android

For the run mentioned above, we see [22:53:31]: Found '1001004400' version codes in track 'internal' in the logs, and in the google play console we see that the 1.0.44-0 release is in the Internal Testing track, but for some reason fastlane still doesn't see the release.

Potentiall related: https://github.com/fastlane/fastlane/issues/18497

Jag96 avatar May 13 '21 23:05 Jag96

@roryabraham did you have any ideas or additional context on this one? Thanks!

AndrewGable avatar May 19 '21 08:05 AndrewGable

@AndrewGable Unfortunately no additional context beyond what @Jag96 wrote up here

roryabraham avatar May 19 '21 15:05 roryabraham

Any @Expensify/mobile-deployers have any extra bandwidth to look into this?

roryabraham avatar May 28 '21 01:05 roryabraham

Had a quick look at this today since the build failed again, going to create a PR to see if I can get it working. Notes:

  • Since version 2.135.0, it seems that Google Play automatically removes releases that are superseded (see check_superseded_tracks)
  • The code that throws this error is here
  • When we create the production build, we're re-using the previously used version, but we don't specify version_codes_to_retain in the upload_to_play_store config, which could be causing the issue
  • Looking at this failed build, the build fails at 00:42:00 whereas the next closest build uploads at 00:55:00, so it doesn't look like this is caused by a new build overwriting the old one

Jag96 avatar Jun 08 '21 03:06 Jag96

Or it could be b/c the version_code is just set to 0 🤦 image

Jag96 avatar Jun 08 '21 04:06 Jag96

Ok, not sure what the issue is here. Running the echo command that sets the output seems to be working find locally, and the path seems correct since we run similar commands that make it seem we're in the root. cc @AndrewGable in case you have any ideas since you wrote the regex

Jag96 avatar Jun 08 '21 05:06 Jag96

Yeah I think I see the bug, looks like this should be VERSION_CODE because in Ruby we expect it to be that name instead of VERSION

AndrewGable avatar Jun 08 '21 21:06 AndrewGable

Looks like this is still happening here: https://github.com/Expensify/Expensify.cash/runs/2778864820?check_suite_focus=true

Jag96 avatar Jun 08 '21 23:06 Jag96

I believe we've narrowed it down to the regex doesn't work on Ubuntu and used to work on MacOS

AndrewGable avatar Jun 09 '21 00:06 AndrewGable

After confirming that the current regex doesn't work in our ubuntu VMs, I found a variation that does seem to work in both ubuntu and macOS:

echo "VERSION_CODE=$(grep -e 'versionCode\s\+[0-9]\+' android/app/build.gradle | awk '{ print $2 }')"

roryabraham avatar Jun 09 '21 00:06 roryabraham