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

Uncaught TypeError: undefined is not a function #2

Open
mondain opened this issue Jun 11, 2014 · 3 comments
Open

Uncaught TypeError: undefined is not a function #2

mondain opened this issue Jun 11, 2014 · 3 comments

Comments

@mondain
Copy link

mondain commented Jun 11, 2014

I get this error when changing a single line in your index.html

var socket = io();

to

var socket = new WebSocket('ws://192.168.1.174:10080/mcu');

I am not using Node.js, but my server does support websockets. Any idea you may have as to how I can fix this would be awesome.

screenshot from 2014-06-11 11 18 24

@arshem
Copy link

arshem commented Jun 16, 2014

Using node works without an issue. My guess is .emit and .on functions don't work as well with standard ws

@mondain
Copy link
Author

mondain commented Jun 17, 2014

So node its sending something to make it valid? Seems odd, but ok.

On Jun 16, 2014 4:02 PM, "arshem" [email protected] wrote:

Using node works without an issue. My guess is .emit and .on functions
don't work as well with standard ws


Reply to this email directly or view it on GitHub.

@patownle
Copy link

patownle commented Oct 5, 2014

I get the same error on running on

  • server
    • node.js v0.10.32
    • OSX 10.9.5
  • client
    • Chrome Version 40.0.2173.0 canary (64-bit)

I changed

var socket = io();

to

var socket = io.connect();

and it works.
Unfortunately I don't know why.

TheSachinSBhat added a commit to TheSachinSBhat/chat-example-1 that referenced this issue Feb 7, 2017
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

3 participants