Skip to content

fix(app-management): surface app list failures instead of caching an empty list - #489

Merged
KazuCocoa merged 1 commit into
appium:mainfrom
Mochxd:fix/app-list-empty-cache
Aug 16, 2026
Merged

fix(app-management): surface app list failures instead of caching an empty list#489
KazuCocoa merged 1 commit into
appium:mainfrom
Mochxd:fix/app-list-empty-cache

Conversation

@Mochxd

@Mochxd Mochxd commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

On a real iOS device getInstalledApps fetches the User and System app lists through Promise.allSettled so that a failure on one type does not discard the other. When both lookups fail, the loop still produces an empty array and that empty list is cached for the full 60s TTL.

Two things go wrong from there:

  • the caller gets No installed app matched the name <name> instead of the actual device error, which points at the wrong problem
  • every later name-based lookup keeps failing the same way for a minute, even after the device recovers, because the empty list is served from the cache

Rethrow the first rejection when every lookup failed, so the driver error reaches the caller and nothing is cached. Partial failures keep the existing behaviour. This also matches the Android/simulator branch, which already lets the failure propagate.

@Delta456 Delta456 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@KazuCocoa
KazuCocoa merged commit f2d38a4 into appium:main Aug 16, 2026
5 checks passed
github-actions Bot pushed a commit that referenced this pull request Aug 16, 2026
## [1.92.4](v1.92.3...v1.92.4) (2026-08-16)

### Bug Fixes

* **app-management:** surface app list failures instead of caching an empty list ([#489](#489)) ([f2d38a4](f2d38a4))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.92.4 🎉

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