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

Error when offer is generated #49

Closed
heavens-night opened this issue Nov 14, 2015 · 3 comments
Closed

Error when offer is generated #49

heavens-night opened this issue Nov 14, 2015 · 3 comments

Comments

@heavens-night
Copy link

I have locally installed simple-peer and I created the html file and bundle.js (using browserify) from the example in the usage section. I'm running the html locally on firefox and internet explorer, but when the offer is supposed to be generated, I get this String in my initiator (firefox):

{"type":"offer","sdp":"v=0
\r\no=mozilla...THIS_IS_SDPARTA-42.0 4294967295 0 IN IP4 0.0.0.0
\r\ns=-
\r\nt=0 0
\r\na=sendrecv
\r\na=fingerprint:sha-256 69:94:EB:39:ED:03:74:37:5F:C9:CF:6C:A1:E9:F5:8C:92:2D:B7:FA:7D:4B:91:ED:8D:77:B0:01:5D:05:A2:CC
\r\na=ice-options:trickle\r\na=msid-semantic:WMS *
\r\nm=application 56243 DTLS/SCTP 5000
\r\nc=IN IP4 209.89.144.167
\r\na=candidate:0 1 UDP 2130575615 169.254.56.152 56240 typ host
\r\na=candidate:2 1 UDP 2130444543 169.254.104.17 56241 typ host
\r\na=candidate:4 1 UDP 2130379007 2001:56a:70af:9e00:9d0a:c1c3:6d4e:2389 56242 typ host
\r\na=candidate:6 1 UDP 2122121471 192.168.1.80 56243 typ host
\r\na=candidate:7 1 UDP 1685921791 209.89.144.167 56243 typ srflx raddr 192.168.1.80 rport 56243
\r\na=sendrecv
\r\na=end-of-candidates
\r\na=ice-pwd:7dfce6b80ca0ce59b86f0bca8c0566f8
\r\na=ice-ufrag:9792e3a8
\r\na=mid:sdparta_0
\r\na=sctpmap:5000 webrtc-datachannel 256
\r\na=setup:actpass
\r\na=ssrc:3367038954 cname:{d41c4bc7-c377-41ed-a8e7-91bda9100e2f}
\r\n"}

I made sure simple-peer has all its dependencies on the node_modules folder created by npm. What could be wrong? any help/pointing to an appropriate reading is appreciated. Thanks a lot and have a great day!

@max-mapper
Copy link
Collaborator

@shesmovedon that looks like an SDP to me, but I don't see any errors. If you're using the code from the usage example in the readme it should be this line that produces that:

console.log('SIGNAL', JSON.stringify(data))

But I don't see SIGNAL in yours, so maybe you have a different version of the code

@heavens-night
Copy link
Author

@maxogden I'm using the code that appears on the example on the readme here, but the .js was "browserified" (that shouldn't matter right?). I still don't know why I'm not getting the offer to copy to my receiver. I replicated the example at this domain http://bkfwieohg.byethost11.com/index.html#1, you can test to see what I'm getting.

@feross
Copy link
Owner

feross commented Jan 10, 2016

Your example works fine for me. You're probably mixing up the order of events. Try this:

  1. Visit http://bkfwieohg.byethost11.com/index.html#1 (this is the initiator)
  2. Copy the "offer text".
  3. Visit http://bkfwieohg.byethost11.com/index.html (this is not the initiator, note the lack of #1 in the url)
  4. Paste the offer text in the box, and click submit. Some "answer text" should appear.
  5. Copy the "answer text".
  6. Go back to the first page (the initiator), paste the answer text, and click submit.
  7. Check your console, you should see "CONNECT" and that some data got sent.

@feross feross closed this as completed Jan 10, 2016
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