Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebSocket Connection Failed. #1505

Open
rocalex opened this issue Jun 26, 2024 · 0 comments
Open

WebSocket Connection Failed. #1505

rocalex opened this issue Jun 26, 2024 · 0 comments

Comments

@rocalex
Copy link

rocalex commented Jun 26, 2024

I'm trying to connect websocket api.
The frontend is Next.js and it's on Azure static web app
And the backend is Django, it's on Azure app service.
I enabled CORS in the backend, so frontend in localhost has no problem when I connect websocket api of backend (it's on Azure App Service.).
I can't find any reason or message on the browser console why connection is failed.

WebSocket connection to 'wss://assessmate.azurewebsites.net/ws/notify/' failed: 
_app-456513e57728c64c.js:149 WebSocket error: 
Event {isTrusted: true, type: 'error', target: WebSocket, currentTarget: WebSocket, eventPhase: 2, …}
  isTrusted: true
  bubbles: false
  cancelBubble: false
  cancelable: false
  composed: false
  currentTarget: WebSocket {url: 'wss://assessmate.azurewebsites.net/ws/notify/?toke… 
  I6MX0.zgUVAmgIStnz7iIj8OXyIhPIK4QqvFbyvPNsjhal86A', readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …}
  defaultPrevented: false
  eventPhase: 0
  returnValue: true
  srcElement: WebSocket {url: 'wss://assessmate.azurewebsites.net/ws/notify/?toke… 
  I6MX0.zgUVAmgIStnz7iIj8OXyIhPIK4QqvFbyvPNsjhal86A', readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …}
  target: WebSocket {url: 'wss://assessmate.azurewebsites.net/ws/notify/?toke…I6MX0.zgUVAmgIStnz7iIj8OXyIhPIK4QqvFbyvPNsjhal86A', 
  readyState: 3, bufferedAmount: 0, onopen: ƒ, onerror: ƒ, …}
  timeStamp: 11759.199999999255
  type: "error"
  [[Prototype]]: Event

Please help us!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant