Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot read property '0' of undefined #28

Open
jplap opened this issue Oct 4, 2020 · 0 comments
Open

TypeError: Cannot read property '0' of undefined #28

jplap opened this issue Oct 4, 2020 · 0 comments

Comments

@jplap
Copy link

jplap commented Oct 4, 2020

The node broker run in nodejs

Debugger listening on ws://127.0.0.1:9229/8e90f57c-84bd-49ce-8b41-f9e626d23132
For help, see: https://nodejs.org/en/docs/inspector
Connect id207227774120221540000
CONNECT id207227774120221540000 { client: 10000, server: 10000 } { 'accept-version': '1.0', 'heart-beat': '10000,10000' }
Server subscribe sub-1601805535061-486 /echo
topic:/echo messageType: string Bonjour { destination: '/echo',
'content-length': 7,
bytes_message: true,
subscription: 'self_15317701541' }

After the reply

I have the callstack

TypeError: Cannot read property '0' of undefined
at StompServer._checkSubMatchDest (E:\nodeproject\octree\node_modules\stomp-broker-js\stompServer.js:495:21)
at StompServer._sendToSubscriptions (E:\nodeproject\octree\node_modules\stomp-broker-js\stompServer.js:353:24)
at StompServer. (E:\nodeproject\octree\node_modules\stomp-broker-js\stompServer.js:207:10)
at callNext (E:\nodeproject\octree\node_modules\stomp-broker-js\stompServer.js:125:31)
at StompServer.onSend (E:\nodeproject\octree\node_modules\stomp-broker-js\stompServer.js:129:14)
at StompServer. (E:\nodeproject\octree\node_modules\stomp-broker-js\stompServer.js:389:10)
at StompServer.stompServer.subscribe (E:\nodeproject\octree\server.js:52:17)
at StompServer.emit (events.js:198:13)
at StompServer.EventEmitter.emit (domain.js:448:20)
at StompServer._sendToSubscriptions (E:\nodeproject\octree\node_modules\stomp-broker-js\stompServer.js:361:16)

When i debug i watch a wrong value in for loop of The variable i increment correctly 0 , 1 and then containt "indexOKey"
this._sendToSubscriptions = function (socket, args) {
for (var i in this.subscribes) {
var sub = this.subscribes[i];

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant