question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Socket 2.0.1 and NodeJS 6.10.2 error Segmentation fault

See original GitHub issue

Hello!

Please help, i updated socket.io from 1.7.4 to new version 2.0.1 and my project not running.

NodeJS version: 6.10.2 Express version: 4.15.2

My code:

var fs = require('fs'),
      httpsOptions = {
            key: fs.readFileSync('privkey.pem'),
            cert: fs.readFileSync('cert.pem')
      },
      app = require('express')(),
      server = require('https').createServer(httpsOptions, app),
      io = require('socket.io')(server);
      server.listen(8888);

In version socket.io 1.7.4 work good, but in version socket.io 2.0.1 i get error (when running script): Segmentation fault

What is the problem?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

11reactions
brenccommented, May 17, 2017

I think this might be related to uws. I’ve seen this myself.

What OS are you using?

As a workaround, try setting wsEngine to ws:

io = require('socket.io')(server, { wsEngine: 'ws' });

Or simply revert to socket.io 1.7.4 (npm install socket.io@1) for now, which is what I had to do.

1reaction
epexacommented, May 17, 2017

@brenc thank you! { wsEngine: 'ws' } helped me! I use OS: CentOS 7

Read more comments on GitHub >

github_iconTop Results From Across the Web

After upgrading Node, 'Segmentation fault (core dumped ...
I faced The same Issue just now, This because of conflicting the npm of node and nodejs. so remove nodejs by below commands...
Read more >
uWSGI Documentation
The uWSGI project aims at developing a full stack for building hosting services. Application servers (for various programming languages and ...
Read more >
Source Packages in "focal", Subsection misc - Ubuntu
... golang-github-blevesearch-segment (0.0~git20160915.0.762005e-5) [universe] ... golang-github-getlantern-errors (0.0~git20190325.abdb3e3-2) [universe] ...
Read more >
Source Code Review Report - CA.gov
and the statistical likelihood of a problem in the future. ... Analysis of error and exception handling. ... npm socket.io-client.
Read more >
s390 F-23 Branched report: 20151016 changes
(dshea) - Raise an error if osimg cannot be found (#1248673) (bcl) ... prevent wrestool to segfault when reading inconsistent resource data ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found