mopidy / mopidy-gmusic

DEPRECATED (Mopidy extension for playing music from Google Play Music)
https://mopidy.com
Apache License 2.0
214 stars 60 forks source link

refresh_token not recognised #235

Closed RossWilliamson closed 3 years ago

RossWilliamson commented 4 years ago

After following the instructions and obtaining a refresh_token (I get instructed to add the token to the config file which I did, when running mopidy I still get

ERROR 2020-03-17 06:22:37,729 [219:GMusicBackend-4] mopidy_gmusic.session No refresh_token in gmusic config. Please run mopidy gmusic login.

I've tried with and without a device_id. I checked to see if there was a device registered on google music and there was not.

I'm using the latest from git.

jjok commented 4 years ago

It sounds like your config file isn't quite right. Could you share what the [gmusic] section looks like (with passwords and tokens removed)?

RossWilliamson commented 4 years ago

See below

[gmusic] refresh_token = long_token_starting_with_1// deviceid = mac enabled = false username = none password = none all_access = true bitrate = 320

jjok commented 4 years ago

You need to set your username and password as well as the refresh_token and deviceid.

I'm assuming you haven't explicitly set enabled to false, but if you have, that will disable the extension.

RossWilliamson commented 4 years ago

Sorry but I did actually set the uname and password and the enable is True (It's a node.js in a docker that updates the value) - The above is misleading (edited and updated). for the device_id, my understanding is that I need to retrieve that from Google Music but when I go to google music there is no device registered.

jjok commented 4 years ago

Are you running the mopidy command or running as a service? Is the above config copied from your config file, or from the output of mopidy config / mopidyctl config?

RossWilliamson commented 4 years ago

running as command, however mopidy config did show that the refresh_token is emtpy! I think it's something to do with how my docker and node.js is setup in terms of updating the config file.... (New at this). I'll dig around but I think for the moment it's user error.....

bi0shacker001 commented 4 years ago

I'm having the same issue with a standard install on archlinux, running mopidy with a systemd service as user mopidy.

jjok commented 4 years ago

It's the same solution then. If you run mopidyctl config and the config you entered isn't there, it means you're editing the wrong config file.

bi0shacker001 commented 4 years ago

There is no wrong config file. I only have one file, /etc/mopidy/mopidy.conf Everything is configured in there. I don't have anything automating my config

bi0shacker001 commented 4 years ago

If there is somewhere else besides the system mopidy config file that config information goes in, please feel free to share. I did my research before replying to this, and was unable to find anything.

jjok commented 4 years ago

Sounds like a different issue then. Try asking on the forum https://discourse.mopidy.com/.

kingosticks commented 4 years ago

Can you confirm that the refresh_token value you entered in /etc/mopidy/mopidy.conf is or isn't present in the output of sudo mopidyctl config.

bi0shacker001 commented 4 years ago

It isn't. Mopidyctl shows **** as the value for refresh_token, which I assume is deliberate censoring

kingosticks commented 4 years ago

OK, right, but there is something there. Can you provide the entire startup log, up to the point you get the error message.

bi0shacker001 commented 4 years ago

I just checked my logs, and they show google music as logged in, so I guess the issue must have resolved itself somewhere in the middle of the reinstalls and recreating the config file over and over again.

Sorry about that!

jodal commented 3 years ago

Closing because Google Play Music has been shut down, and this project is being discontinued.