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

Null inside socket.data object's field

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

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
javascript
Ambito
frontend

Direzione di ricerca

Start by tracing registerVerboseListeners and createProxy, especially the path that processes each socket.data field during the connection event. Reproduce the case with a null field and verify that development mode no longer crashes while proxying other socket.data values.

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

Descrizione

I have middleware that sets socket.data and one of this object properties can be null. When socket.io-admin-ui in development mode it runs registerVerboseListeners function. Which laters calls createProxy function on "connection" event for every filed inside socket.data. Inside createProxy there is a check:

if (typeof obj !== "object") { return obj; }

but typeof null is also "object" so it will pass and will try to init new Proxy with null as target - new Proxy(null, ...) which will throw an error - "TypeError: Cannot create proxy with a non-object as target or handler" or similar.

In my case it also crash whole app when this error occur.

Lingua principale
Vue
Stelle
413
Fork
109
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna 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.

Altre issue di socketio/socket.io-admin-ui

Tutte le issue di socketio/socket.io-admin-ui

Issue simili

Altre issue su Web Dev

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.