Closed indomitableMan closed 1 month ago
Please change your password. You just included it in the post above. I have removed it
Wait - you pass the password in clear text as part of the call....? Probably not a good idea. Changed my password.
Are you saying that is the Qobuz username is NOT formatted as an email address then it works ok?
Qobuz works fine on my (test)account, also with email login. Its failing completely in your case, in the login stage and looks like the result is unexpected/unhandled.
I'll see if we can make the logging a bit more useful (and hide the password from logging).
I have no idea if Qobuz works with a username not formatted as an email or not. The web UI simply fails with the error as stated in the bug report. Due to the nature of this error this makes it impossible for me to add Qobuz as a music provider to Music Assistant and is a blocker to my adopting Music Assistant.
The following error appears in the MA log when attempting to configure the Qobuz provider:
2024-07-08 22:56:10.219 ERROR (MainThread) [music_assistant] Error loading provider(instance) Qobuz
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/music_assistant/server/server.py", line 416, in load_provider
await self._load_provider(prov_conf)
File "/usr/local/lib/python3.12/site-packages/music_assistant/server/server.py", line 547, in _load_provider
provider = await prov_mod.setup(self, prov_manifest, conf)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/music_assistant/server/providers/qobuz/__init__.py", line 88, in setup
await prov.handle_async_init()
File "/usr/local/lib/python3.12/site-packages/music_assistant/server/providers/qobuz/__init__.py", line 136, in handle_async_init
token = await self._auth_token()
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/music_assistant/server/providers/qobuz/__init__.py", line 696, in _auth_token
details = await self._get_data("user/login", **params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/music_assistant/server/helpers/throttle_retry.py", line 72, in wrapper
return await func(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/music_assistant/server/providers/qobuz/__init__.py", line 768, in _get_data
return await response.json(loads=json_loads)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/site-packages/aiohttp/client_reqrep.py", line 1176, in json
raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('http://www.qobuz.com/api.json/0.2/user/login?username=aname@email.com&password=ZZZZZZZZZZZ&device_manufacturer_id=music_assistant')
Have you tried a different browser?
Yes, I tried Edge and then I tried Chrome.
I have added some more logging to better understand this error. This fix will be available in 2.1.0b15 so you either need to wait until 2.1 stable drops next week or (temporary) switch to the beta.
@indomitableMan were you able to try the beta?
We will close this soon due to no follow up
What version of Music Assistant has the issue?
2.0.7
What version of the Home Assistant Integration have you got installed?
2024.6.5
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?
The problem
When attempting to add the Qobuz provider to Music Assistant through the MA web interface and if the Qobuz username is formatted as an email address (e.g.
bugsbunny@warnerbros.com
), the following error message is displayed:192.168.86.9:8095 says:
0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('http://www.qobuz.com/api.json/0.2/user/login?username=greyzepher@yahoo.com&password=password&device_manufacturer_id=music_assistant')
The result is that the user is blocked and is unable to add the Qobuz provider to Music Assistant.
How to reproduce
Music Providers
Qobuz
Player Providers
Sonos
Full log output
music-assistant-log-showing-issues.txt
Additional information
Running on a QNAP NAS running QTS v5.1.7.2770 using Container Station v3.0.7.891 (a Docker clone)
What version of Home Assistant Core are your running
2024.6.4
What type of installation are you running?
Home Assistant Container
On what type of hardware are you running?
Linux