Exception: 1004:: Session.connect(). Token expired on 518400

Questions and discussion concerning archiving

Exception: 1004:: Session.connect(). Token expired on 518400

Postby rimple » Mon Nov 05, 2012 12:16 am

Hi TokBox Team

I am using OpenTok.Net SDK for video recording. I want to extend the EXPIRE_TIME of token.
For that i have added
Code: Select all
  Dictionary<string, object> tokenOptions = new Dictionary<string, object>();
                            tokenOptions.Add(TokenPropertyConstants.ROLE, RoleConstants.MODERATOR);
                            tokenOptions.Add(TokenPropertyConstants.EXPIRE_TIME, new DateTime(2012, 11, 11));
                            string token = openTok.GenerateToken(session_id, tokenOptions);
this lines in my code but got an error
of Exception: 1004::Invalid authentication information passed in Session.connect(). Token expired on 518400.
So can you please let me know that how can I extend Expire time of token..asap?

Thanks
Was this post helpful? (0)
rimple
 
Posts: 41
Joined: Wed Oct 17, 2012 4:21 am
Thumbs Up: 0

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby jtsai » Mon Nov 05, 2012 12:40 pm

You should make sure that your server is set to the correct time first. Can you put an example token here that is giving you that error?

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

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby rimple » Mon Nov 05, 2012 10:02 pm

Hi John

Here I attached some files which shows the code that giving me error.
Running the code got the following:
Token : T1==cGFydG5lcl9pZD0xMjQxNTAwMiZzZGtfdmVyc2lvbj10YmRvdG5ldCZzaWc9OTM4MDI2MmRhMjhkNmNjYzk4MDE4YjI1Yjc1ZTZkNDUxZThhMzNkZDpyb2xlPW1vZGVyYXRvciZleHBpcmVfdGltZT01MTg0MDAmc2Vzc2lvbl9pZD0yX01YNHhNalF4TlRBd01uNHhNamN1TUM0d0xqRi1UVzl1SUU1dmRpQXdOU0F5TURvMU5Ub3pNaUJRVTFRZ01qQXhNbjR3TGpjd09Ua3pPVFYtJmNyZWF0ZV90aW1lPTEzNTIxNzc3MTYmbm9uY2U9MjQzODQ4

Session :
2_MX4xMjQxNTAwMn4xMjcuMC4wLjF-TW9uIE5vdiAwNSAyMDo1NTozMiBQU1QgMjAxMn4wLjcwOTkzOTV-

expire_time : 518400
create_time : 1352177716

and error : Exception: 1004::Invalid authentication information passed in Session.connect(). Token expired on 518400

I think I got the error because here my expire time is less than the my create time..right?
So can you please hint me that where I have to make change in my code for expire time..asap?

Thanks.
Was this post helpful? (0)
Attachments
OpenTok.Net_SDK.png
The content of this file shows the code of OpenTok.NET_SDK for generating token. For expire time i have make change of one line that is showing in red colored box.
Generate_Token.png
The content of this file shows the code which i used to generate token and add one more option for Expire time which is in red colored box.
rimple
 
Posts: 41
Joined: Wed Oct 17, 2012 4:21 am
Thumbs Up: 0

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby jtsai » Tue Nov 06, 2012 1:40 pm

The expire time is supposed to be create_time+ 518400, not just 518400.

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

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby rimple » Wed Nov 07, 2012 5:04 am

Hi John

Thanks for your reply.
I want to ask one question to you that can we display recording time when the video is recording means user can see that
for number of time(minutes/hours) video is recording?

Thanks
Was this post helpful? (0)
rimple
 
Posts: 41
Joined: Wed Oct 17, 2012 4:21 am
Thumbs Up: 0

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby jtsai » Thu Nov 08, 2012 12:38 pm

If you are using the stand alone recorder, then yes. If you are just recording a regular archive session, then no. You'll have to then implement your own using javascript.

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

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby rimple » Fri Nov 09, 2012 4:28 am

Hi John

Yes we are using stand alone recorder. So can you tell me that how to do that?

Thanks
Was this post helpful? (0)
rimple
 
Posts: 41
Joined: Wed Oct 17, 2012 4:21 am
Thumbs Up: 0

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby jtsai » Mon Nov 12, 2012 11:46 am

