-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Microsoft Edge does not receive callbacks while connection succeded #389
Comments
You are possibly in the best position to fix this, I have access to a win
|
I can have a look, but I only have the issue on IE10, Edge works fine. |
@sandro-k I got it working properly in IE11.. |
I have the same issue, it works fine in Chrome and IE11, but the "connect" event is not picked up by Edge (version 10586.0.0)
|
Seems like it'd be an error in websocket-stream |
Might be. Can you reproduce just using websocket-stream? |
Just looked at the webtests of Edge and they only seem to support:
Looking for the standard on the W3C site I end up here edit: please ignore me, I was looking for the onready event, but onready is attached to the open event.. |
So, have we got any clue? |
@mcollina Had to put this on hold for now because other stuff came up which was more urgent than supporting Edge. Will post here when we get back to it. |
FYI: I tested using the recommended client test of websocket stream and onReady is being called in Edge. |
Looking at Mosca's log it keeps on going through the same cycle: Tracing in my app shows that onReady is also being called over and over. |
The websocket session itself is still up, because when I shut mosca down I get an error in Edge that I don't get during the connection cycle. If people have ideas what to check I'm happy to test, but for now I'm a bit lost. It looks to me as if a handshake fails or a timer expires to soon. Btw: I'm using http and ws, no https nor wss. |
I have enabled debug in MQTT.js by providing console.log as debug function.
|
Ok, seems we can rule readable stream out as causing the problem as readable stream is now certified on Edge |
By accident I stumbled across mows. Doing a comparison between mows and mqttjs using the script below shows that in Chrome both get a connection an in Edge only mows gets a connection. @mcollina do you have any clue ?
|
So, Mows uses a different version of MQTT.js and websocket-stream. So the
|
Can't say that is a surprise to me. While debugging I get a bit lost in all the streams fluf, so a little guidance or help would be much appreciated. |
Ahum, the browser unit tests are passing on Edge without issues (just tested). What can it be? |
I might be way off here, but I used Esprima to add tracing for all calls and then diffed the result. The difference starts after the "data" event has been emitted and ondata has been called. Then Buffer._augment is being called. Edit: I have put the relevant parts of the traces in a gist |
Ok, I think I got it: The problem can be reduced to Buffer.prototype.slice. Must be a bug in typed array handling using the subarray function. |
Got the answer: feross/buffer#86 The quick fix for me is to define globally:
Which ensures Buffers won't use typed arrays. |
Hm, too quick.. It ain't over till the fat lady sings.. |
Regarding the issue above, which version of browserify did you use to create the bundle? |
@mcollina I've got it happening on |
Just reinstalled browserify 13 and after that rebuild my node_modules of the app that uses mosca. |
I've just run the browser unit tests on Edge, and they pass using the latest zuul (which uses Browserify 13). |
I'm not using Mosca for this, so I'm assuming it's a client-side problem. Sadly, can't test the new browserify version just yet. |
Works !
and the app subscribes to queues and is picking up published messages, even in Edge ;-) Thanks for all the fine work ! |
Happy we cracked this! |
Apparently, the event "connect" is never fired while using mqtt.js with microsoft Edge (25.10586.0.0).
From my tests, the broker states that the Microsoft Edge client is correctly connected, but this information does not get intercepted by the callback function attached to the event "connect" (as it correctly happen using Firefox or Chrome)
The text was updated successfully, but these errors were encountered: