Error on node 16 worker with eiows and separate error with eiows on main thread.
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.
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