[Bug] Pixel 11 Pro Fold fails to connect: "OpenSession after reset: LIBUSB_ERROR_NOT_FOUND (PID: 2321, 1376, 1365, 2334, 19316, 603)"

Aperta
#17 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
macos, swift
Ambito
backend, desktop

Direzione di ricerca

Start at the USB device setup and OpenSession reset path that produces LIBUSB_ERROR_NOT_FOUND, then inspect how SwiftMTP handles macOS ptpcamerad probing; the issue identifies a suspected race but does not name source files or tests. Reproduce with the Pixel 11 Pro Fold in File Transfer mode and compare with OpenMTP on the same setup. Done means SwiftMTP maintains the MTP session and transfers files without Android dropping back to charging only.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the bug

When connecting a Google Pixel 11 Pro Fold via USB-C in "File Transfer" mode, SwiftMTP detects the device and briefly starts loading files for 1-2 seconds before immediately failing with the error:

Device setup failed, please reconnect or restart device: OpenSession after reset: LIBUSB_ERROR_NOT_FOUND (PID: 2321, 1376, 1365, 2334, 19316, 603)

Immediately after this error occurs, Android detects the USB reset/interruption and automatically drops the MTP session, reverting back to "No data transfer" (Charging only).

Additionally, clicking "Check for Updates..." in the Info & Update tab fails with Check failed.

Steps to Reproduce
  1. Connect Google Pixel 11 Pro Fold to Mac via USB-C.
  2. Select "File Transfer / Android Auto" mode on Android.
  3. Open SwiftMTP (tested on both v1.2.3 and v1.2.4).
  4. The device begins loading files for 1-2 seconds, then drops with LIBUSB_ERROR_NOT_FOUND.
Environment
  • SwiftMTP Version: v1.2.4 (also reproducible on v1.2.3)
  • Device: Google Pixel 11 Pro Fold (Android 15)
  • macOS Version: macOS (Apple Silicon)
  • Connection: Direct USB-C to USB-C cable
PIDs & Technical Details
  • Error reported PIDs: (PID: 2321, 1376, 1365, 2334, 19316, 603)
  • Inspecting the processes on macOS shows that PID 19316 (and in previous attempts 35204) corresponds to macOS /usr/libexec/ptpcamerad (which launchd automatically spawns whenever a USB camera/MTP device is plugged in), while other PIDs are standard background apps holding unrelated IOHID/USB descriptors.
  • Because libusb_reset_device / OpenSession is invoked while macOS ptpcamerad probes the device, a race condition occurs, causing the session to fail and Android to disconnect.
  • Comparison: OpenMTP on the same machine and cable connects and transfers files without dropping the session.
Lingua principale
Swift
Stelle
481
Fork
11
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Neighbor-Z/SwiftMTP

Tutte le issue di Neighbor-Z/SwiftMTP

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.