Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Production Deploys are failing #2918

Closed
Jag96 opened this issue May 13, 2021 · 10 comments · Fixed by #3445 or #3456
Closed

Android Production Deploys are failing #2918

Jag96 opened this issue May 13, 2021 · 10 comments · Fixed by #3445 or #3456
Assignees

Comments

@Jag96
Copy link
Contributor

Jag96 commented May 13, 2021

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: fastlane/fastlane#18497

@AndrewGable
Copy link
Contributor

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

@roryabraham
Copy link
Contributor

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

@roryabraham
Copy link
Contributor

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

@Jag96
Copy link
Contributor Author

Jag96 commented Jun 8, 2021

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
Copy link
Contributor Author

Jag96 commented Jun 8, 2021

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

@Jag96
Copy link
Contributor Author

Jag96 commented Jun 8, 2021

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

@AndrewGable
Copy link
Contributor

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

@Jag96
Copy link
Contributor Author

Jag96 commented Jun 8, 2021

@Jag96 Jag96 reopened this Jun 8, 2021
@AndrewGable
Copy link
Contributor

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

@roryabraham
Copy link
Contributor

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 }')"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants