Atmosphere / atmosphere-javascript

atmosphere-javascript
Apache License 2.0
122 stars 98 forks source link

Atmosphere 2.3.8 onOpenAfterResume message length error #249

Closed nstanard closed 5 years ago

nstanard commented 5 years ago

I'm trying to track down and understand what is causing this. As far as I can tell it's internal to atmosphere.js. It happens every time the onOpenAfterResume event fires. Unfortunately I cannot share this project as it is internal to my company. However, I'd be happy to jump on a call and explain the situation. Any help is much appreciated.

onOpen response:  
{status: 200, reasonPhrase: "OK", responseBody: "", messages: Array(0), headers: {…}, …}
console.js?00ac:35 Fri Aug 30 2019 10:06:57 GMT-0500 (Central Daylight Time) Atmosphere: Firing onOpen
console.js?00ac:35 Fri Aug 30 2019 10:06:57 GMT-0500 (Central Daylight Time) Atmosphere: ajaxRequest.onreadystatechange, new state: 3
console.js?00ac:35 Fri Aug 30 2019 10:06:57 GMT-0500 (Central Daylight Time) Atmosphere: ajaxRequest.onreadystatechange, new state: 4
console.js?00ac:35 onOpenAfterResume response:  
{timeout: 300000, method: "GET", headers: {…}, contentType: "application/json", callback: null, …}
raven.js?8d3d:381 Uncaught Error: message length "                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
7bd2e619-af02-47b2-962c-93c5d3b1eb2e" is not a number
    at _trackMessageSize (atmosphere.js?0db2:1701)
    at o.ajaxRequest.onreadystatechange (atmosphere.js?0db2:2096)
    at XMLHttpRequest.s.onreadystatechange (3b2dd70….js:78)
    at XMLHttpRequest.wrapped (raven.js?8d3d:377)
_trackMessageSize   @   atmosphere.js?0db2:1701
ajaxRequest.onreadystatechange  @   atmosphere.js?0db2:2096
s.onreadystatechange    @   3b2dd70….js:78
wrapped @   raven.js?8d3d:377
XMLHttpRequest.send (async)     
(anonymous) @   raven.js?8d3d:1348
(anonymous) @   3b2dd70….js:78
_executeRequest @   atmosphere.js?0db2:2134
_reconnect  @   atmosphere.js?0db2:2243
ajaxRequest.onreadystatechange  @   atmosphere.js?0db2:2117
s.onreadystatechange    @   3b2dd70….js:78
wrapped @   raven.js?8d3d:377
XMLHttpRequest.send (async)     
(anonymous) @   raven.js?8d3d:1348
(anonymous) @   3b2dd70….js:78
_executeRequest @   atmosphere.js?0db2:2134
_execute    @   atmosphere.js?0db2:646
_reconnectWithFallbackTransport @   atmosphere.js?0db2:1762
_websocket.onclose  @   atmosphere.js?0db2:1547

image

nstanard commented 5 years ago

stepped through:

image

image

nstanard commented 5 years ago

🤦‍♂

Dont track message length if you don't need to is the moral of the story.