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

example server stays at "connecting..." #4

Open
hatpick opened this issue Jul 8, 2014 · 10 comments
Open

example server stays at "connecting..." #4

hatpick opened this issue Jul 8, 2014 · 10 comments

Comments

@hatpick
Copy link

hatpick commented Jul 8, 2014

Hey,
I get this error when I try to run the server:
Could not subscribe: [object Object]

I'm a ShareJS 0.6.X user and I don't have a good understanding of 0.7+ at the moment so I can't figure out what's wrong, would you mind checking this?

@aslakhellesoy
Copy link
Contributor

Did you clone the repo and follow the instructions in the README?

npm install
node examples/server.js
# in a couple of browsers...
open http://localhost:7007

@hatpick
Copy link
Author

hatpick commented Jul 9, 2014

Yes, that's what I did, I have the server running on 7007, however in the chrome console I can see that error Could not subscribe: [object Object]

@aslakhellesoy
Copy link
Contributor

That's odd - I'm not able to reproduce this...

@dignifiedquire
Copy link

@hatpick what version of node are you running?

@hatpick
Copy link
Author

hatpick commented Jul 10, 2014

stable version v0.10.29

btw I can run ShareJS server on the same machine and it works. (from sharejs project)

@dignifiedquire
Copy link

Reproduced myself, latest master and same node version. Something seems to go wrong in the subscription, not sure what though, the error is on share.uncompressed.js#940, the message looks like this:

{
  "a": "sub",
  "error": {},
  "c": "users",
  "d": "sephx"
}

@hatpick
Copy link
Author

hatpick commented Jul 15, 2014

I moved my server.js and index.html to node_modules\share and updated the refs and it works.

@jsierles
Copy link

FYI, this still happens on master.

@christopherdro
Copy link

Looks like share.uncompressed.js is missing from the main directory and is being called from index.html.

Go to /node_modules/share/dist and copy either the minified or regular js file over to the root directory and reference correctly in index.html

This should get the demo working.

@nmai
Copy link

nmai commented Sep 26, 2015

@christopherdro Thanks, that worked for me but I wasn't happy with using a workaround. When I went into the code to figure out the actual problem, I realized that the scripts in share/dist were still being hosted but they must have been renamed at some point by a ShareJS dev.

All it takes to fix this is renaming share.uncompressed.js to share.js in example/index.html. I'll submit a PR in a bit.

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

6 participants