I have a FastAPI server with Strawberry. It requires to have a WebSocket system for chat functionality and hence it uses the Subscriptions.
While the server is up the WebSocket connection gets created in the playground of one window and doesn't in another window.
The developer tools console gives the following error:
WebSocket connection to 'wss://my_url.com/api/graphql' failed:
In the network tab, except the request URL everything is empty. Further, there are no errors visible in the server logs
Now, I have tried it in multiple browsers, their windows on multiple operating systems as well.
The problem doesn't occur on Windows Chrome browsers and Mac Safari
Though it is intermittently faced on MacOS chrome browser.
The weird part is that it on the chrome browser, it works fine in one window while doesn't in another.
I faced this initially on the deployed server which has TLS but it is reproducible locally as well (again happens 50% of times).
System Information
Operating system: Mac OS Sonoma
Strawberry version (if applicable): 0.215.1
Additional Context
Upvote & Fund
We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
Just to confirm: did you test the websockets using GraphiQL in all these cases or does the issue also happen when you use a graphql client library (like Apollo for example)?
Describe the Bug
I have a FastAPI server with Strawberry. It requires to have a WebSocket system for chat functionality and hence it uses the Subscriptions. While the server is up the WebSocket connection gets created in the playground of one window and doesn't in another window.
The developer tools console gives the following error:
In the network tab, except the request URL everything is empty. Further, there are no errors visible in the server logs
The setup is as below:
In the graphql playground i get:
Now, I have tried it in multiple browsers, their windows on multiple operating systems as well.
The problem doesn't occur on Windows Chrome browsers and Mac Safari
Though it is intermittently faced on MacOS chrome browser. The weird part is that it on the chrome browser, it works fine in one window while doesn't in another.
I faced this initially on the deployed server which has TLS but it is reproducible locally as well (again happens 50% of times).
System Information
Additional Context
Upvote & Fund