Clients can't connect to socket server
See original GitHub issueScreenshot
GraphiQL
uRQL Client - Console
Expected Behaviour I expected it to do connect the socket server.
Actual Behaviour but instead it did give me error without any response.
Setup For server, I am using ExpressJS with GraphQL-Helix/Envelop
// initial setup with cookies, form data etc.
const server = app.listen(PORT, () => {
const wsServer = new WebSocketServer({
path: "/graphql",
server,
});
const { execute, subscribe } = getEnveloped({});
useServer(
{
execute,
subscribe,
onError: writeError,
onSubscribe: async (ctx, msg) => {
// this is never called
// on error is also never called (it is only a logger)
In the error message in console above, the response is undefined. I also tried doing it noServer:true, still I got the same error.
Issue Analytics
- State:
- Created a year ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Client cannot connect with https server socket #4198 - GitHub
"Connecting to server" should be logged in the console => Client is able to connect with server socket · "Hi" message should be...
Read more >Cannot connect Java socket server and client - Stack Overflow
Cannot connect Java socket server and client · Happens with both Java 7 and 8. · Tried several different ports. · No exceptions...
Read more >Troubleshooting connection issues | Socket.IO
IO client will always try to reconnect, unless specifically told otherwise. Let's review how you can troubleshoot a connection failure.
Read more >Why TCP socket client can not connect to socket server - MSDN
I am testing a TCP socket app in wifi-environment. 1.) I am using VS2005 to create Console App for Socket-Server (Netframework v2.0)
Read more >Writing the Server Side of a Socket (The Java™ Tutorials ...
The Java runtime automatically closes the input and output streams, the client socket, and the server socket because they have been created in...
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
Well, let me close the issue for now because it is probably something to do with Heroku or my code, if anybody else got the same error, can always write here.
@enisdenjo Thank you so much for helping that fast.
Ok weird. This error looks like theres a problem with the network, can you confirm you’re using the right URL on the clients (and that the server is available)? Is the server on the same local network? Can you provide me a screenshot of the WebSocket request from your browsers DevTools?
I would greatly appreciate a repro too, thanks!