-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Error on Ubuntu-24.04 #400
Comments
Use ubuntu 22.04 instead of ubuntu latest for running the android tests because the emulator runner has issues on 24.04 ReactiveCircus/android-emulator-runner#400 Add some improved test failure messages.
Is there any workaround? |
I also ran into this. |
…to ubuntu-24.04 which is not supported by action: ReactiveCircus/android-emulator-runner#400
…e older ubuntu it breaks on ubuntu-24.04 which is now ubuntu-latest: ReactiveCircus/android-emulator-runner#400
…e older ubuntu it breaks on ubuntu-24.04 which is now ubuntu-latest: ReactiveCircus/android-emulator-runner#400
At its heart it is an environment variable problem. With some console.logs from a forked version of this repo you can see that the AVD-related pathing is messed up for some reason: https://github.com/ankidroid/Anki-Android-Backend/actions/runs/11281139144/job/31383662978#step:4:90
What is that ??
...there is an extra I'll post a PR that patches it up here but I think you could add this to an
(from here https://developer.android.com/tools/variables#envar) When I set those in my forked + fixed version of the action things started working https://github.com/ankidroid/Anki-Android-Backend/actions/runs/11281139144/job/31384483722 |
@mikehardy thanks for the investigation. From my testing it seems like it's due to the following directory no longer After creating the directory the tests started working: https://github.com/ReactiveCircus/android-emulator-runner/actions/runs/11284138596/job/31384839511 |
that's strange @ychescale9 because I didn't have to create the directory to get it working, I just had to define the env vars 😆 - I just about have the commits lined up and a PR for it - obviously if you've got it fixed then that's fine to close, but a published vs of the fork with just env vars defined did work. |
There you go @ychescale9 - I just posted up a batch of PRs that worked together to get things working well on my end - hopefully they are useful? I've been using this action forever and I really appreciate the maintenance, just offering the PRs in case they're useful. Cheers |
This hopefully has been fixed in the latest commit. Would anyone be able to test your workflows on |
@ychescale9 this is queued and will run against that SHA once a runner is assigned: https://github.com/ankidroid/Anki-Android-Backend/actions/runs/11284602925/job/31386054640 (the build itself will have instrumented test failures inside the emulator but the emulator should start up fine) |
Okay, so that test failed - the problem with that commit is a typical actions developer problem I found when I forked this repo and tried to fix it myself:
I was only able to test my changes when I worked off the release/v2 branch on my fork for that reason I believe your changes will work, but not until merged on to release/v2 or unless you make a branch where the Separately, I was able to get a raw emulator working with just the env vars as mentioned above, in a repo where I don't use this action, the diff that fixed that workflow was just this in the
https://github.com/react-native-device-info/react-native-device-info/pull/1667/files |
Thanks @mikehardy. I also agree that #405 might be a better fix as IIRC setting that envar explicitly was to better support self hosted runners. I'll try to verify that quickly. |
|
Perhaps - but the mingling of ANDROID_AVD_HOME with XDG_CONFIG_HOME is something that shouldn't be left to chance I think, and not setting the other variables (ANDROID_USER_HOME / ANDROID_EMULATOR_HOME) is also leaving things to chance Plus, the command line tools issue where there is a simple directory check to trigger install vs either purging+forcing-current (you're style) or checking-version+installing-if-needed (my PR) is a thing And finally, the chown thing will make this action fragile to future changes as they may also purge out parts of android toolchain in ubuntu-26 and the chown will fail as it tries to operate on non-existent files - so it should either be removed (as you did) or done safely (as I proposed) So - still some real issues here, but the action may be able to continue functioning without change now, maybe with some env vars defined, maybe not even that... |
The fix is available in the latest release: https://github.com/ReactiveCircus/android-emulator-runner/releases/tag/v2.33.0 |
@ychescale9 champion! Thanks again in general for this action, as mentioned way way above, I use it in lots of repos and I really appreciate it. Now that the emergency compatibility for ubuntu-24 appears to be handled, do you have any interest in rebased / updated PRs for the things I saw?
I'd be happy to clean up my PRs for those and resubmit but I also don't want to waste your time if you are tired of the whole thing and want to ignore it at least for now :-). Cheers |
Thanks @mikehardy
I think in the past the cmdline-tools wasn't pre-installed in the runners so I wanted to always install and use the tools from the cmdline tools (instead of the deprecated ones) when running the action. Now that the cmdline-tools is pre-installed I'm not sure it's worth always checking the version, deleting it, downloading and installing the latest at the start of every action run. If we do want to support overriding the default version installed perhaps providing an action input option makes more sense. Though I'm leaning towards just removing that step from our end. BTW checking the existence of the path was to support #74 Re. the ANDROID_AVD_HOME I did some experiment and it seemed like the env var is always undefined so I didn't look into setting it dynamically. Anyway I'm happy to continue the conversation in separate issues / github discussions. |
don't forget the self-hosted runner case :-)
They go stale, for instance current installed version is version 12, but 16 is out. v12 sdkmanager cannot handle XML v4 while v16 sdkmanager can, so updating can reduce log spam I'll log issues I guess ? The PRs already exist I guess I'll just make my case there then either close them or not |
Hello,
First of all, emulators on Linux images are pretty cool. Having said that, I've noticed an issue - it doesn't work on Ubuntu-24.04 (beta). We need to use Ubuntu-22.04 (latest).
Just wanted to file this as an issue, because it took me some time to figure out why my CI is red.
Here's a sample run with Ubuntu-22.04 and Ubuntu-24.04 - https://github.com/ViliusSutkus89/android-emulator-runner-ubuntu-24.04/actions/runs/9594927854
Ubuntu-24.04 errors out:
Workflow file:
The text was updated successfully, but these errors were encountered: