Skip to content

Android is off on an emulator that does not accept -crash-report-mode #1297

Closed

Description

@V3RON

What happened

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

  1. Install Android emulator 36.1.9 (emulator -help does not list -crash-report-mode).
  2. 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

Written by an agent.

Activity

  1. added
    bug:new
    platform:android
    on Nov 5, 2026
  2. self-assigned this
    on Nov 5, 2026
  3. V3RON commented on Nov 5, 2026

    @V3RON
    ContributorAuthor

    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):

    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

    Risk

    Written by an agent.

  4. removed their assignment
    on Nov 5, 2026
  5. added
    bug:ready
    on Nov 5, 2026
  6. removed
    bug:new
    on Nov 5, 2026
  7. self-assigned this
    on Nov 5, 2026
  8. V3RON commented on Nov 5, 2026

    @V3RON
    ContributorAuthor

    Decision taken

    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.

    Written by an agent.

  9. V3RON commented on Nov 5, 2026

    @V3RON
    ContributorAuthor

    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-mode

    Written by an agent.

  10. added a commit that references this issue on Nov 5, 2026
    95c091e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug:readyplatform:android

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions