vert-x3 / vertx-stack

Vert.x stack
Apache License 2.0
120 stars 48 forks source link

Recent version of sockjs-client does not have an 'onopen' property to set. #65

Closed tombensve closed 7 years ago

tombensve commented 7 years ago

I get the following error when calling the EventBus(...):

Error: (SystemJS) Cannot set property 'onopen' of undefined↵ TypeError: Cannot set property 'onopen' of undefined↵ at Module.EventBus (http://127.0.0.1:8080/node_modules/vertx3-eventbus-client/vertx-eventbus.js:98:28)

I edited this since I realised that is is saying "... 'onopen' of undefined"! I have to admit to being a newbie in Javascript, but I find it hard to imagine that it isn't possible to check for this "undefined" which I assume to mean null before trying to set a property on it. I assume it is undefined because a failed connection. There are no server running at this URL when this happened.

cescoffier commented 7 years ago

@pmlopes any idea ?

tombensve commented 7 years ago

Ooops! Very sorry, my error! And I should put a post-it on my screen or something to remind me that I've filed a bug! I forgot about this. Again sorry.

I have concluded that this is a missinterpretation on my part. I did say that I'm a newbie on JS :-) I'm however a 26+ year server side developer so I guess that is where my arrogance of assuming this was a bug comes from.

The error is a side-effect of me calling the eventbus incorrectly JS-wise. I have figured all this out now and gotten it to work.

I'm closing this.