adisreyaj / flare

Social network for developers.
https://flare.adi.so
Apache License 2.0
111 stars 19 forks source link

[Bug] Recently Played Songs doens't work #18

Closed leonardssh closed 2 years ago

leonardssh commented 2 years ago

image image

adisreyaj commented 2 years ago

Have you connected your Spotify account?

leonardssh commented 2 years ago

@adisreyaj yep.

leonardssh commented 2 years ago

I tried to create another account and connect it to Spotify, same issue.

adisreyaj commented 2 years ago

Can you try configuring again? Force refresh the page and also try to keep an eye on the network requests.

leonardssh commented 2 years ago

After a couple tries, same result.

Request URL: https://flare.adi.so/cool-stuffs/spotify-last-played/@Leonard
Request Method: GET
Status Code: 500 
Referrer Policy: strict-origin-when-cross-origin

Response:

{"error":"Something went wrong"}
adisreyaj commented 2 years ago

Screenshot 2022-02-28 at 7 18 46 PM Looks like its working!

leonardssh commented 2 years ago

I didn't do anything to it, it seems to have resolved itself. 😅

I think you can now close this issue, since the problem has been solved.

kavinvalli commented 2 years ago
Spotify integration doesn't work

Still doesn't work for me @adisreyaj

This is the api response

{"error":"Something went wrong"}
adisreyaj commented 2 years ago

Hey @kavinvalli, Can you try disabling the cache and trying again.

Screenshot 2022-03-05 at 8 58 15 AM
kavinvalli commented 2 years ago

Hey @kavinvalli, Can you try disabling the cache and trying again.

Screenshot 2022-03-05 at 8 58 15 AM

Still doesn't work @adisreyaj

adisreyaj commented 2 years ago

Cool. Let me check what's going wrong!

kavinvalli commented 2 years ago

@adisreyaj Do you not have to pass the client id here https://github.com/adisreyaj/flare/blob/193ab32f106504ab85af338a7718e96e298aaff0/netlify/functions/spotify-last-played/spotify-last-played.ts#L40-L43

I had done the below in a project of mine once. Seemed to work

Screenshot 2022-03-05 at 09 12 05
kavinvalli commented 2 years ago

https://developer.spotify.com/documentation/general/guides/authorization/code-flow/#request-a-refreshed-access-token

Screenshot 2022-03-05 at 09 16 04
adisreyaj commented 2 years ago

@kavinvalli Only required for PKCE based flow. The issue seems to be because of the development mode of Spotify API. Users need to be explicitly added right now. This is a limitation of the Spotify API when in dev mode.

But I'll investigate further on it.

Thanks for raising the issue. Let me know if you found something as well.

adisreyaj commented 2 years ago

Can you try authorizing one more time? I have cleared the data from redis.

kavinvalli commented 2 years ago

@kavinvalli Only required for PKCE based flow. The issue seems to be because of the development mode of Spotify API. Users need to be explicitly added right now. This is a limitation of the Spotify API when in dev mode.

But I'll investigate further on it.

Thanks for raising the issue. Let me know if you found something as well.

Oh yes yes, I had that issue too. I don't think there's a workaround. You just have to push it to production

kavinvalli commented 2 years ago

@adisreyaj still having the issue. I refresh the app got a 403 saying "Not Configured". Then I connected my spotify account again, again getting a 500 error

kavinvalli commented 2 years ago

Still getting the issue @adisreyaj

adisreyaj commented 2 years ago

Hey, @kavinvalli will update you when I have some clarity on the Spotify API situation.