Problem Connecting Session Using v1.1 JS

Ask questions about the JavaScript API here

Problem Connecting Session Using v1.1 JS

Postby Guest-urcfsqmcoa » Mon Nov 26, 2012 10:42 am

I'm having an issue connecting a session using the v1.1 JS library. The odd thing is, my code worked previously using the v0.91 and still works if I substitute the v2.0 WebRTC JS library. I can't use the v2.0 library, however, because a portion of my app is trying to use the RecorderManager which isn't available in the WebRTC version.

This is a copy of the logs. The sessionConnected event is never fired.

Code: Select all
[DEBUG] opentok: OpenTok JavaScript library v1.1.0 TB.min.js:36
[DEBUG] opentok: Release notes: http://www.tokbox.com/opentok/api/tools/js/documentation/overview/releaseNotes.html TB.min.js:36
[DEBUG] opentok: Known issues: http://www.tokbox.com/opentok/api/tools/js/documentation/overview/releaseNotes.html#knownIssues TB.min.js:36
[DEBUG] opentok: TB.setLogLevel(5) TB.min.js:36
[DEBUG] opentok: TB.addEventListener(exception) TB.min.js:36
[DEBUG] opentok: TB.initSession(1_MX4xNjAwNjY4MX4xMjcuMC4wLjF-TW9uIE5vdiAyNiAwODo1MDo1NSBQU1QgMjAxMn4wLjU2OTY1MjV-) TB.min.js:36
[DEBUG] opentok: TB.addEventListener(sessionConnected) TB.min.js:36
[DEBUG] opentok: TB.addEventListener(streamCreated) TB.min.js:36
[DEBUG] opentok: TB.addEventListener(streamDestroyed) TB.min.js:36
[DEBUG] opentok: TB.addEventListener(connectionCreated) TB.min.js:36
[DEBUG] opentok: TB.addEventListener(connectionDestroyed) TB.min.js:36
[DEBUG] opentok: TB.addEventListener(exception) TB.min.js:36
[DEBUG] opentok: Session.connect(16006681) TB.min.js:36
[DEBUG] opentok: TB.checkSystemRequirements() TB.min.js:36
[DEBUG] opentok: TB.addEventListener(envLoaded) TB.min.js:36
[DEBUG] opentok: TB.dispatchEvent(dynamicConfigChanged) TB.min.js:36
[DEBUG] opentok: TB.removeEventListener(dynamicConfigChanged) TB.min.js:36
[DEBUG] opentok: TB.removeEventListener(dynamicConfigLoadFailed) TB.min.js:36
[DEBUG] opentok: TB.dispatchEvent(envLoaded)


These are a few of the variables I see when I console.log the session object as well:

Code: Select all
capabilities: null
connected: false
connecting: true
connection: null


Anyone experiencing the same issue or know how to resolve this? I am generating sessionIds & tokens via the REST API. Here is one sessionId and token pair that I've tried.

Code: Select all
App ID: '16006681',

Token: 'T1==cGFydG5lcl9pZD0xNjAwNjY4MSZzaWc9MjlmMjM0NzJlMTU5NTQyZjNhNjQ1MzZmODc4ZWVjMTZkNjRiMDQ0ODpzZXNzaW9uX2lkPTFfTVg0eE5qQXdOalk0TVg0eE1qY3VNQzR3TGpGLVRXOXVJRTV2ZGlBeU5pQXdPRG8xTURvMU5TQlFVMVFnTWpBeE1uNHdMalUyT1RZMU1qVi0mY3JlYXRlX3RpbWU9MTM1Mzk0ODY2NiZleHBpcmVfdGltZT0xMzU0MDM1MDY2JnJvbGU9bW9kZXJhdG9yJmNvbm5lY3Rpb25fZGF0YT0mbm9uY2U9MzQ5MDU5'

SessionId: 1_MX4xNjAwNjY4MX4xMjcuMC4wLjF-TW9uIE5vdiAyNiAwODo1MDo1NSBQU1QgMjAxMn4wLjU2OTY1MjV-


Thanks,
Sandro
Was this post helpful? (0)
Guest-urcfsqmcoa
 
Posts: 4
Joined: Mon Nov 26, 2012 9:56 am
Thumbs Up: 0

Re: Problem Connecting Session Using v1.1 JS

Postby jtsai » Mon Nov 26, 2012 11:30 am

Hi there

Could you try a new session ID? Problems like this occur if you try to use a session id for both v1.1 AND v2.0 at the same time.

John
Was this post helpful? (0)
User avatar
jtsai
 
Posts: 4974
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 192

Re: Problem Connecting Session Using v1.1 JS

Postby Guest-urcfsqmcoa » Mon Nov 26, 2012 11:39 am

I generated a new session id and token, but I still see the same log in the console. This is the new session and token I used.

