Skip to content

Conversation

@justice-adams-apple
Copy link
Contributor

The line

${{ inputs.enable_android_sdk_checks && '--build-tests' }}

Evaluates to false when enable_android_sdk_checks is false (the default). This is because of the way the javascript boolean operators return values.

This pr ensures the default BUILD_FLAGS are empty when enable_android_sdk_checks is false

@justice-adams-apple justice-adams-apple requested a review from a team as a code owner January 9, 2026 19:13

log "Waiting for Android emulator startup"
adb start-server
sleep 5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this delay for the same reason as #223?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was consistently running into timeouts with

timeout "${ANDROID_EMULATOR_TIMEOUT}" adb wait-for-any-device
timeout: the monitored command dumped core
/home/runner/work/github-workflows/github-workflows/.github/workflows/scripts/android/android-emulator-tests.sh: line 99:  3526 Aborted                 timeout "${ANDROID_EMULATOR_TIMEOUT}" adb wait-for-any-device
WARNING      | Failed to process .ini file /home/runner/.android/emu-update-last-check.ini for reading.
Error: Process completed with exit code 134.

And no android CI was passing so this was my workaround to unblock CI. Happy to revisit though

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And adb start-server fixed this for you? Did you look over the log before the failure occurred?

I'm wondering if maybe the emulator failed to start for some other reason (like being too low in disk space: https://github.com/marketplace/actions/swift-android-action#error-timeout-waiting-for-emulator-to-boot) and the timeout was just the only indication of the issue…

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be overlooking it, but the only thing I see different between the failing log and the passing log is

ERROR        | Unable to connect to adb daemon on port: 5037

and then ultimately

timeout: the monitored command dumped core
/home/runner/work/github-workflows/github-workflows/.github/workflows/scripts/android/android-emulator-tests.sh: line 99:  3526 Aborted                 timeout "${ANDROID_EMULATOR_TIMEOUT}" adb wait-for-any-device

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not actually timing out, it is that the timeout command is reporting a core dump. It certainly didn't wait the full 300 second ANDROID_EMULATOR_TIMEOUT duration.

I wonder if maybe timeout and adb just don't play nicely together for some weird reason. I'll experiment with an alternative fix in #223 unless you want to tinker with it?

@shahmishal shahmishal merged commit e93b606 into main Jan 12, 2026
108 checks passed
@shahmishal shahmishal deleted the jadams/fix-android-boolean branch January 12, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants