soulfx / gmusic-playlist.js

a javascript version of gmusic-playlist
MIT License
114 stars 16 forks source link

403 Forbidden For Search #3

Open NessDan opened 8 years ago

NessDan commented 8 years ago

Any requests that the script does to /music/services/search returns a 403 Forbidden.

From what I gathered online, Google deprecated that API?

soulfx commented 8 years ago

i've seen this error when the session info isn't being passed correctly to the service. forbidden errors usually mean that something is wrong with the login info

make sure you are logged into chrome as the same user you are logging into google music as. see #1

NessDan commented 8 years ago

I am the same user in Chrome as I am on Google Play Music. Where in the code does it get the session info? I can debug it and see why it's not being passed correctly.

On Mon, Mar 21, 2016 at 8:13 PM John Elkins notifications@github.com wrote:

i've seen this error when the session info isn't being passed correctly to the service. forbidden errors usually mean that something is wrong with the login info

make sure you are logged into chrome as the same user you are logging into google music as.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/soulfx/gmusic-playlist.js/issues/3#issuecomment-199551985

soulfx commented 8 years ago

it captures the session info via the xhr tap. a debugger statement could be added to the SessionInfo.fromTap function to see what it's getting.

here's my attempts to figure out what's going on with it: there seems to be a bunch of different reasons for the 403 error

it seems like once the account gets into a state where it starts working correctly it's not very easy to get it back into the 403 state, thus making it difficult to debug the issue without creating another new test accounts.

NessDan commented 8 years ago

Got ya, well if I find any more information on this I'll let you know.

On Mon, Mar 21, 2016 at 10:54 PM John Elkins notifications@github.com wrote:

it captures the session info via the xhr tap. a debugger statement could be added to the SessionInfo.fromTap function to see what it's getting.

here's my attempts to figure out what's going on with it: there seems to be a bunch of different reasons for the 403 error

  • no credit card associated with the account (adding a credit card fixes this)
  • no songs/playlists currently in the account library (adding a song and playlist fixes this)
  • logged into google music as a different user than what chrome is logged in as (making sure they are the same user fixes this)
  • session info maybe has expired (logging out of google music and back in seems to resolve this)
  • other weird reasons. on one test account I had no luck importing songs, but if I export the songs and then try import the import worked
  • possible issue regarding a non subscribed vs subscribed account

it seems like once the account gets into a state where it starts working correctly it's not very easy to get it back into the 403 state, thus making it difficult to debug the issue without creating another new test accounts.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/soulfx/gmusic-playlist.js/issues/3#issuecomment-199603405