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

Problems with playing music #200

Closed Yanislavcore closed 3 years ago

Yanislavcore commented 6 years ago

I have installed latest version (3.0.0) of mopidy-gmusic and set the login, password and device id in the configuration file like that:

[gmusic]
enabled = true
username = mylogin
password = app_password
deviceid = device_id_from_initial_log
bitrate = 320

In Mopidy interface I can see my music list, but can't play any song. Here is logs:

2018-07-07 16:27:02,430 - WARNING  Track is not playable: gmusic:track:Tkhke6kn2m22qk4s2xbynwgv57m
2018-07-07 16:27:02,582 - WARNING  Failed to get stream url for Tc3b6knl5dxmts67b32d4jbuuue.
2018-07-07 16:27:02,583 - WARNING  Please ensure your deviceid is set correctly.
2018-07-07 16:27:02,583 - ERROR    Call to Google Music failed
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/mopidy_gmusic/session.py", line 32, in inner_wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/mopidy_gmusic/session.py", line 90, in get_stream_url
    return self.api.get_stream_url(song_id, quality=quality)
  File "<decorator-gen-102>", line 2, in get_stream_url
  File "/usr/local/lib/python2.7/dist-packages/gmusicapi/utils/utils.py", line 293, in wrapper
    return function(*args, **kw)
  File "/usr/local/lib/python2.7/dist-packages/gmusicapi/clients/mobileclient.py", line 393, in get_stream_url
    return self._make_call(mobileclient.GetStreamUrl, song_id, device_id, quality)
  File "/usr/local/lib/python2.7/dist-packages/gmusicapi/clients/shared.py", line 84, in _make_call
    return protocol.perform(self.session, self.validate, *args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/gmusicapi/protocol/shared.py", line 226, in perform
    raise CallFailure(err_msg, call_name)
CallFailure: GetStreamUrl: 403 Client Error: Forbidden for url: https://mclients.googleapis.com/music/mplay?opt=hi&mjck=Tc3b6knl5dxmts67b32d4jbuuue&pt=e&slt=1530977222488&tier=aa&sig=MxeH9DNTDHL1AmbUPNdWvLrAKqM&hl=en_US&dv=0&net=mob
(requests kwargs: {u'url': u'https://mclients.googleapis.com/music/mplay', u'headers': {u'X-Device-ID': 'device_id', u'Authorization': u'<omitted>'}, u'allow_redirects': False, u'params': {u'opt': u'hi', u'mjck': u'Tc3b6knl5dxmts67b32d4jbuuue', u'pt': u'e', u'slt': '1530977222488', u'tier': u'aa', u'sig': 'MxeH9DNTDHL1AmbUPNdWvLrAKqM', u'hl': u'en_US', u'dv': 0, u'net': u'mob'}, u'method': u'GET'})
(response was: u'<HTML>\n<HEAD>\n<TITLE>Forbidden</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Forbidden</H1>\n<H2>Error 403</H2>\n</BODY>\n</HTML>\n')
2018-07-07 16:27:02,584 - WARNING  Track is not playable: gmusic:track:Tc3b6knl5dxmts67b32d4jbuuue

Am I doing something wrong?

benklop commented 6 years ago

i'm also getting this error. perhaps something broke recently?

ispringle commented 6 years ago

Yeah I'm getting 403s as well.

CallFailure: GetStreamUrl: 403 Client Error: Forbidden for url: https://mclients.googleapis.com/music/mplay?opt=med&mjck=T3io3upb3r4ar5shtmlxenwao74&pt=e&slt=1532490123886&tier=aa&sig=-VHRGRe6d1FFOa9x0GT_JwEhP6g&hl=en_US&dv=0&net=mob
(requests kwargs: {u'url': u'https://mclients.googleapis.com/music/mplay', u'headers': {u'X-Device-ID': u'D05099A50905', u'Authorization': u'<omitted>'},
u'allow_redirects': False, u'params': {u'opt': u'med', u'mjck': u'T3io3upb3r4ar5shtmlxenwao74', u'pt': u'e', u'slt': '1532490123886', u'tier': u'aa', u'sig': '-VHRGRe6d1FFOa9x0GT_JwEhP6g', u'hl': u'en_US', u'dv': 0, u'net': u'mob'}, u'method': u'GET'})
(response was: u'<HTML>\n<HEAD>\n<TITLE>Forbidden</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Forbidden</H1>\n<H2>Error 403</H2>\n</BODY>\n</HTML>\n')
WARNING  Track is not playable: gmusic:track:T3io3upb3r4ar5shtmlxenwao74
ispringle commented 6 years ago

I've resolved this issue for myself by not putting in any ID and then copying the 16 digit ID from my Android phone which Mopidy will give on start up if no ID is present in config.

After looking into the upstream docs, google music api, it appears that mopidy-gmusic is using the mobile client interface and that requires an android id.

clementd-fretlink commented 6 years ago

I have the same error, but putting the device ID of one of my android phones does'nt solve the issue. I use version 2.0.0

clementd-fretlink commented 6 years ago

I've upgraded to 3.0.0 and I get the same error

jodal commented 3 years ago

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