4

In my application I do the following steps:

  1. Publish audio only
  2. Unpublish
  3. Publish audio+video
  4. Unpublish
  5. Publish audio only

At stage 5 it fails with the following error:

index.js:460 OT.Publisher.onPublishingTimeoutonPublishingTimeout @ index.js:460(anonymous function) @ index.js:1472 index.js:332 OT.Publisher State Change Failed: 'Failed' cannot transition to 'MediaBound'stateChangeFailed @ index.js:332signalChangeFailed @ generate_simple_state_machine.js:38handleInvalidStateChanges @ generate_simple_state_machine.js:55set @ generate_simple_state_machine.js:65onPublishingTimeout @ index.js:477(anonymous function) @ index.js:1472 ot_error.js:341 OT.exception :: title: Unable to Publish (1500) msg: ICEWorkflow_exceptionHandler @ ot_error.js:341OTError.handleJsException @ ot_error.js:412onPublishingTimeout @ index.js:493(anonymous function) @ index.js:1472 handle.js:1071 1500 "Session.publish :: Could not publish in a reasonable amount of time"

I could reproduce this in all devices that were accessible to me at that time:

  • Chrome on iMac
  • Firefox on iMac
  • Chrome on Macbook pro
  • Chrome on
  • Android 4.x
Lucas Huang
  • 3,998
  • 3
  • 20
  • 29
Anton Kuzmin
  • 821
  • 1
  • 10
  • 26

1 Answers1

0

I work at TokBox on the OpenTok JS SDK. I believe this is similar to a known bug we have recently fixed and will be shipped in the next version 2.9.

The known bug did not differentiate between audio/video, it was:

  1. Publish audio+video
  2. Unpublish
  3. Publish audio+video
  4. Unpublish
  5. Publish audio+video

And then failure.

I believe the fix for this would also apply to your problem (the same underlying problem causes both).

Michael Leaney
  • 753
  • 4
  • 10
  • Thanks Michael! Can I try OpenTok.js beta version? – Anton Kuzmin Jul 20 '16 at 13:14
  • By the way, this question is a duplicate of https://support.tokbox.com/hc/en-us/community/posts/206550223-Publishing-fails-after-unpublishing I wasn't getting any replies there. I hope that forum is alive :-) – Anton Kuzmin Jul 20 '16 at 13:14
  • @HappyCoder you may use https://tbdev.tokbox.com/v2/js/opentok.js to confirm the bug is fixed. Please keep in mind this is a dev build and we cannot guarantee stability of this build, so it's probably best not to use it in any sort of production setting. – Michael Leaney Jul 21 '16 at 00:20
  • I tried but it says my session token is invalid. I guess I have to write to support and request access to beta API? – Anton Kuzmin Jul 21 '16 at 03:11