The stand alone recorder automatically shows the time on the top left corner when the user is recording.

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

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby rimple » Tue Nov 20, 2012 10:07 pm

Hi John

Here I attached one image file which shows view that display at time of recording video.So here we can see that time not display at the top right corner
as you have mentioned in your post.
So please let me know if any functionality we have to add or not or give some hint..

Thanks
Was this post helpful? (0)
Attachments
recording.png
recodring video
recording.png (51.43 KiB) Viewed 656 times
rimple
 
Posts: 41
Joined: Wed Oct 17, 2012 4:21 am
Thumbs Up: 0

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby adam » Wed Nov 21, 2012 5:20 pm

That's not the standalone recorder. Check out the standalone recorder tutorial:
http://www.tokbox.com/opentok/api/tools ... order.html
Was this post helpful? (0)
adam
 
Posts: 66
Joined: Thu May 05, 2011 8:35 pm
Thumbs Up: 3

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby rimple » Wed Nov 21, 2012 8:49 pm

Hi adam

ok..but in that tutorial recording timer also not display..

Thanks
Was this post helpful? (0)
rimple
 
Posts: 41
Joined: Wed Oct 17, 2012 4:21 am
Thumbs Up: 0

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby adam » Wed Nov 21, 2012 9:13 pm

You don't see the timer in the top right corner when you start recording? (see attached image)
Was this post helpful? (0)
Attachments
Screen Shot 2012-11-22 at 3.12.15 PM.png
Recorder widget with Timer
Screen Shot 2012-11-22 at 3.12.15 PM.png (126.29 KiB) Viewed 500 times
adam
 
Posts: 66
Joined: Thu May 05, 2011 8:35 pm
Thumbs Up: 3

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby rimple » Wed Nov 21, 2012 9:51 pm

Hi adam

If I open the link that you have posted in forum http://www.tokbox.com/opentok/api/tools%20...%20order.html that not display me timer.
Was this post helpful? (0)
Attachments
rec.png
rec.png (132.11 KiB) Viewed 497 times
rimple
 
Posts: 41
Joined: Wed Oct 17, 2012 4:21 am
Thumbs Up: 0

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby rimple » Thu Nov 22, 2012 4:22 am

Hi

I have set timer using javascript code but that started before I allow recording.(See attached image)
So can you please let me know that how can I call my timer function after I click allow to recording...???

Thanks
Rimple
Was this post helpful? (0)
Attachments
rec_timer.png
rec_timer.png (8.4 KiB) Viewed 489 times
rimple
 
Posts: 41
Joined: Wed Oct 17, 2012 4:21 am
Thumbs Up: 0

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby adam » Thu Nov 22, 2012 4:46 pm

That screenshot of the recorder is strange. You should have a record button down the bottom but for some reason you are not getting that. Are you getting any exceptions?

Also for your timer have a look at the documentation for the Recorder.
http://www.tokbox.com/opentok/api/tools ... order.html

There are some events in there that you will want to listen to. accessAllowed or recordingStarted.
Was this post helpful? (0)
adam
 
Posts: 66
Joined: Thu May 05, 2011 8:35 pm
Thumbs Up: 3

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby adam » Thu Nov 22, 2012 4:48 pm

The Publisher has an "accessAllowed" event too if you're using that.
http://www.tokbox.com/opentok/api/tools ... tml#events

And if you're recording using the Session class it has a "sessionRecordingStarted" event.
http://www.tokbox.com/opentok/api/tools ... tml#events
Was this post helpful? (0)
adam
 
Posts: 66
Joined: Thu May 05, 2011 8:35 pm
Thumbs Up: 3

Re: Exception: 1004:: Session.connect(). Token expired on 51

Postby rimple » Fri Nov 23, 2012 12:03 am

Hi adam

Thanks for your response. When we click on allow turnOnMyVideo() function is called to start recording.

Thanks
Rimple
Was this post helpful? (0)
rimple
 
Posts: 41
Joined: Wed Oct 17, 2012 4:21 am
Thumbs Up: 0


Return to [Beta] Archiving



Who is online

Users browsing this forum: No registered users and 1 guest

cron