Hey, how are you?
Thank you for sending your issue to the Spotify Community, it will be a pleasure to help you.
I'm a Computer Science student, I've already studied Flask and I'll give you some recommendations 🙂
Here are a few things you can check:
Script Inclusion: Ensure that the script is correctly included in your HTML file. It should look something like this:
<script src="https://sdk.scdn.co/spotify-player.js"></script>
Network Access: Make sure your Flask application and any local server settings allow outgoing network requests. Sometimes, firewalls or other security settings could block access to external scripts.
Correct Placement in HTML: Make sure the script is placed just before the closing </body> tag in your HTML file.
CORS Issues: If your Flask app is running with specific CORS settings, ensure that it allows requests to and from Spotify’s SDK. Flask's flask-cors extension might help if you need to adjust CORS policies.
Browser Console: Open the browser console (usually with F12) and see if there are any errors related to the script loading. This can give you more detailed information about what's going wrong.
Check for Ad Blockers: Sometimes, ad blockers or privacy extensions in browsers can block scripts like this one. Try disabling them temporarily to see if it resolves the issue.
Local Environment Configuration: Ensure that your local environment is set up correctly, and that your Flask app is serving static files and routing correctly.
If all these are in place and you still have issues, it might help to share more details or specific code snippets to troubleshoot further.
Cheers,
ribezaz
ribezazSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.