Skip to content
This repository was archived by the owner on Nov 10, 2026. It is now read-only.

fix: Rethrow boot errors other than the already booted state - #319

Merged
mykola-mokhnach merged 1 commit into
appium:masterfrom
RaphaelFakhri:fix/boot-device-error-handling
Nov 6, 2026
Merged

mykola-mokhnach merged 1 commit into
appium:masterfrom
RaphaelFakhri:fix/boot-device-error-handling

Conversation

@RaphaelFakhri

Copy link
Copy Markdown
Contributor

Summary

bootDevice() had its error check inverted. It rethrew the Unable to boot device in current state: Booted error, which it is meant to ignore, and silently swallowed every other failure, including invalid UDIDs, missing runtimes, timeouts and the udid is required error from requireUdid.

The negation was lost when simctl was converted to a class in #97. The original handling rethrew any error that did not contain the already-booted message. This change restores that behavior, which also matches shutdownDevice().

Changes

  • lib/subcommands/boot.ts: rethrow unless the error is the already-booted error.
  • test/unit/simctl.spec.ts: add #bootDevice unit tests for a successful boot, the already-booted case, other boot errors, and an unset UDID.

Testing

  • npm run build && npm test: 27 passed, 0 failed.
  • With only the source change reverted, the new already-booted, other-errors and unset-UDID tests fail (24 passed, 3 failed).
  • npm run lint and npm run format:check are clean.

Fixes #318

@mykola-mokhnach

Copy link
Copy Markdown
Contributor

@RaphaelFakhri could you please resolve conflicts?

@RaphaelFakhri

Copy link
Copy Markdown
Contributor Author

Rebased onto master in 767c9c6 and resolved the test conflict with the new #setLocation tests. Build, unit tests (30 passing), lint, and format check are clean.

@RaphaelFakhri
RaphaelFakhri force-pushed the fix/boot-device-error-handling branch from 48d0ca4 to 767c9c6 Compare November 6, 2026 20:17
@mykola-mokhnach
mykola-mokhnach merged commit 80d6f37 into appium:master Nov 6, 2026
8 checks passed
github-actions Bot pushed a commit that referenced this pull request Nov 6, 2026
## [9.1.3](v9.1.2...v9.1.3) (2026-11-06)

### Bug Fixes

* Rethrow boot errors other than the already booted state ([#319](#319)) ([80d6f37](80d6f37))
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 9.1.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bootDevice swallows real boot failures and throws when the device is already booted

2 participants