You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Android is off on an emulator that does not accept -crash-report-mode #1297
With Android emulator 36.1.9, simlock doctor reports Missing [android] android-emulator: The installed Android emulator does not accept -crash-report-mode, which Simlock passes on every launch. Run sdkmanager --install emulator., and Android is off until the emulator is updated.
What you expected
Simlock checks what the installed emulator accepts and passes -crash-report-mode never only when it does. An older emulator still runs Android leases, just without that flag.
How to reproduce
Install Android emulator 36.1.9 (emulator -help does not list -crash-report-mode).
simlock doctor: the finding above, and no Android leases.
Environment
Simlock 0.5.0 package at main 14a3f826b, macOS 27.0.1 arm64, Xcode 27.1, Android emulator 37.2.13. Found in the 0.6 release E2E run on 2026-11-05. Seen first with emulator 36.1.9, fixed by updating to 37.2.13.
Logs and evidence
src/drivers/android/emulator.ts:265 passes the flag on every launch, with no version check.
src/drivers/android/prerequisites.ts:14 lists -crash-report-mode as required, and the check at :103-121 marks Android missing when emulator -help omits it.
Gap: the flag is required on purpose (#1186, #1232). Nothing checks what the emulator accepts. The test expectations are a proposal. Branch bug/1297-repro (b5ded02):
pnpm exec vitest run --project unit src/drivers/android/prerequisites.test.ts src/drivers/android/index.test.ts -t 1297
index.test.ts:374 "starts the seed's boots and the copy's boot without -crash-report-mode when the installed emulator's -help does not list it, keeping every other launch flag (#1297)"
- crashReportMode: false (seed boot x2, copy boot)
+ crashReportMode: true (all three)
prerequisites.test.ts:137 "reports nothing missing for an emulator whose -help lists every launch flag but -crash-report-mode ... (#1297)"
- []
+ [{ prerequisite: "android-emulator", message: "The installed Android emulator does not accept -crash-report-mode, ..." }]
On this host, emulator 36.5.11 lists the flag in -help, and -help takes 0.14 s.
Root cause
src/drivers/android/emulator.ts:265-266 passes -crash-report-mode never on every launch. prerequisites.ts:14 makes the flag required, so outdatedEmulator (:103-121) reports it. The doctor finding is the symptom. The real failure is that every boot on an older emulator exits at unknown option (#1232).
Simplest fix
Emulator: probe emulator -help once per instance, reusing the prerequisites regex. Pass the flag only if the help lists it. Keep the crash-database env either way.
Drop the flag from REQUIRED_EMULATOR_FLAGS. The test at prerequisites.test.ts:118 then uses another flag.
Answer -help in the fakes (testing.ts:1034, the seed stages, daemon/main.test.ts:2477).
Update requirements.mdx:53 and the driver manual.
Alternatives rejected
Document a minimum version instead: that is today's behaviour, which the issue rejects.
Compare emulator -version: no one knows the first version with the flag (after 36.1.9, at or before 36.5.11).
Question: when emulator -help fails or times out, should Simlock pass -crash-report-mode never?
Leave the flag out (taken). The boot goes ahead. An old emulator still boots. A new emulator boots without the flag, so the crash-report prompt may show if -help failed.
Pass the flag. A new emulator gets the flag. An old emulator fails to boot, which is the bug this PR fixes.
Fail the boot. The lease fails with an error, even on emulators that would have booted.
Why: a boot never fails on this flag, and it matches the PR's own assumption. Reverting: change the .catch(() => []) fallback in src/drivers/android/emulator.ts and its test.
Merged: #1304 (#1297), merged by the maintainer
Parked: none
Waiting: none
Decided: #1297 — a failed or timed-out emulator -help → boot without -crash-report-mode
Activity
V3RON commentedon Nov 5, 2026
Reproduction
Gap: the flag is required on purpose (#1186, #1232). Nothing checks what the emulator accepts. The test expectations are a proposal. Branch
bug/1297-repro(b5ded02):On this host, emulator 36.5.11 lists the flag in
-help, and-helptakes 0.14 s.Root cause
src/drivers/android/emulator.ts:265-266passes-crash-report-mode neveron every launch.prerequisites.ts:14makes the flag required, sooutdatedEmulator(:103-121) reports it. The doctor finding is the symptom. The real failure is that every boot on an older emulator exits atunknown option(#1232).Simplest fix
Emulator: probeemulator -helponce per instance, reusing the prerequisites regex. Pass the flag only if the help lists it. Keep the crash-database env either way.REQUIRED_EMULATOR_FLAGS. The test atprerequisites.test.ts:118then uses another flag.-helpin the fakes (testing.ts:1034, the seed stages,daemon/main.test.ts:2477).requirements.mdx:53and the driver manual.Alternatives rejected
emulator -version: no one knows the first version with the flag (after 36.1.9, at or before 36.5.11).Risk
-helpmust leave the flag out, not hide why a boot failed.Written by an agent.
V3RON commentedon Nov 5, 2026
Decision taken
Question: when
emulator -helpfails or times out, should Simlock pass-crash-report-mode never?-helpfailed.Why: a boot never fails on this flag, and it matches the PR's own assumption. Reverting: change the
.catch(() => [])fallback insrc/drivers/android/emulator.tsand its test.Written by an agent.
test(android): a failing emulator -help probe boots without -crash-re…
V3RON commentedon Nov 5, 2026
Delivery run
Merged: #1304 (#1297), merged by the maintainer
Parked: none
Waiting: none
Decided: #1297 — a failed or timed-out
emulator -help→ boot without-crash-report-modeWritten by an agent.
fix(android): pass -crash-report-mode only to an emulator that lists …