socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

Error on node 16 worker with eiows and separate error with eiows on main thread.

Open Sam-Gram opened this issue 3 years ago • 0 comments

Describe the bug I am getting the following error when I try to use eiows with a node 16 worker:

FATAL ERROR: HandleScope::HandleScope Entering the V8 API without proper locking in place
 1: 0xb0a860 node::Abort() [node]
 2: 0xa1c193 node::FatalError(char const*, char const*) [node]
 3: 0xcf97aa v8::Utils::ReportApiFailure(char const*, char const*) [node]
 4: 0xcfad0c v8::HandleScope::HandleScope(v8::Isolate*) [node]
 5: 0x7fee205a166e  [.../node_modules/eiows/dist/eiows_linux_93.node]
 6: 0x156d839  [node]
 7: 0x1565f48 uv_run [node]
 8: 0xa43dd5 node::SpinEventLoop(node::Environment*) [node]
 9: 0xb4ca06 node::NodeMainInstance::Run(node::EnvSerializeInfo const*) [node]
10: 0xace5a2 node::Start(int, char**) [node]
11: 0x7fee22e19083 __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
12: 0xa4067c  [node]
Aborted (core dumped)

If I try to require eiows in the main thread I get:

ompilation of µWebSockets has failed and there is no correct pre-compiled binary available for your system or an unsupported node version is used. Please install a supported C++17 compiler or update node and reinstall the module 'eiows'. at.../node_modules/eiows/dist/eiows.js:27:15 at Object. (.../eiows/dist/eiows.js:30:3) at Module._compile (node:internal/modules/cjs/loader:1105:14) at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10) at Module.load (node:internal/modules/cjs/loader:981:32) at Function.Module._load (node:internal/modules/cjs/loader:822:12) at Module.require (node:internal/modules/cjs/loader:1005:19) at require (node:internal/modules/cjs/helpers:102:18) at run (/home/sam/Documents/fusion-socketcluster/worker.js:47:22) at Object. (/...r/worker.js:290:1) Emitted 'error' event on Worker instance at: at Worker.[kOnErrorMessage] (node:internal/worker:289:10) at Worker.[kOnMessage] (node:internal/worker:300:37) at MessagePort. (node:internal/worker:201:57) at MessagePort.[nodejs.internal.kHybridDispatch] (node:internal/event_target:643:20) at MessagePort.exports.emitMessage (node:internal/per_context/messageport:23:28) at Worker.[kOnExit] (node:internal/worker:267:5) at Worker..onexit (node:internal/worker:198:20)

To Reproduce

Please fill the following code example:

Socket.IO server version: 4.5.1

Server

const http = require('http')
const express = require('express')
const SocketIO = require('socket.io')

const app = express()
const server = http.createServer(app)


const socket_io = SocketIO(server, {
  wsEngine         : require('eiows').Server,
  perMessageDeflate: {
	  threshold: 32768
  }
})

Expected behavior Socket IO to work with eiows

Platform:

  • Device: Lenovo P50 Thinkpad
  • OS: Ubuntu 20.04.4 LTS
  • Node 16.16.0 eiows: 4.1.2 socket.io 4.5.1 g++ (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

Additional context Also opened a ticket at https://github.com/mmdevries/eiows/issues/11

Sam-Gram avatar Aug 02 '22 22:08 Sam-Gram