NativeScript / NativeScript/nativescript-cli

cli issues : env.uglify breaks console.log / hmr / debugger cannot connect device

Aperta
#5,429 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
JavaScript
Stelle
1.1k
Fork
204
Merge medio
1g 9h
PR unite (30g)
8

Descrizione

Environment
✔ Component nativescript has 7.0.11 version and is up to date.
✔ Component @nativescript/core has 7.0.12 version and is up to date.
✔ Component @nativescript/ios has 7.0.4 version and is up to date.
✔ Component @nativescript/android has 7.0.1 version and is up to date.
✔ Xcode version 12.1.0 satisfies minimum required version 10.

Describe the bug
I have several issues when deploying the app
Using the emulator :

  1. when I use the --env.uglify flag, console.log messages are not shown in the console.
  2. when I have HMR active, the app closes after it launched. I have to manually start it to use it.
  3. navigating to devtools://devtools/bundled/inspector.html?ws=localhost:41000 gives a timeout :
    Cannot connect to device socket. The error message is 'Timeout while waiting for lock "/Users//.local/share/.nativescript-cli/abb5c8da9f657a0090e2668a3a72a99b"'.
    NativeScript debugger was not able to get inspector socket port on device 6F98B19F-AC48-4CE6-917C-590F22F2559B for application org.nativescript.foo.
    Cannot connect to device socket. The error message is 'Device socket port cannot be found.'.

To Reproduce

  • create a new ns Angular project with ns create foo --ng
  • open items.component.ts and add the line console.log('NS rules!'); to ngOnInit
  • run the project with : ns debug ios --> You see the added log message
  • run the project with : ns debug ios --env.uglify
    1. the app closes after it is started --> not correct
    2. start the app yourself manually, notice you don't see the added log message --> not correct
  • run the project with : ns debug ios --env.uglify --no-hmr --> the app does not close after it starts correct
  • navigate to devtools://devtools/bundled/inspector.html?ws=localhost:41000

Sample project
See 'To Reproduce'

Guida per i contributori

Apri la guida per i contributori

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.

Direzione di ricerca

Inizia riproducendo il comportamento con ns debug ios, --env.uglify e --no-hmr, usando il console.log aggiunto a items.component.ts. Poi esamina gli entry point della CLI coinvolti in HMR, nell'uglificazione e nella connessione del debugger all'URL dell'inspector. Il lavoro è completato quando le esecuzioni uglificate conservano l'output della console, HMR non chiude l'app e il debugger si connette al dispositivo.

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

Valutazione

Stack tecnologico
ios, javascript
Ambito
cli, devtools, mobile-dev
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
30/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.