Code Monkey home page Code Monkey logo

Comments (5)

jodal avatar jodal commented on August 22, 2024 2

This question from @jacobobryant in #221 is related:

Question about the deviceid config key (and the block explaining it in the README). I didn't have to specify a deviceid (I've also verified that playback works), and mopidy-gmusic didn't output a list of registered devices either (as the README says it would). Is the device id bit just out of date and should be removed?

I don't have a GMusic account, but seems like we should verify this and update the docs.

from mopidy-gmusic.

thefotios avatar thefotios commented on August 22, 2024 1

I came across this recently as well. I'm going to see if I can open a PR around this behavior, but in the meantime you can get the device ID from the Google Music Web UI.

  1. Start mopidy without any device ID specific
    • It appears to register a new device automatically when you first connect
  2. Visit https://play.google.com/music/listen#/accountsettings and scroll down to My Devices
  3. You should see something like No carrier Device
  4. Right click on that and inspect the HTML.
    • It should show you a hex value (eg, 0x12345678). Use the part after the 0x

from mopidy-gmusic.

syedrali avatar syedrali commented on August 22, 2024

Thanks. Is there any clarification? If you want to run Mopidy in a container where the mac address cannot be obtained, then what value should be used for deviceid?

from mopidy-gmusic.

 avatar commented on August 22, 2024

as @syedrali said, there was no output and i wasn't sure where to find it if it did exist. using the "mac" value also failed.

i can verify @thefotios method works. i was having an issue with the device id and no matter what I tried it failed and would output errors.

this was the initial error without setting the device id value:


ERROR    2020-05-07 21:41:49,762 [44104:GMusicBackend-6] pykka
  Unhandled exception in GMusicBackend (urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx):
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/pykka/_actor.py", line 186, in _actor_loop
    self.on_start()
  File "/usr/local/lib/python3.8/dist-packages/mopidy_gmusic/backend.py", line 47, in on_start
    self.session.login(
  File "/usr/local/lib/python3.8/dist-packages/mopidy_gmusic/session.py", line 68, in login
    authenticated = self.api.oauth_login(
  File "/usr/local/lib/python3.8/dist-packages/gmusicapi/clients/mobileclient.py", line 184, in oauth_login
    return self._login(session_login, device_id, locale)
  File "/usr/local/lib/python3.8/dist-packages/gmusicapi/clients/mobileclient.py", line 125, in _login
    raise OSError("a valid MAC could not be determined."
OSError: a valid MAC could not be determined. Provide an android_id (and be sure to provide the same one on future runs).
ERROR    2020-05-07 21:41:49,765 [44104:MainThread] mopidy.commands
  Actor died: GMusicBackend (urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) stopped before handling the message

then i tried using the "mac" value and it gave me the same error as above. after reading this thread and some tinkering i got a new error which was due to the initial hex prefixed at the beginning.

  Unhandled exception in GMusicBackend (urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx):
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/pykka/_actor.py", line 186, in _actor_loop
    self.on_start()
  File "/usr/local/lib/python3.8/dist-packages/mopidy_gmusic/backend.py", line 47, in on_start
    self.session.login(
  File "/usr/local/lib/python3.8/dist-packages/mopidy_gmusic/session.py", line 68, in login
    authenticated = self.api.oauth_login(
  File "/usr/local/lib/python3.8/dist-packages/gmusicapi/clients/mobileclient.py", line 184, in oauth_login
    return self._login(session_login, device_id, locale)
  File "/usr/local/lib/python3.8/dist-packages/gmusicapi/clients/mobileclient.py", line 138, in _login
    self.android_id = self._validate_device_id(device_id, is_mac=is_mac)
  File "/usr/local/lib/python3.8/dist-packages/gmusicapi/clients/mobileclient.py", line 75, in _validate_device_id
    raise InvalidDeviceId('Invalid device_id %s.' % device_id, device_ids)
gmusicapi.exceptions.InvalidDeviceId: Invalid device_id 0xXXXXXXXXXXXXXXXX.Your valid device IDs are:
* xxxxxxxxxxxxxxxx
ERROR    2020-05-07 21:33:53,962 [43598:MainThread] mopidy.commands
  Actor died: GMusicBackend (urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) stopped before handling the message

once i removed the prefix from the device id, it was able to load and run.

INFO     2020-05-07 21:46:34,001 [44461:MainThread] mopidy.commands
  Starting Mopidy backends: FileBackend, M3UBackend, StreamBackend, GMusicBackend
INFO     2020-05-07 21:46:34,010 [44461:Audio-2] mopidy.audio.actor
  Audio output set to "autoaudiosink"
INFO     2020-05-07 21:46:37,224 [44461:GMusicBackend-6] mopidy_gmusic.session
  Logged in to Google Play Music
INFO     2020-05-07 21:46:37,225 [44461:MainThread] mopidy.commands

I am unfortunately facing another unrelated issue with mopidy-gmusic. i'll see if i can find a related thread first and if i do, i'll post it there. if not, then i can always new an issue and post the details there.

from mopidy-gmusic.

jodal avatar jodal commented on August 22, 2024

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

from mopidy-gmusic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.