Code: Select all
SessionId: 2_MX4xNjAwNjY4MX5-TW9uIE5vdiAyNiAxMDozNDoyNiBQU1QgMjAxMn4wLjc4Mjd-
Token: T1==cGFydG5lcl9pZD0xNjAwNjY4MSZzaWc9Y2E5MWNhZTNjZDRmMzI2NzlhMjUxZDhjNmU0M2U4MjE1ODk1MDE3NzpzZXNzaW9uX2lkPTJfTVg0eE5qQXdOalk0TVg1LVRXOXVJRTV2ZGlBeU5pQXhNRG96TkRveU5pQlFVMVFnTWpBeE1uNHdMamM0TWpkLSZjcmVhdGVfdGltZT0xMzUzOTU0OTAxJnJvbGU9bW9kZXJhdG9yJm5vbmNlPTEzNTM5NTQ5MDEuMDUxMTc2MjI2MTY0JmNvbm5lY3Rpb25fZGF0YT0lN0IlMjJ1c2VySWQlMjIlM0ElMjI1NjQlMjIlN0Q=


Console output:
Code: Select all
[DEBUG] opentok: OpenTok JavaScript library v1.1.0 TB.min.js:36
[DEBUG] opentok: Release notes: http://www.tokbox.com/opentok/api/tools/js/documentation/overview/releaseNotes.html TB.min.js:36
[DEBUG] opentok: Known issues: http://www.tokbox.com/opentok/api/tools/js/documentation/overview/releaseNotes.html#knownIssues TB.min.js:36
[DEBUG] opentok: TB.setLogLevel(5) TB.min.js:36
[DEBUG] opentok: TB.addEventListener(exception) TB.min.js:36
[DEBUG] opentok: TB.initSession(2_MX4xNjAwNjY4MX5-TW9uIE5vdiAyNiAxMDozNDoyNiBQU1QgMjAxMn4wLjc4Mjd-) TB.min.js:36
[DEBUG] opentok: TB.addEventListener(sessionConnected) TB.min.js:36
[DEBUG] opentok: TB.addEventListener(streamCreated) TB.min.js:36
[DEBUG] opentok: TB.addEventListener(streamDestroyed) TB.min.js:36
[DEBUG] opentok: TB.addEventListener(connectionCreated) TB.min.js:36
[DEBUG] opentok: TB.addEventListener(connectionDestroyed) TB.min.js:36
[DEBUG] opentok: TB.addEventListener(exception) TB.min.js:36
[DEBUG] opentok: Session.connect(16006681) TB.min.js:36
[DEBUG] opentok: TB.checkSystemRequirements() TB.min.js:36
[DEBUG] opentok: TB.addEventListener(envLoaded) TB.min.js:36
[DEBUG] opentok: TB.dispatchEvent(dynamicConfigChanged) TB.min.js:36
[DEBUG] opentok: TB.removeEventListener(dynamicConfigChanged) TB.min.js:36
[DEBUG] opentok: TB.removeEventListener(dynamicConfigLoadFailed) TB.min.js:36
[DEBUG] opentok: TB.dispatchEvent(envLoaded)


Thanks,
Sandro
Was this post helpful? (0)
Guest-urcfsqmcoa
 
Posts: 4
Joined: Mon Nov 26, 2012 9:56 am
Thumbs Up: 0

Re: Problem Connecting Session Using v1.1 JS

Postby jtsai » Tue Nov 27, 2012 11:27 am

Hey,

Do you have a page I could take a look at? I was able to join the session with the session id and token you provided and v1.1.

John
Was this post helpful? (0)
User avatar
jtsai
 
Posts: 4974
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 192

Re: Problem Connecting Session Using v1.1 JS

Postby Guest-urcfsqmcoa » Wed Nov 28, 2012 9:31 am

Hi,

Thank you for helping us with this issue. Our app is still under development but you're welcome to take a look.

Please visit http://dev.reactionstream.com/login and login with email: demouser@reactionstream.com and password: power2demo

After logging in, on the same browser visit: http://dev.reactionstream.com/demouser/ ... tion/KjWjR

If you open up the console you should the the TB debug messages. The last debug message is `[DEBUG] opentok: TB.dispatchEvent(envLoaded)` but I would expect the last event to be sessionConnected; which is when the rest of my event bindings and initialization occurs. When I change the JS library to point to v2.0 this works, but v2.0 doesn't have the recorderManager feature.

I am on the #opentok IRC channel with the handle `sandropadin` and can chat on there if you'd like.

Thank you,
Sandro
Was this post helpful? (0)
Guest-urcfsqmcoa
 
Posts: 4
Joined: Mon Nov 26, 2012 9:56 am
Thumbs Up: 0

Re: Problem Connecting Session Using v1.1 JS

Postby jtsai » Wed Nov 28, 2012 11:39 am

Hi

In your show.css, I believe you have:
Code: Select all
object {
    display: none;
}


This may be causing the browser not to actually run our flash widgets that get loaded to the screen. Try removing that line.

John
Was this post helpful? (0)
User avatar
jtsai
 
Posts: 4974
Joined: Wed Sep 14, 2011 3:00 pm
Thumbs Up: 192

Re: Problem Connecting Session Using v1.1 JS

Postby Guest-urcfsqmcoa » Wed Nov 28, 2012 12:52 pm

Oh my goodness. Not sure why that CSS rule was even there. That was the issue. Thank you very much!
Was this post helpful? (0)
Guest-urcfsqmcoa
 
Posts: 4
Joined: Mon Nov 26, 2012 9:56 am
Thumbs Up: 0


Return to JavaScript



Who is online

Users browsing this forum: No registered users and 3 guests

cron