Spotify Preview Build expired

Posted May 15th, 2021 • 2 min read

Today I decided to tinker some more on our Spotify App, only to find that the Preview Build had expired, and was not gonna launch. Period. Great, so now what?

Small update

From IRC:

chiel: Hi guys, just a small update about the expired preview build we're aware of the issue and will put a new one up today however, we're in San Francisco for a hackday, where it is now 8.30am, so bear with us for a moment.

Back to basics

I downloaded the normal user version, and obviously my application didn't fully work. Most noticably the application node had disappeared from the models class, even though it's still present at the developer resource page.

This means one can't change tabs in the following way anymore:

application.observe(models.EVENT.ARGUMENTSCHANGED, handleArgs);

function handleArgs() {
  var args = models.application.arguments;
  $(".section").hide(); // Hide all sections
  $("#" + args[0]).show(); // Show current section

So now what?

I did some digging, and noticed sp.core has some eventListeners. After some fiddling I can now switch tabs again by doing the following:

sp.core.addEventListener("argumentsChanged", function () {
  $(".section").hide(); // Hide all sections
  $("#" + sp.core.getArguments()).show(); // Show current section

Not the most elegant, and I'll probably be able to change it back to the original code when the new Preview Build comes out, but for now I can at least work on the App.


Any one else noticing things that have stopped working and found some workarounds? Do share below!

More posts

May 15th, 2021 • 1 min read
In this short post I will show you how to get rid of a Git submodule
May 15th, 2021 • 35 min read
Exploring the options we have as developers to retrieve a large dataset. We will go through the process of finding the data we need, and then write the code to make that date ours in a format we can use.
May 15th, 2021 • 2 min read
I'd like to use my first post to describe how I set up new projects in a simple way that works best for me.