Websocket error in @foal/socket.io/lib/socketio-controller.service
See original GitHub issueVersion of FoalTS: 2.8.0
I tried updating my backend but I am still failing at this error:
/node_modules/@foal/socket.io/lib/socketio-controller.service.js:59
return cb({
^
TypeError: cb is not a function
at Socket.<anonymous> (/node_modules/@foal/socket.io/lib/socketio-controller.service.js:59:28)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
Program node ./build/index.js exited with code 1
What can be my problem, did I missed some step in upgrading the project to 2.8?
Thanks
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
WebSocket: error event - Web APIs | MDN
The error event is fired when a connection with a WebSocket has been closed due to an error (some data couldn't be sent...
Read more >WebSocket connection failed: Error during ... - Stack Overflow
Problem solved! I just figured out how to solve the issue, but I would still like to know if this is normal behavior...
Read more >Websocket error on M1 iMac Monterey · Issue #4746 · tilt-dev/tilt
Inspecting the console there is an error connecting to the websocket: WebSocket connection to 'ws://localhost:10350/w...
Read more >Error with WebSocket - Microsoft Q&A
Hello I get the error: WebSocket connection to 'wss://localhost:54970/Dashboard.Server/' failed: Error in connection establishment: net:: ...
Read more >How to resolve the error: "Could not open websocket connection
log messages fail to show. The issue is seen when WebSocket requests are not passed correctly by a reverse proxy or a load...
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
Thank you for you investigation. 👍
I found the issue. Setting aside the error that is raised because no response is returned, the
TypeError: cb is not a function
error comes from the fact that the client does not provide a callback in itsemit
function:It appears that, when no callback is provided in the client, the server sdk does not also pass a function to the
on
method.The issue has been fixed in version 2.8.1 which will be released this week-end. Thank you for reporting this problem @pospile 👍