Announcements

Help Wizard

Step 1

NEXT STEP

`/oauth/authorize` inexplicably failing with "Oops! Something went wrong"

`/oauth/authorize` inexplicably failing with "Oops! Something went wrong"

I figured out my problem, I'm just posting this in case it helps someone else.

 

I'm not sure if it matters, but I am using the current version of the spotify-ruby gem, and will make this same report there, although I think there is something to learn here for Spotify about how errors could be better reported.

 

Using the gem, I am obtaining an URL like this:

url = @accounts.authorize_url(scope: scopes)

appears to be a correct oauth authorization URL, but loading it in the browser always results in the subject error (embedded below).

 

This is an example of the URL:

 

https://accounts.spotify.com/oauth/authorize?client_id=somesecret&redirect_uri=someEncodedURL&respon...

 

The problem turned out to be that the "/oauth" part of the URL was incorrect. If I removed that portion, the page loaded fine with the permission flow.

 

url.gsub!(/\/oauth/, '')

 

So it looks like the Error page that loads is really a 404 page. It would have saved me some time, and probably a lot of people some time, if that page was more clearly a 404 page and not a vague "something went wrong".

 

iwdFC7y

 

Reply
1 Reply

Also, it may appear if your callback URI is without a scheme part(http:// or https://)

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random