Skip to content

fix: cache the testmanagerd protocol version fallback on timeout - #1228

Merged
mykola-mokhnach merged 3 commits into
appium:masterfrom
droidrun:timo/fix-testmanagerd-version-caching
Aug 28, 2026
Merged

fix: cache the testmanagerd protocol version fallback on timeout#1228
mykola-mokhnach merged 3 commits into
appium:masterfrom
droidrun:timo/fix-testmanagerd-version-caching

Conversation

@Timo972

@Timo972 Timo972 commented Aug 26, 2026

Copy link
Copy Markdown

FBTestmanagerdVersion() deliberately does not cache its timeout fallback, so it retries the _XCT_exchangeProtocolVersion:reply: exchange on every call. Against a legacy or degraded testmanagerd that never answers, that means every caller — notably every GET /status request, which reports testmanagerdVersion — repeats the full 20-second wait. Since /status is the standard health-check endpoint, repeated probes make an already-bound, otherwise-working WDA appear permanently unavailable.

The value is diagnostic-only (per the code's own comments), so the cost of caching a possibly-pessimistic 0xFFFF fallback after one timeout is negligible, while the cost of retrying is a 20-second stall on every status call. This change caches the fallback like every other outcome.

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 26, 2026

Copy link
Copy Markdown

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

@mykola-mokhnach

Copy link
Copy Markdown

@Timo972 Could you please sign CLA?

@Timo972

Timo972 commented Aug 26, 2026

Copy link
Copy Markdown
Author

@Timo972 Could you please sign CLA?

didn’t expect the CLA to be such a blocker. it’ll take some time until my company can sign the CCLA unfortunately. will get back to it once the signing is done

@mykola-mokhnach
mykola-mokhnach merged commit f3d8e0c into appium:master Aug 28, 2026
54 of 57 checks passed
github-actions Bot pushed a commit that referenced this pull request Aug 28, 2026
## [16.9.2](v16.9.1...v16.9.2) (2026-08-28)

### Bug Fixes

* cache the testmanagerd protocol version fallback on timeout ([#1228](#1228)) ([f3d8e0c](f3d8e0c))
* sanitize non-UTF-8-encodable strings before JSON response serialization ([#1236](#1236)) ([fa6a250](fa6a250))

### Miscellaneous Chores

* **deps:** bump @appium/strongbox from 1.1.3 to 2.0.0 ([#1237](#1237)) ([03db844](03db844))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 16.9.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants