fix(session): local Android create when multiple devices unselected - #410
Merged
Conversation
KazuCocoa
reviewed
Jun 17, 2026
Comment on lines
99
to
111
Member
There was a problem hiding this comment.
Instead of this validation logic, I assume:
const selectedDeviceUdid =
!isRemoteServer && selectedLocalDevice?.platform === 'android'
? selectedLocalDevice?.udid
: undefined;can be
const givenCaps = {...configCaps, ...customCaps};
const selectedDeviceUdid =
!isRemoteServer && !givenCaps['appium:udid'] && selectedLocalDevice?.platform === 'android'
? selectedLocalDevice?.udid
: undefined;Possibly iOS also can be simplified like this
KazuCocoa
approved these changes
Jun 18, 2026
github-actions Bot
pushed a commit
that referenced
this pull request
Jun 18, 2026
## [1.85.9](v1.85.8...v1.85.9) (2026-06-18) ### Bug Fixes * **session:** local Android create when multiple devices unselected ([#410](#410)) ([9fb5bc3](9fb5bc3))
|
🎉 This PR is included in version 1.85.9 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Local Android session create could silently bind to the wrong device when multiple emulators or USB devices were connected and the agent skipped select_device. iOS already had a guard on the create path; Android did not so adding validateAndroidDeviceSelection() and runs it from buildAndroidCapabilities() before session creation.
If more than one Android device is connected and there is no explicit target (select_device or appium:udid in capabilities), create fails with a clear error instead of picking an arbitrary device.
Changes