Search code examples
skypeskype-for-businessskypedeveloper

SkypeSDK Video and audio issue - mediaRelayAccessToken not found


I'm having problems with adding an audio or a video service to a coversation. The chat service works fine for me. When I add a video or an audio service I get following error:

Error: GET /ucwa/oauth/v1/applications/113925534802/communication/mediaRelayAccessToken failed: 404
{
  [functions]: ,
  __proto__: { },
  code: "RequestFailed",
  description: "GET /ucwa/oauth/v1/applications/113925534802/communication/mediaRelayAccessToken failed: 404",
  message: "GET /ucwa/oauth/v1/applications/113925534802/communication/mediaRelayAccessToken failed: 404",
  name: "Error",
  req: { },
  rsp: { },
  stack: "Error: GET /ucwa/oauth/v1/applications/113925534802/communication/mediaRelayAccessToken failed: 404
at process (https://swx.cdn.skype.com/build2015/v5/SDK-build.js:8079:29)
at Anonymous function (https://swx.cdn.skype.com/build2015/v5/SDK-build.js:8018:29)
at Anonymous function (https://swx.cdn.skype.com/build2015/v5/SDK-build.js:1714:25)
at map (https://swx.cdn.skype.com/build2015/v5/SDK-build.js:1331:25)
at decompose (https://swx.cdn.skype.com/build2015/v5/SDK-build.js:8017:25)
at Anonymous function (https://swx.cdn.skype.com/build2015/v5/SDK-build.js:8007:29)
at handle (https://swx.cdn.skype.com/build2015/v5/SDK-build.js:2220:33)
at Anonymous function (https://swx.cdn.skype.com/build2015/v5/SDK-build.js:698:25)"
}

The Skype For Business Plugin is installed and works fine. A Skype Edge server is currently not installed. I'm using Internet Explorer 11.

The error occurs with the Skype Web SDK On Prem Sample from Microsoft as well as on my own website.

When I try to add video or audio for the second time to the same conversation i dont get any error message at all, but it still doesn't work. The request doesnt show up in the dev tools nor in fiddler. I'm using the latest version of the Skype SDk bootstrapper.

Both clients and server are in the same subnet.

Thanks in advance.


Solution

  • I encountered the same problem. Not sure how it happens, but the sdk has troubles to fetch or apply the media config. You can use the this workaround:

    Following line 18,892 in the debug version of the sdk, comment out both calls:

    uninit(); throw error;

    in the function init() of the section MediaConfig. Resulting in:

    function init() { pcMediaConfig = mediaPlugin.createComponent({ type: 'MediaPlatformConfig', hide: true, inproc: false }); pcMediaConfig.event(onPluginComponentEvent); pcMediaConfig.state.changed(function (state) { log('pcMediaConfig.state = ' + state); }); var p = pcMediaConfig.load().then(getMediaConfig).then(setMediaConfig).then(null, function (error) { log('MediaConfig::init rejected'); //uninit(); //throw error; }); return p; }

    Therefore you have to download the bootstrapper and the sdk to permanently apply the patch. To do this just fetch both in the debug version (bootstrapper version 1.2.5) and replace in function onConfig(config) line 48

    }, config.corsScript && (scriptAttributes.crossOrigin = ""), loader.loadScript(getPackageUrl(config), null, handleError, scriptAttributes);

    with

    }, config.corsScript && (scriptAttributes.crossOrigin = ""), loader.loadScript("./scripts/SkypeSDK.js", null, handleError, scriptAttributes);

    or your equivalent path