[Bug]: Device screenshot fails with 500 on iPhone Duo (Xcode 27.2): serve-sim calls simctl without --display
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 66/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- ios, typescript
Línea de trabajo
Empieza leyendo apps/server/src/device/deviceToolVersions.json para confirmar la versión fijada de expo-device-hub. Luego, inspecciona la ruta de capturas de pantalla de serve-sim/dist/middleware.js incluida en el paquete y compárala con el bundle canary que contiene la corrección upstream. Actualiza la versión fijada a una versión estable que incluya la corrección. El trabajo estará terminado cuando la captura de pantalla funcione en el iPhone Duo y siga funcionando en el simulador con una sola pantalla.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Before submitting
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area
apps/server
Steps to reproduce
- With Xcode 27.2, boot an iPhone Duo simulator (iOS 27.2 runtime
iOS-27-2-iPhone19-4). Folded or unfolded doesn't matter. - Open it in the T3 Code Device panel.
- Click the camera (screenshot) button in the device toolbar.
Expected behavior
You get a PNG of the panel currently showing: the cover display (1398×2034) when folded, or the inner display (2007×2853) when unfolded.
Actual behavior
The panel shows "Screenshot capture failed (500). Try again." It fails every time.
The proxy forwards POST /api/device-hub/vendor/serve-sim/api/screenshot?device=<udid> to the vendored serve-sim. serve-sim returns 500 because xcrun simctl io <udid> screenshot <file> exits with code 22:
Cannot choose between 2 displays. Specify one with --display:
--display=3 LCD-1 (primary-1) 2007x2853
--display=1 LCD (primary) 1398x2034
Invalid argument
Cause: The pinned [email protected] (apps/server/src/device/deviceToolVersions.json) runs the simctl screenshot without --display. In its vendored serve-sim/dist/middleware.js, the /api/screenshot route calls:
B6("xcrun", ["simctl", "io", y, "screenshot", b], { timeout: 5000 }, ...)
This matches expo/expo-device-hub#441. On Xcode 27.1, simctl defaulted to the inner panel, so a folded Duo gave an all-black image. On Xcode 27.2, simctl refuses to pick a display on two-display devices, so the capture fails outright.
Suggested fix
Upstream fixed this in expo/expo-device-hub#384 and #388 (merged 2026-10-23, 706806e). /api/screenshot and screenshot.capture now pass --display=<active panel>. I checked the published tarballs:
[email protected](currentlatest): still callssimctl io … screenshotwithout--display.[email protected]: includes the fix:["simctl","io",$.udid,"screenshot",...(_===void 0?[]:[`--display=${_}`]),$.file]
Suggested change: bump expo-device-hub in apps/server/src/device/deviceToolVersions.json to the first stable release that includes expo#384/#388 (presumably 0.19.0) once it's published. Nothing in T3 needs to change for single-display devices, since upstream only adds --display when a panel is selected.
What I could not check: I haven't run T3 against the canary. I confirmed the fix by reading the canary bundle and by running simctl by hand (see Workaround).
Related, but a separate problem: #24033, where device_screenshot drops the failure reason. Here the UI only showed "500". The simctl message above came from calling the hub directly.
Impact
Major degradation or frequent failure
Version or commit
T3 Code Nightly 0.1.3-nightly.20261025.3669 (Electron 44.9.3, Chrome 152.0.7977.167); expo-device-hub 0.15.3 (pinned), agent-device 0.21.25
Environment
macOS 27.0 (26A428), Xcode 27.2 (27B48), simulator iPhone Duo (com.apple.CoreSimulator.SimDeviceType.iPhone-Duo) on runtime iOS 27.2 (24B91014, com.apple.CoreSimulator.SimRuntime.iOS-27-2-iPhone19-4)
Logs or stack traces
# server.trace.ndjson (wsTicket redacted)
POST http://127.0.0.1:3773/api/device-hub/vendor/serve-sim/api/screenshot?device=6D680333-…&hostId=local -> 500
HttpClientError: StatusCode error (500 POST http://127.0.0.1:<hub>/vendor/serve-sim/api/screenshot?device=6D680333-…)
# Direct call to the hub
$ curl -s -X POST "http://127.0.0.1:<hub>/vendor/serve-sim/api/screenshot?device=<udid>"
{"ok":false,"error":"Detected file type from extension: PNG\nAn error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):\nCannot choose between 2 displays. Specify one with --display:\n --display=3 LCD-1 (primary-1) 2007x2853\n --display=1 LCD (primary) 1398x2034\nInvalid argument"}
Workaround
Capture from the terminal and name the display:
xcrun simctl io <udid> screenshot --display=1 folded.png # cover
xcrun simctl io <udid> screenshot --display=3 unfolded.png # inner
Both commands succeed on the same device. Single-display simulators aren't affected.
- Lenguaje dominante
- TypeScript
- Estrellas
- 24.8k
- Forks
- 6.4k
- Merge medio
- 4 h 29 min
- PR fusionados (30 d)
- 305
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pingdotgg/t3code
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 87/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
bug needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Los mantenedores suelen responder en 1 día
Todos los issues de pingdotgg/t3code
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
outline/outline#14348 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Agent import retains quotes in .env API keys followed by inline commentsPosiblemente ocupada @yxr-2025 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
elie222/rakazo#2322 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
awslabs/visual-asset-management-system#804 ·
Los mantenedores suelen responder en 1 día
-
用户目录有单引号时,热加载时YAML解析崩溃Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
dsh-market/dsh-market#1027 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
select on a Radix-style combobox fails with a message that names no way forwardPosiblemente ocupada @Asymtode712 la tomó hoy. Abiertoagent-reported area/browser enhancement good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
reticlehq/reticle#1895 · 1 comentario ·
Los mantenedores suelen responder en 1 día