SockJS crashes session
See original GitHub issueI am getting frequency crashes due to an apparent SockJS session timeout:
/home/tquetano/git/platform-js/node_modules/webpack-dev-server/node_modules/sockjs/lib/trans-websocket.js:157
return this.session.close(3000, 'No response from heartbeat');
^
TypeError: Cannot read property 'close' of null
at WebSocketReceiver.heartbeat_timeout (/home/tquetano/git/platform-js/node_modules/webpack-dev-server/node_modules/sockjs/lib/trans-websocket.js:157:26)
at null._onTimeout (/home/tquetano/git/platform-js/node_modules/webpack-dev-server/node_modules/sockjs/lib/trans-websocket.js:75:24)
at Timer.listOnTimeout (timers.js:92:15)
npm ERR! Linux 4.4.0-18-generic
npm ERR! argv "/home/tquetano/.nvm/versions/node/v4.2.2/bin/node" "/home/tquetano/.nvm/versions/node/v4.2.2/bin/npm" "run" "dev"
npm ERR! node v4.2.2
npm ERR! npm v2.14.7
npm ERR! code ELIFECYCLE
npm ERR! platform@4.0.0 dev: `NODE_ENV=development ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --progress`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the platform@4.0.0 dev script 'NODE_ENV=development ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --progress'.
npm ERR! This is most likely a problem with the platform package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! NODE_ENV=development ./node_modules/webpack-dev-server/bin/webpack-dev-server.js --progress
npm ERR! You can get their info via:
npm ERR! npm owner ls platform
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /home/tquetano/git/platform-js/npm-debug.log
Is there a way to configure to increase the timeout, or at least check for the existence of the session object before attempting to use its close property? This is happening very frequently, in some cases in as little as a few minutes after very basic usage
Issue Analytics
- State:
- Created 7 years ago
- Reactions:4
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Spring Websockets via STOMP - Client crash and ...
I'm implementing a Spring web application using Websocket, the sub protocol STOMP as well as SockJs for Fallback.
Read more >sockjs@0.2.0 vulnerabilities - Snyk
Affected versions of this package are vulnerable to Denial of Service (DoS). Incorrect handling of Upgrade header with the value websocket leads in...
Read more >Sending Message to a specific session on Spring Websocket
So in this post i will explain how i achieved sending updates to specific session. Step 1: Angular Application Subscribes to Websocket &...
Read more >WebSockets and Load Balancers: How to Use Them - Zibtek
Load balancing refers to the act of distributing network traffic across multiple services. This makes sure that there's not too much load on...
Read more >Vert.x Web
Session support - both local (for sticky sessions) and clustered (for non ... is stored in the Cookie, this means sessions survive server...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@csaintc @byCedric btw, removing your
node_modulesdirectory and doing freshnpm installshould fix the issue as well, as the newsockjsversion0.3.17matches the semver^0.3.15specified in webpack-dev-server’s package.js. If this doesn’t help, you can manuallynpm install sockjs@0.3.17.I suggest updating semver in dev-server’s package.json only to enforce installation of the new sockjs version in all cases, e.g. behind a caching npm proxy.
Nope, sorry I should have closed this a while ago.