Android Production Deploys are failing
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
@roryabraham did you have any ideas or additional context on this one? Thanks!
@AndrewGable Unfortunately no additional context beyond what @Jag96 wrote up here
Any @Expensify/mobile-deployers have any extra bandwidth to look into this?
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_retainin theupload_to_play_storeconfig, which could be causing the issue - Looking at this failed build, the build fails at
00:42:00whereas the next closest build uploads at00:55:00, so it doesn't look like this is caused by a new build overwriting the old one
Or it could be b/c the version_code is just set to 0 🤦

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
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
Looks like this is still happening here: https://github.com/Expensify/Expensify.cash/runs/2778864820?check_suite_focus=true
I believe we've narrowed it down to the regex doesn't work on Ubuntu and used to work on MacOS
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 }')"