Napster / napster.js

Napster Javascript SDK
MIT License
56 stars 44 forks source link

React example music player does not work #24

Closed trung2012 closed 5 years ago

trung2012 commented 5 years ago

Hello,

I cloned the react example and ran npm start. The app opened but the music player does not play any song. This was working a week ago.

Attached is the error in console.

image

Filtos commented 5 years ago

Hello @trung2012, I've been trying to replicate the issue but no luck. Are you still able to hit this error?

trung2012 commented 5 years ago

Hi @Filtos , Yes, I am still getting this error.

In fact I'm also getting another error

image

Filtos commented 5 years ago

Trying to make sure we are starting on the same page. Have you tried pulling down the code recently? We have made some changes in the last couple of days. Also, the first issue could be due to an expired access token. When you launch the app make sure it takes you through the auth flow to get an updated access token.

trung2012 commented 5 years ago

Hi @Filtos,

Yes I tried to clone it again today. I replaced the API_KEY and API_SECRET with mine and when running npm start it did redirect to the auth page. I clicked on Authorize and it took me to the main page. Then when I tried to play something it just logged out that error. The ?code value was a new one so I believe I got a new token.

Filtos commented 5 years ago

Looks like the issue was on our side. There was a bug that would revoke access from apps when trying to generate a new key and secret. We are working on a fix right now. To fix your problem we have given your app the appropriate rights. Let us know if this fixed it (make sure to get another access token upon app launch).

trung2012 commented 5 years ago

Hi @Filtos,

I tried again but it still gave me the same error. I no longer got the second error (map is not a function) though.

Could you please check again?

Filtos commented 5 years ago

Does the account that you are authorizing with have an active subscription? Currently we give developer accounts a temporary subscription, so that might have expired for you. I was able to get the same error as you when I tested with an account without an active subscription. Let me know if that is the case for you.

trung2012 commented 5 years ago

Oh I guess that's why. The account I'm using does not have an active subscription.

trung2012 commented 5 years ago

Clarified