Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / security

Skype Web SDK Troubleshooting

3.80/5 (3 votes)
8 Sep 2015CPOL4 min read 7.3K  
Sometimes connecting to or using the Skype Web SDK isn't as straight forward as you'd like. I'm collecting a list of common issues and scenarios below that can be used to help troubleshoot and identify deployment issues.

Sometimes connecting to or using the Skype Web SDK isn't as straight forward as you'd like. I'm collecting a list of common issues and scenarios below that can be used to help troubleshoot and identify deployment issues.

Make sure the SDK prerequisites are met

Ensure that all your servers are running Lync Server 2013 CU1 or higher, or better still, Skype for Business 2015

Learn more about the SDK's prerequisites.

 

Your code must be on an Internet-facing website or localhost

As contradictory as it sounds, there appears to be issues with instantiating the SDK from a non-Internet facing or localhost-style domain. I'm still trying to find guidance around the reasons why, but these are my observations so far.

 

Domain Name Example Supported?
hostname.domainname http://code.telewebica.net.au/ Yes
localhost http://localhost/ Yes
hostname.invaliddomain http://telewebica.local/ No

 

Check the official Microsoft FAQ

Microsoft have a useful FAQ on MSDN that covers a number of frequently asked questions. Read more.

 

Office 365 isn't supported (yet)

Currently the Skype Web SDK doesn't support Skype for Business Online or Office 365 accounts. It only supports on-premises or hosted environments. Microsoft have indicated that Office 365 is on the roadmap to support the Skype Web SDK, but not timeframe has yet been provided.

 

Cross Domain Authorization

As outlined in the pre-requisites, it's important to ensure that every domain you are going to run the SDK from, including any local domains, are added to the cross domain authorization list. This is performed using the Lync/Skype for Business Management Shell.

<code class="bash">
$myurl = New-CsWebOrigin -Url "{https://mysite}"
Set-CsWebServiceConfiguration -Identity "{myid}" -CrossDomainAuthorizationList @{Add=$myurl}
</code>

If you're not sure whether your domain has been added, you can use the Management Shell to query the list of authorized domains using the command below.

<code class="bash">
Get-CsWebServiceConfiguration | select -ExpandProperty CrossDomainAuthorizationList
    </code>

 

Supported Browsers

Naturally, it is important to make sure that you, and your users, are using a supported Web Browser. The Skype for Business Web App compatibility table is appropriate for the Web SDK as well.

Skype for Business Web App supported platforms

Of course, unless you're using a browser from the 90's that doesn't support JavaScript, it should work fine.

 

Use your Browsers Console Log to Watch the Authentication process

All modern browsers have a Console Log that shows JavaScript logs and errors. This is a great tool for identifying errors from the server as well as basic JavaScript bugs.

Browser Shortcut
Firefox, IE and Edge F12
Chrome Ctrl-Shift-J

Depending on your Browsers configuration, you should be able to watch the JavaScript logs as activities occur.

The example below shows an authentication error (in this case a mismatched domain name):

JavaScript Console Log in Chrome

 

Fiddler is your friend

Fiddler, a free tool from the folks at Telerik, is an web debugging tool that is far more comprehensive than the Console and Debugging Tools built into modern browsers.

Fiddler Web Debugger by Telerik

Using fiddler, you can capture each HTTP action, both the request and the response, including the full response payload, and review it for errors and issues.

 

Check your SSL Certificate

If the site on which your SDK code is hosted is protected using SSL, ensure the certificate is actually valid! This may sound obvious, but it is very easy to overlook.

 

Are you using the latest version of jQuery and other frameworks and libraries?

Whether your serving jQuery from your web site, or referring to a hosted version on a CDN, always ensure you keep your references up to date.

A great place to start is to check the current versions on the jQuery download page.

 

Check Microsoft's current version on the CDN

As with jQuery above, Microsoft's hosted Skype Web SDK is also updated from time to time.

As at the date of this post, the current version is 1.1.23

<code class="html">
<script src="https://swx.cdn.skype.com/shared/v/1.1.23.0/SkypeBootstrap.min.js"></script>
</code>

The version of the script may change from time to time, so it’s always best to check http://developer.skype.com regularly.

Interestingly, updated versions are also available (up to 1.1.25.0), but not publicly shown on the Microsoft web site.

 

The Internet Never Stops...

All the versions of the SDK and 3rd party frameworks and libraries listed in this blog and even on Microsoft's sites can become out of date quickly. Always check from time to time using the links above to make sure you're using the most recent versions.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)