Skip to content

fix(driver): select isolate exposing ext.flutter.driver - #946

Open
dajiaohuang wants to merge 1 commit into
appium:mainfrom
dajiaohuang:fix/auto-isolate-discovery-issue-912
Open

dajiaohuang wants to merge 1 commit into
appium:mainfrom
dajiaohuang:fix/auto-isolate-discovery-issue-912

Conversation

@dajiaohuang

Copy link
Copy Markdown

Fixes #912.

Automatic discovery currently chooses the first isolate whose name contains main from one getVM result, then polls only that isolate. If a background Flutter engine is listed first and does not expose ext.flutter.driver, the UI isolate is never considered.

This change refreshes the VM isolate list on each automatic-discovery retry and selects the first isolate that advertises ext.flutter.driver. An explicitly configured appium:isolateId remains pinned to that isolate. The synthetic regression tests cover duplicate main isolates, a UI isolate appearing after the first VM snapshot, and the explicit-ID path.

Validation:

  • npm test: build and all 11 tests passed (the new tests use a local synthetic WebSocket server; no device or user app).
  • npm run lint: passed.
  • Oxfmt check and git diff --check for both changed files: passed.
  • Whole-package npm run format:check still reports 30 unchanged files; the changed source and test pass the targeted format check.

Related context: #911 was closed without merge while feedback on #912 was sought. Open #937 also touches observatory.ts, but addresses pending commands when the Dart VM socket closes; this change addresses isolate discovery. The shared-file relationship is called out for merge coordination.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: dajiaohuang / name: dajiaohuang (a4bfb22)

@KazuCocoa

Copy link
Copy Markdown
Member

Please sign the CLA

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.

Automatic isolate selection fails when a background and UI isolate are both named main

2 participants