Type in your question below and we'll check to see what answers we can find...
Loading article...
Submitting...
If you couldn't find any answers in the previous step then we need to post your question in the community and wait for someone to respond. You'll be notified when that happens.
Simply add some detail to your question and refine the title if needed, choose the relevant category, then post.
Before we can post your question we need you to quickly make an account (or sign in if you already have one).
Don't worry - it's quick and painless! Just click below, and once you're logged in we'll bring you right back here and post your question. We'll remember what you've already typed in so you won't have to do it again.
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>
<removed my reply as I was just trying to append code to my original entry>
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.
We've rolled out a fix that should address the issue. Please have a look and let us know 🙂
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?
I am not sure if you have seen my replies letting you know it is still an issue, so I am trying again.
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.
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.
Yes, it is working! Thank you.
Hey there you, Yeah, you! 😁 Welcome - we're glad you joined the Spotify Community! While you here, let's have a fun game and get…