opentok subscriber timed out

1.3k Views Asked by At

I am trying to build opentok for iPhone, I have a problem when using the OpenTok-iOS-Hello-World and OpenTok-iOS-Basic-Tutorial (download from github). It always tell me 'subscriber timed out', so I cannot see the video which send by the other publisher. Could you please give me some advice? Here is the log which echo to xcode,

2013-09-02 22:13:52.332 OpenTokBasic[2975:907] OpenTok iOS Library

2013-09-02 22:13:52.333 OpenTokBasic[2975:907] Release version built on Aug  2 2013 at 16:04:41

2013-09-02 22:13:52.351 OpenTokBasic[2975:907] SHA1:e4c2ce8a2a47be27459db5cf0fad2db9089387e8

2013-09-02 22:13:52.352 OpenTokBasic[2975:907] This version of the OpenTok iOS SDK is for WebRTC sessions only

2013-09-02 22:13:52.353 OpenTokBasic[2975:907] Copyright 2013 Tokbox, Inc.

2013-09-02 22:13:52.353 OpenTokBasic[2975:907] Licensed under the Apache License, Version 2.0

2013-09-02 22:13:52.354 OpenTokBasic[2975:907] ------------------------------------------------

2013-09-02 22:13:52.360 OpenTokBasic[2975:907] OpenTok API Server: http://anvil.opentok.com

2013-09-02 22:13:57.840 OpenTokBasic[2975:907] sessionDidConnect: 2_MX4zODYyMzEyMn4xMjcuMC4wLjF-TW9uIFNlcCAwMiAwNzowNjo1NSBQRFQgMjAxM34wLjE1Mjg2MjM3fg

2013-09-02 22:13:57.841 OpenTokBasic[2975:907] - connectionId: 0EFB4322-E8C5-4E8D-867A-417D5E03C4DC

2013-09-02 22:13:57.843 OpenTokBasic[2975:907] - creationTime: 2013-09-02 14:13:57 +0000

2013-09-02 22:13:57.843 OpenTokBasic[2975:907] session: didReceiveStream:

2013-09-02 22:13:57.844 OpenTokBasic[2975:907] - connection.connectionId: EDB2E676-C584-4D33-9F46-941D33E94716

2013-09-02 22:13:57.845 OpenTokBasic[2975:907] - connection.creationTime: 1970-01-16 22:48:51 +0000

2013-09-02 22:13:57.845 OpenTokBasic[2975:907] - session.sessionId: 2_MX4zODYyMzEyMn4xMjcuMC4wLjF-TW9uIFNlcCAwMiAwNzowNjo1NSBQRFQgMjAxM34wLjE1Mjg2MjM3fg

2013-09-02 22:13:57.846 OpenTokBasic[2975:907] - streamId: 1805012313

2013-09-02 22:13:57.846 OpenTokBasic[2975:907] - type WebRTC

2013-09-02 22:13:57.847 OpenTokBasic[2975:907] - creationTime 1970-01-16 22:48:51 +0000

2013-09-02 22:13:57.848 OpenTokBasic[2975:907] - name ipod4-white

2013-09-02 22:13:57.848 OpenTokBasic[2975:907] - hasAudio YES

2013-09-02 22:13:57.849 OpenTokBasic[2975:907] - hasVideo YES

2013-09-02 22:14:07.810 OpenTokBasic[2975:907] subscriber.session.sessionId: 2_MX4zODYyMzEyMn4xMjcuMC4wLjF-TW9uIFNlcCAwMiAwNzowNjo1NSBQRFQgMjAxM34wLjE1Mjg2MjM3fg

2013-09-02 22:14:07.811 OpenTokBasic[2975:907] - stream.streamId: 1805012313

2013-09-02 22:14:07.812 OpenTokBasic[2975:907] - subscribeToAudio NO

2013-09-02 22:14:07.813 OpenTokBasic[2975:907] - subscribeToVideo NO

2013-09-02 22:14:09.900 OpenTokBasic[2975:907] subscriberDidConnectToStream (EDB2E676-C584-4D33-9F46-941D33E94716)

2013-09-02 22:14:09.902 OpenTokBasic[2975:907] subscriberDidConnectToStream (EDB2E676-C584-4D33-9F46-941D33E94716)

WARNING: no real random source present!

2013-09-02 22:14:14.921 OpenTokBasic[2975:907] subscriberVideoDataReceived (1805012313)

2013-09-02 22:14:27.978 OpenTokBasic[2975:907] subscriber: 1805012313 didFailWithError: 

2013-09-02 22:14:27.980 OpenTokBasic[2975:907] - code: 1

2013-09-02 22:14:27.981 OpenTokBasic[2975:907] - description: The subscriber timed out.
2

There are 2 best solutions below

0
On

This is a defect in opentok, and there is no correction yet. You may find some useful information in the tokbox forums (see this)

0
On

This can happen sometimes with slow bandwidth. Do you get this error consistently? What you can do is call session.subscribe again in the subscribe did fail delegate, so your app continues to try to subscribe to that video stream.

Each video stream takes a bandwidth of about 300-500kb/s