senecajs / seneca-transport

Seneca micro-services message transport over TCP and HTTP.
MIT License
63 stars 45 forks source link

TypeError: Cannot set property 'setup' of undefined #144

Closed friedemannsommer closed 1 year ago

friedemannsommer commented 7 years ago
TypeError: Cannot set property 'setup' of undefined
    at EventEmitter.<anonymous> (/source/node_modules/seneca-transport/lib/tcp.js:160:69)
    at emitOne (events.js:96:13)
    at EventEmitter.emit (events.js:188:7)
    at onDisconnect (/source/node_modules/reconnect-core/index.js:64:17)
    at Socket.onError (/source/node_modules/reconnect-core/index.js:50:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at emitErrorNT (net.js:1276:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickDomainCallback (internal/process/next_tick.js:122:9)

corresponding location in source https://github.com/senecajs/seneca-transport/blob/7a78f99751ede18f30385e3df6d4ffc833d6843f/lib/tcp.js#L160

paulnebel commented 7 years ago

Do you have a target date by which this fix will be committed as I'm getting the same error in some of my end-to-end tests using seneca web?

davd33 commented 7 years ago

Same problem when using docker:

front-api_1 | Debug: internal, implementation, error front-api_1 | TypeError: Uncaught error: Cannot set property 'setup' of undefined front-api_1 | at EventEmitter. (/usr/src/app/node_modules/seneca-transport/lib/tcp.js:160:69) front-api_1 | at emitOne (events.js:96:13) front-api_1 | at EventEmitter.emit (events.js:191:7) front-api_1 | at onDisconnect (/usr/src/app/node_modules/reconnect-core/index.js:64:17) front-api_1 | at Socket.onError (/usr/src/app/node_modules/reconnect-core/index.js:50:9) front-api_1 | at emitOne (events.js:96:13) front-api_1 | at Socket.emit (events.js:191:7) front-api_1 | at emitErrorNT (net.js:1279:8) front-api_1 | at _combinedTickCallback (internal/process/next_tick.js:80:11) front-api_1 | at process._tickDomainCallback (internal/process/next_tick.js:128:9)

friedemannsommer commented 1 year ago

Closing as it has been fixed with 1fcdae0149d56573c4daf3afe73f04fbbebd83ce. The underlying implementation has also been rewritten in 22c1efe21ef3373371939bb93e8dfa82ba26b603 which makes this issue obsolete.