Announcements

Web Player SDK Does Not Work in Internet Explorer 11

Reply

Web Player SDK Does Not Work in Internet Explorer 11

userdk
Regular

Last year I created a C#/WPF application with an embedded Spotify Web Player SDK. It has worked fine, as far as I am aware, for the last 400+ days. However, recently it has stopped working. As far as I can estimate, it stopped working around 15 days ago.


This link is very much related to the problem I am having (it is the foundation of what has been working for the last 400+ days):


https://github.com/spotify/web-playback-sdk/issues/34#issuecomment-409838775


When I run that code I get the following error in my console:


SCRIPT5009: 'Promise' is undefined.
index.js (345,429)


I try the code with both of the suggestions here:


https://github.com/spotify/web-playback-sdk/issues/34#issue-328445209


Are others experiencing the same issue I am reporting? Can anybody offer some guidance how to get this to work in Internet Explorer 11?

 

Here is the code (if it can be made to work then it will very likely solve my issue):

<!DOCTYPE html>
<html>
<head>
  <title>Spotify Web Player</title>
  <script src='https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.min.js'></script>
  <script>ES6Promise.polyfill();</script>
</head>
<body>
  <h1>Spotify Web Player</h1>
  
  <div id='log'>

  </div>
  <script src='https://sdk.scdn.co/spotify-player.js'></script>
  <script>
    window.onSpotifyWebPlaybackSDKReady = function() {

      function log(message) {
        document.getElementById('log').innerHTML  += '<pre>' + message + '</pre>';
      }

      var token = '{accessToken}';
      var player = new Spotify.Player({
        name: 'Spotify Web Player',
        getOAuthToken: function(cb) { cb(token); }
      });

      // Error handling
      player.addListener('initialization_error', function(error) { log('initialization_error: ' + JSON.stringify(error)); });
      player.addListener('authentication_error', function(error) { log('authentication_error: ' + JSON.stringify(error)); });
      player.addListener('account_error', function(error) { log('account_error: ' + JSON.stringify(error)); });
      player.addListener('playback_error', function(error) { log('playback_error: ' + JSON.stringify(error)); });

      // Playback status updates
      player.addListener('player_state_changed', function(state) { log('player_state_changed: ' + JSON.stringify(state)); });

      // Ready
      player.addListener('ready', function(result) {
        log('player ready: ' + JSON.stringify(result));
      });

      // Not Ready
      player.addListener('not_ready', function(result) {
        log('player not ready: ' + JSON.stringify(result));
      });

      // Connect to the player!
      player.connect();
    };
  </script>
</body>
</html>
9 Replies

Re: Web Player SDK Does Not Work in Internet Explorer 11

userdk
Regular

<removed my reply as I was just trying to append code to my original entry>

Re: Web Player SDK Does Not Work in Internet Explorer 11

ohej
Spotify
Spotify

Thanks for reporting this issue. We're investigating the bug and will work to get it sorted out. I'll report back when we have a fix.

Re: Web Player SDK Does Not Work in Internet Explorer 11

ohej
Spotify
Spotify

We've rolled out a fix that should address the issue. Please have a look and let us know 🙂

Re: Web Player SDK Does Not Work in Internet Explorer 11

userdk
Regular

So far it does not appear to be working. My version of Internet Explorer is:


Version 20H2 (OS Build 19042.804)


I use the program code in the original entry. There are no errors or warnings in the console, so that’s an improvement. I have placed a logging message after the getOAuthToken function, and that gets called, so the execution does make it there whereas previously it did not. The events are either not raised or not detected. I am able to watch it work in Firefox (confirming it’s setup correctly and no caching issues).


It will take me a while to apply recent updates to my computer, so I will try to find another computer where I can try the update.

 

Btw, with the original code, the way you know it works is when you see the following message in the Internet Explorer window:

 

player ready: {"device_id":"..."}

 

 UPDATE: I tried it on another computer, but it does not work there either. Are you seeing it work in Internet Explorer? What IE build version do you have?

Re: Web Player SDK Does Not Work in Internet Explorer 11

userdk
Regular
Any updates? I am not sure if I replied to your message, so I am trying it again.

Re: Web Player SDK Does Not Work in Internet Explorer 11

userdk
Regular

I am not sure if you have seen my replies letting you know it is still an issue, so I am trying again.

Re: Web Player SDK Does Not Work in Internet Explorer 11

userdk
Regular

I don't know if you are in the middle of experimenting with the issue; however, I was just using the app today and it appears to be working again. Once you reply that it's fixed, I'll check again and also have another user try (as my internet connection is not good). For now I'll assume that you might not be completely done with addressing the issue.

Re: Web Player SDK Does Not Work in Internet Explorer 11

ohej
Spotify
Spotify

Apologies for the radio silence. The initial fix we rolled out addressed the original issue you were experiencing but sadly didn't fix it entirely. Yesterday we rolled out a new fix which should fully address the issue.

Re: Web Player SDK Does Not Work in Internet Explorer 11

userdk
Regular

Yes, it is working! Thank you.

SUGGESTED POSTS