[Bug] Plumesign, --udid never matches a device

Aperta
#277 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
80/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli

Direzione di ricerca

Il bug è in get_device_for_id in crates/plume_utils/src/device.rs, dove la closure di .find(|d| ...) confronta d.device_id con il valore di --udid. Inizia verificando come l'argomento --udid arriva a quella funzione e cosa espone la struct del dispositivo come UDID. È fatto quando un UDID reale seleziona il dispositivo corrispondente e confermi che gli altri chiamanti di device_id non sono influenzati dalla modifica.

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

Descrizione

bug
Report

I realize this is a very niche issue but its relatively easy to fix, Ive experimented with using plumesign from scripts, the GUI is not affected by this bug as far as I can tell though.

Anyway the issue is that --udid compares the udid against device_id not udid inside get_device_for_id. device_id is not the same as udid it's just the number the connection itself gets usually just counting up for each reconnection.

Inside get_device_for_id, the value from --udid is compared against device_id instead of udid, so passing a real udid never finds the device.

I believe the issue is found at line 397 in crates/plume_utils/src/device.rs

.find(|d| d.device_id.to_string() == device_id).

I dont really know how to best fix it but it should be pretty simple to fix depending on the behavior you want.

I apologize if this is the expected behavior I just found it to be odd. Thank you for your time and your amazing project!

Contributor Checks
  • I am willing to attempt to make a pull request to fix this bug
Additional Information
  • Developer mode enabled
  • Using paid developer account
  • I will send an ipa of the app I'm having trouble installing if any
  • I'm willing to provide crash logs or debugging information if needed
Lingua principale
Rust
Stelle
3.4k
Fork
224
Merge medio
34m
PR unite (30g)
2

Preparare l'ambiente

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 claration/impactor

Tutte le issue di claration/impactor

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.