Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Android: emulators start without gRPC, so tools that need the emulator gRPC endpoint (Argent) cannot drive leased devices

Aperta Adatta ai principianti
#639 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
70/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
android, grpc

Direzione di ricerca

Gli argomenti di avvio dell'emulatore vengono costruiti vicino a emulatorLaunchFlags, che secondo la issue non dovrebbe accettare flag grezzi forniti dall'utente. Inizia da lì e verifica come viene scelta la porta della console, così da poter derivare la porta gRPC come porta + 3000 senza collisioni con altre porte gestite. È completato quando un emulatore noleggiato è in ascolto sulla porta gRPC, scrive un pid_*.ini con grpc.token, e lo screenshot e il gesture-tap di Argent vanno a buon fine.

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

Descrizione

This issue was written by Claude (an AI coding agent) while it investigated a tooling problem for me. I reviewed it and approved posting it.

simlock 0.2.0 starts emulators with the args below. main (0.3.0) uses the same args.

emulator -avd <avd> -port <n> -no-snapshot-save [-snapshot simlock_clean_baseline]

When -port is set and -grpc is not, the emulator:

  • starts no gRPC server, and
  • writes no discovery file (~/Library/Caches/TemporaryItems/avd/running/pid_<pid>.ini on macOS).

Without -port, the emulator turns on gRPC by default (console port + 3000, with a token) and writes the file.

Tools that drive the emulator over gRPC read that file. Argent is one. On a leased emulator its screenshot and gesture-tap fail with:

emulator "emulator-5558" not found among running emulators (a token-less `-grpc` launch omits grpc.token; check avd/running/*.ini)

adb-only tools still work, so the device looks healthy. Argent documents the same failure for any emulator launched without -grpc: software-mansion/argent#1192.

Repro (macOS, emulator 36.6.11, simlock 0.2.0)

  1. simlock lease --platform android --device "Pixel 9" --agent-id test --detach
  2. ls ~/Library/Caches/TemporaryItems/avd/running/ → no pid_*.ini for the leased emulator.
  3. lsof -nP -iTCP -sTCP:LISTEN -p <emulator pid> → console and adb ports only, no gRPC port.

Matrix (throwaway AVD, launched by hand)

Flags gRPC endpoint + .ini
-port 5570 -no-snapshot-save no
no -port yes, grpc.port=8556
-port 5570 -grpc 8570 -grpc-use-token yes, and Argent works

Proposed fix

Add -grpc <port + 3000> -grpc-use-token to the emulator launch args.

  • Base the gRPC port on the console port, like the emulator's own default, so parallel leases never collide. With console ports above 5585 on main, it may be worth checking that port + 3000 stays clear of other simlock-managed ports.
  • The token keeps the endpoint authenticated. Argent also requires grpc.token in the .ini.
  • Users cannot work around this: config cannot add raw emulator flags (by design, per the comment near emulatorLaunchFlags).

Optional: expose the gRPC port in the grant, so tools do not have to find it through the discovery file.

Lingua principale
TypeScript
Stelle
19
Fork
1
Merge medio
7h 49m
PR unite (30g)
228

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 callstackincubator/simlock

Tutte le issue di callstackincubator/simlock

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.