hnasr / javascript_playground

Javascript playground tutorials
1.06k stars 948 forks source link

WebSocket connection to 'ws://localhost:8080/' failed #71

Closed OmegaOrbitals closed 2 months ago

OmegaOrbitals commented 1 year ago

Running this code on the DevConsole

let ws = const ws = new WebSocket("ws://localhost:8080")

returns WebSocket connection to 'ws://localhost:8080/' failed

rahul-dey99 commented 2 months ago

Running this code on the DevConsole

let ws = const ws = new WebSocket("ws://localhost:8080")

returns WebSocket connection to 'ws://localhost:8080/' failed

Why are you even using that?

OmegaOrbitals commented 2 months ago

Running this code on the DevConsole

let ws = const ws = new WebSocket("ws://localhost:8080")

returns WebSocket connection to 'ws://localhost:8080/' failed

Why are you even using that?

This was 1 year ago, I've figured it out.

dr-naikare commented 1 month ago

Running this code on the DevConsole let ws = const ws = new WebSocket("ws://localhost:8080") returns WebSocket connection to 'ws://localhost:8080/' failed

Why are you even using that?

This was 1 year ago, I've figured it out.

hey , can you tell me how you solved that ? am facing the same issue but am using let webs = new WebSocket("ws://localhost:8000"); and getting the following error on the console

Refused to connect to 'ws://localhost:8000/' because it violates the following Content Security Policy directive: "connect-src chrome://resources chrome://theme 'self'".