Spotify Preview Build expired

Posted February 11th, 2012 • 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.

Broken?

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

Stay up to date

Want to know when a new post comes out and stay in the loop on tips, tricks and gotchas? Consider signing up for the Mindthecode newsletter.

Comments

Keep reading

February 28th, 2013 • 5 min read
In this post I want to show you how you can customize the terminal to not only make it look cool but work better, too
November 11th, 2011 • 2 min read
How to install PHPUnit manually for CakePHP 2.0
November 29th, 2011 • 1 min read
PHPUnit Installer updated to 3.6.4