Skip to content

tv-control rejects a provider-lent Apple TV simulator by its ext: id #1531

Open

Description

@latekvo

[Diplomat, Opus 5.5]: A provider may lend a tvOS simulator (platform: "ios", any simctl device), and list-devices lists it as ext:<provider>:<udid>. Every tool that routes to tv-control fails on that id.

isTvOsSimulator(extId) returns true, because findIosSimulator resolves an ext: id through the provider's device set. Tools therefore route to tv-control. But the tv-control factory (packages/tool-server/src/blueprints/tv-control.ts:220-226) looks the id up with listIosSimulators().find(s => s.udid === udid), and listIosSimulators only returns native UDIDs. An ext: id can never match.

Impact: tv-remote, describe and the other TV tools fail on a lent Apple TV with TvControl: no available simulator with udid 'ext:...'. Run list-devices to find a booted Apple TV., even though list-devices just listed that id.

Repro

I set up a fake provider descriptor lending two tvOS simulators (caps ax-service, simctl), then ran an esbuild bundle that calls the real factory on main (unchanged by #1490):

ext:fakeprov:770B7963-... findIosSimulator: {"udid":"770B7963-...","runtimeKind":"tv",...}
ext:fakeprov:770B7963-... isTvOsSimulator: true
ext:fakeprov:770B7963-... tv-control factory threw: TvControl: no available simulator with udid 'ext:fakeprov:770B7963-10E3-4A46-A5E0-ED496278E124'. Run list-devices to find a booted Apple TV.
raw 770B7963-... tv-control factory threw: TvControl: Apple TV '...' is Shutdown. Boot it first with boot-device.   (the raw UDID gets past the lookup)

Found while reviewing #1490.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions