question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'WebSocket' of undefined

See original GitHub issue

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • report a bug
  • request a feature

Current behaviour

After update my Angular App to Angular 8 I can npm start and npm build, but when I upoload to the server the console of the browser yield Cannot read property 'WebSocket' of undefined

Other information (e.g. stacktraces, related issues, suggestions how to fix)

I really don’t know if the issue is for this library, but I read the problem is about the global.WebSocket || global.MozWebSocket; https://github.com/webpack/webpack-dev-server/issues/174#issuecomment-102391902 in some libraries and I use yours

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
loveneetabsolvetechcommented, Jan 2, 2020

Annotation 2019-12-31 133701 Just need to update your opentok.js file as per screenshot

0reactions
Chingshangkhombacommented, Apr 7, 2022

Annotation 2019-12-31 133701 Just need to update your opentok.js file as per screenshot

this works

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught type error: Cannot read property of 'send' ...
It isn't that send is undefined, WebSocket is undefined at that point. Try a console.dir(WebSocket) directly before the send call. You define ...
Read more >
Websocket data undefined outside onmessage block
onmessage block but when I try to use it below I get this error: Uncaught TypeError: Cannot read properties of undefined (reading 'BEST')...
Read more >
Implementing Apollo Client for NextJS but getting Cannot read ...
Coding example for the question Implementing Apollo Client for NextJS but getting Cannot read property 'WebSocket' of undefined-Reactjs.
Read more >
Phoenix server on EC2 can receive GET requests but not a ...
If I view the Docker logs, I can see it received the request and responded with a 404. However, I cannot connect over...
Read more >
cannot read properties of undefined (reading 'listen')
It looks like cypress is not reading all messages sent by WebSocket. Could anyone tell me what's wrong with my code? `///. import...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found