andrewngu / sound-redux

A Soundcloud client built with React / Redux
http://soundredux.io
GNU General Public License v3.0
5.01k stars 875 forks source link

Songs won't load #128

Open tryzniak opened 6 years ago

tryzniak commented 6 years ago

Seems like something has changed in Soundcloud API . For example https://api.soundcloud.com/tracks?linked_partitioning=1&limit=50&offset=0&client_id=e582b63d83a5fb2997d1dbf2f62705da&tags=tech%20house returns 401 (Unauthorized).

andrewngu commented 6 years ago

Yeah, unfortunately, Soundcloud revoked the api keys without any warning or explanation. I've tried bugging them about it but they haven't gotten back to me yet.

https://twitter.com/SCsupport/status/926407470813274114

tryzniak commented 6 years ago

Hey, @andrewngu . I've kind of investigated what's preventing songs from loading. Your dev client_id was indeed revoked, but the prod key is still working! You can see it's working by going to soundredux.io in private mode. Why's it working in private mode and not in normal? Probably it has something to do with cache busting. If I go to Chrome's DevTools > Application > Clear storage and clear storage sound-redux starts working again in normal browsing mode. What may be helpful here is to add hashes to build filenames. Webpack allows to do it by using CommonsChunkPlugin, you already have installed the plugin but forgotten to add [chunkhash] to the output filename. Here's a link to Webpack's website about caching.

I tried to go through the same procedure on the dev version of the website, but it wasn't loading songs until I changed the client_id to the prod one.