{"id":3554,"date":"2014-03-28T10:36:16","date_gmt":"2014-03-28T10:36:16","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/28\/tb-socket-error-with-opentok-webrtc-on-meteor-collection-of-common-programming-errors\/"},"modified":"2014-03-28T10:36:16","modified_gmt":"2014-03-28T10:36:16","slug":"tb-socket-error-with-opentok-webrtc-on-meteor-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/28\/tb-socket-error-with-opentok-webrtc-on-meteor-collection-of-common-programming-errors\/","title":{"rendered":"TB.Socket error with OpenTok WebRTC on Meteor-Collection of common programming errors"},"content":{"rendered":"<p>Got a tough one here.<\/p>\n<p>So, we&#8217;re trying to upgrade an OpenTok video chat application from Flash to WebRTC, and are running into socket errors as we try to implement the &#8216;helloworld&#8217; WebRTC sample. The errors occur when we try to do a session.connect() call, not when we request a sessionId or a token. And the error basically looks like this (session_id and partner_id anonymized):<\/p>\n<pre><code>SessionInfo Response: \n#document\n  \u200b\n    \u200b\n      \u200basfgdagbasdfovnwoinvcwoinvoiandfvoinvoidnofgfdfgfgivniodfnv-sdfgdfgdfg-\u200b\u200b\n      \u200b1234567890\u200b\u200b\n      \u200bSun Sep 01 12:00:45 PDT 2013\u200b\u200b\n      \u200bINFLIGHT\u200b\u200b\n      \u200b\u2026\u200b\u200b\n      \u200brtmfp:\/\/p2p101-oak.tokbox.com:1945\/multicast\u200b\u200b\n      \u200boms409-oak.tokbox.com\u200b\u200b\n      \u200boms409-oak.tokbox.com\u200b\u200b\n    \u200b\n  \u200b\nconnectToMessenger\nWebSocket error: undefined\nTB.Socket Error :: The socket to oms409-oak.tokbox.com received an error: Unknown Error\nTB.exception :: title: Connect Failed (1006) msg: TB.Socket Error :: The socket to oms409-oak.tokbox.com received an error: Unknown Error\n<\/code><\/pre>\n<p>Any ideas on what might be causing this? We&#8217;re testing on the latest version of Chrome 29, and it happens in both localhost and on our production servers. So it doesn&#8217;t seem to be a firewall. The one thing I can think of is that we&#8217;re running on a Meteor\/Node.js framework, which has websockets enabled by default. The code is pretty much boilerplate helloworld sample from the following:<\/p>\n<p>http:\/\/tokbox.com\/opentok\/tutorials\/hello-world\/js\/demo.html<\/p>\n<p>We get the sessionId and token successfully, it&#8217;s just that the session.connect() doesn&#8217;t ever happen (and, thus, we can&#8217;t ever get our connection object or subscribe to the event listeners).<\/p>\n<p>Any ideas on how we might go about debugging this issue? Thanks in advance for any help! abigail<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Got a tough one here. So, we&#8217;re trying to upgrade an OpenTok video chat application from Flash to WebRTC, and are running into socket errors as we try to implement the &#8216;helloworld&#8217; WebRTC sample. The errors occur when we try to do a session.connect() call, not when we request a sessionId or a token. And [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3554","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3554","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3554"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3554\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3554"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3554"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3554"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}