js-platform / p2p

PeerConnection broker for WebRTC
314 stars 40 forks source link

Can't get Demo to work... #18

Open erichlof opened 11 years ago

erichlof commented 11 years ago

Hi, I've tried lots of different things but I can't get the data-demo.html to work, even using Chrome Canary. I clicked on developer tools and it says the following in the console error log:

peer.onerror data-demo.js:61 callback p2p-client.js:3745 fail p2p-client.js:3752 handshake.onerror p2p-client.js:4464 callback p2p-client.js:3745 fail p2p-client.js:3752 (anonymous function)

What am I doing wrong? Thanks in advance. This library looks really cool and I want to check it out. :-)

-Erich

modeswitch commented 11 years ago

Hi Erich,

Sorry you're having trouble.

The demo page is using a self-hosted broker. I just restarted the broker and retried the demo and it seems to work. Give it a go again in the latest version of Firefox Nightly (http://js-platform.github.io/p2p/examples/data-demo.html), hopefully that will fix the problem.

A

erichlof commented 11 years ago

Hi Alan, thanks so much for your quick reply. I am away from my desktop that has the latest nightly browsers, but I will give it a try tonight. I'll report back soon. Thanks again! :)

erichlof commented 11 years ago

Sorry to report that it's still not working. I tried with two Firefox Nightly browsers, then closed those and then tried it with two Chrome Canary browsers. Just to make sure I'm doing everything right - I hit the 'connect' blue link in the first browser, then I copy and paste the resulting URL (which has been lengthened with a long ID number) into the URL address bar of the second browser, right?

On my machine, both browsers then just have the text input field and that's it. I can type and it says " what-I-Wrote" but it doesn't get transferred back and forth between the browsers. Hope this helps you figure out what's going on. Please let me know if there is anything I can do on my end to keep testing this out.

Thanks!

modeswitch commented 11 years ago

Ah, I think this is a case of poor documentation.

You should open the connect link in a second tab or window. After a second or two, you should see a connected message in both windows. Only the connecting peer needs the webrtc-session query parameter, since the first peer is hosting.

I hope that helps!

A

erichlof commented 11 years ago

Hi Alan, Yes that worked! Thank you for your help! The instructions that you added to the HTML demo page helped me do the right steps. One minor issue remaining however is that while this worked on my 2 Firefox Nightly instances, it did not work on my 2 Chrome Canary instances. Do I need to set some flags in the chrome://flags page, or is this just not working in Chrome yet?

I guess you can close this issue if you want now, because it was not really a bug on your end. Thanks again! :)

modeswitch commented 11 years ago

This does appear to be broken in Chrome 29, though it works in Chrome 27. :(

I hope to have time to fix a bunch of the open issues soon!

Charuru commented 10 years ago

Any updates?

modeswitch commented 10 years ago

I haven't had time to address this yet. I do accept pull requests though :)