Closed azrael783 closed 2 years ago
Hey there @onfreund, mind taking a look at this issue as it has been labeled with an integration (volumio
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
volumio documentation volumio source (message by IssueLinks)
Hey @azrael783. I'm not seeing this, but there could be several differences between our environments:
Based on the logs, it seems like you've clicked through at least one media item. Was it just one? Which one was it?
@OnFreund I get the error on all items, doesn't matter on what I click. HA is set to German - my native language. I switch the language to English and tried it again, but it still does not work and I got the same error message. So I am guessing it is because of the version 3 of Volumio. For full record here is the error message with UI set to English:
Logger: homeassistant.components.websocket_api.http.connection
Source: components/volumio/browse_media.py:146
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 10:55:51 PM (8 occurrences)
Last logged: 10:56:06 PM
[2810770264] Error handling message: Unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1179, in websocket_browse_media
payload = await player.async_browse_media(media_content_type, media_content_id)
File "/usr/src/homeassistant/homeassistant/components/volumio/media_player.py", line 289, in async_browse_media
return await browse_node(
File "/usr/src/homeassistant/homeassistant/components/volumio/browse_media.py", line 146, in browse_node
json_item = json.loads(media_content_id)
File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.9/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 75 (char 74)
If you set your web browser to http://volumio.local/api/v1/browse
what do you see?
This is the result:
{
"navigation": {
"lists": [
{
"albumart": "/albumart?sourceicon=music_service/mpd/favouritesicon.png",
"name": "Favoriten",
"uri": "favourites",
"plugin_type": "",
"plugin_name": ""
},
{
"albumart": "/albumart?sourceicon=music_service/mpd/playlisticon.png",
"name": "Wiedergabelisten",
"uri": "playlists",
"plugin_type": "music_service",
"plugin_name": "mpd"
},
{
"albumart": "/albumart?sourceicon=music_service/mpd/musiclibraryicon.png",
"name": "Musikbibliothek",
"uri": "music-library",
"plugin_type": "music_service",
"plugin_name": "mpd"
},
{
"albumart": "/albumart?sourceicon=music_service/mpd/artisticon.png",
"name": "Interpreten",
"uri": "artists://",
"plugin_type": "music_service",
"plugin_name": "mpd"
},
{
"albumart": "/albumart?sourceicon=music_service/mpd/albumicon.png",
"name": "Alben",
"uri": "albums://",
"plugin_type": "music_service",
"plugin_name": "mpd"
},
{
"albumart": "/albumart?sourceicon=music_service/mpd/genreicon.png",
"name": "Genres",
"uri": "genres://",
"plugin_type": "music_service",
"plugin_name": "mpd"
},
{
"name": "Media Servers",
"uri": "upnp",
"plugin_type": "music_service",
"plugin_name": "upnp_browser",
"albumart": "/albumart?sourceicon=music_service/upnp_browser/dlnaicon.png"
},
{
"albumart": "/albumart?sourceicon=music_service/last_100/icon.png",
"name": "Die letzten 100",
"uri": "Last_100",
"plugin_type": "music_service",
"plugin_name": "last_100"
},
{
"albumart": "/albumart?sourceicon=music_service/webradio/icon.png",
"icon": "fa fa-microphone",
"name": "Internetradio",
"uri": "radio",
"plugin_type": "music_service",
"plugin_name": "webradio"
},
{
"name": "Spotify",
"uri": "spotify",
"plugin_type": "music_service",
"plugin_name": "spop",
"albumart": "/albumart?sourceicon=music_service/spop/spotify.png"
}
]
}
}
Great. This looks relatively close to what I'm seeing.
You said this reproduces regardless of what you click when browsing in HA, so I'm assuming this reproduces when you click Favorites (Favoriten).
Can you now set your web browser to http://volumio.local/api/v1/browse?uri=favourites
and paste the response?
(please paste as it is, without adding spaces, line breaks, etc...)
{"navigation":{"prev":{"uri":""},"info":{"uri":"playlists/favourites","title":"Favoriten","name":"favourites","service":"mpd","type":"play-playlist","albumart":"/albumart?sourceicon=music_service/mpd/favouritesicon.png"},"lists":[{"availableListViews":["list"],"items":[{"service":"spop","type":"song","title":"Alt und grau","artist":"Philipp Poisel","album":"Alt und grau","albumart":"https://i.scdn.co/image/ab67616d0000b273fe80c5064948bffde7add3f5","uri":"spotify:track:0hRywCtejTyKTfAAtuZui8"}]}]}}
Hmm, I tried loading and dumping json with both and everything seems to be working well for me.
Are you comfortable changing code? Can you add a log with the value of media_content_id
before this line?
Comfortable not really, but willing to help. When you tell me exactly what I should add I'll add it ;)
well since there's no logging in that file there might be some work involved, but if you can run HA from the console we can add a print
.
Alternatively, if there's a way I can gain access to your volumio that can also work.
Would it be an option if I have a look to the development environment of HA and setting it up on my PC? I have a little knowledge about Python, so we can also try to add the logging to that specific file.
sure, a development env would be really helpful
Ok, it took me a while, but now I have a dev env up and running. I added my Volumio device and what should I say: it is working :-O :-( They only thing I can imagine what could cause the problem is the setup of my network. I am using a firewall (Sophos XG) and different Vlans. The Volumio is sitting in the Vlan ID 100 and my productive HA is sitting in Vlan ID 140. I created a firewall rule saying that Vlan ID 140 is allowed to access port 3000 in Vlan ID 100 and thought this would be everything I need to do, because I could add Volumio to HA. In the dev env the situation is looking different. Since I am using a Windows PC I set up the dev env in a Linux VM. This VM is sitting also in the Vlan ID 100. So need for a firewall rule (same network range). Do you thing also that my network setup is causing the problem? Can I extend my network rule so that I am able to use the full functionality of the Media browser and my Volumio device?
I am also getting "Unknown error" when I click on any icon in the Media Library. I can start, stop and pause, go to next track etc, but that's about all. I'm fully up to date on versions etc. Running on "Blue". Using https and a DuckDNS domain if that's relevant.
@azrael783 this could either be your network topology, or perhaps locale differences. Really sorry, but I don't think that's something I'll be able to remotely assist you with.
@HemiBob please add logs
I am having the same issue.
Log:
2022-02-12 18:22:28 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [23231927329984] Error handling message: Unknown error Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1179, in websocket_browse_media payload = await player.async_browse_media(media_content_type, media_content_id) File "/usr/src/homeassistant/homeassistant/components/volumio/media_player.py", line 289, in async_browse_media return await browse_node( File "/usr/src/homeassistant/homeassistant/components/volumio/browse_media.py", line 146, in browse_node json_item = json.loads(media_content_id) File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.9/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 73 (char 72)
@olympia which volumio version? Which language is volumio set to? And which language in HA?
Volumio v3.198 HA 2022.2.5 Both languages are set to English.
I installed Volumio v2.9.17 and I have the same issue.
@olympia can you run custom code to help debug this? I'd like to add a log at https://github.com/home-assistant/core/blob/dev/homeassistant/components/volumio/browse_media.py#L146
Sure, if you tell me what do I need to add, I can add it, no problem.
"@HemiBob please add logs" Did you mean this or the full log (it's quite long" HAlog1.txt
Hey @OnFreund I adjusted my firewall rules and now I am able to curl the Volumio API from my HA host and I am getting a valid json back curl http://192.168.100.25/api/v1/getQueue
:
{
"queue": [
{
"uri": "spotify:track:0hRywCtejTyKTfAAtuZui8",
"service": "spop",
"name": "Alt und grau",
"artist": "Philipp Poisel",
"album": "Alt und grau",
"type": "song",
"duration": 238,
"tracknumber": 1,
"albumart": "https://i.scdn.co/image/ab67616d0000b273fe80c5064948bffde7add3f5",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:77g8f7X4xlvwLGi1N8mZf8",
"service": "spop",
"name": "Requiem - Aus Sing meinen Song, Vol. 7",
"artist": "Max Giesinger",
"album": "Sing meinen Song - Das Tauschkonzert, Vol. 7",
"type": "song",
"duration": 210,
"tracknumber": 41,
"albumart": "https://i.scdn.co/image/ab67616d0000b273b7afcd41ec9bec56bf219f43",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:5D0vkvek3pOkxk0udva7Yw",
"service": "spop",
"name": "Let Her Go",
"artist": "Music Travel Love",
"album": "Let Her Go",
"type": "song",
"duration": 175,
"tracknumber": 1,
"albumart": "https://i.scdn.co/image/ab67616d0000b273f2391fc1c1a0b8f2a1871aa4",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:5Os0AaIOMP9qL8Df4ohAjD",
"service": "spop",
"name": "When The Lights Die (Live 2017)",
"artist": "Boyce Avenue",
"album": "Live At The Royal Albert Hall",
"type": "song",
"duration": 332,
"tracknumber": 17,
"albumart": "https://i.scdn.co/image/ab67616d0000b273014e76430111d3317834156f",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:6ft4hAq6yde8jPZY2i5zLr",
"service": "spop",
"name": "Paradise (feat. Dermot Kennedy)",
"artist": "MEDUZA",
"album": "Paradise",
"type": "song",
"duration": 167,
"tracknumber": 1,
"albumart": "https://i.scdn.co/image/ab67616d0000b273b6567be9f8b996a2b5f9b7fa",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:35cH6bznZ4c6ZpB0k7FJJD",
"service": "spop",
"name": "I’ll Be The One (Live 2017)",
"artist": "Boyce Avenue",
"album": "Live At The Royal Albert Hall",
"type": "song",
"duration": 281,
"tracknumber": 1,
"albumart": "https://i.scdn.co/image/ab67616d0000b273014e76430111d3317834156f",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:6DW6gu5pELdUrpSPwnUDfe",
"service": "spop",
"name": "Der wichtigste Finger einer Faust",
"artist": "Jupiter Jones",
"album": "Der wichtigste Finger einer Faust",
"type": "song",
"duration": 207,
"tracknumber": 1,
"albumart": "https://i.scdn.co/image/ab67616d0000b273b1ee85182c00c4298d508c9d",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:1EX2ZFYhxizorwj61TLeNn",
"service": "spop",
"name": "The Great Escape - Aus Sing meinen Song, Vol. 7",
"artist": "LEA",
"album": "Sing meinen Song - Das Tauschkonzert, Vol. 7",
"type": "song",
"duration": 179,
"tracknumber": 13,
"albumart": "https://i.scdn.co/image/ab67616d0000b273b7afcd41ec9bec56bf219f43",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:1OIuDHlciTCy4JUaJ6OZms",
"service": "spop",
"name": "Nothing Else Matters",
"artist": "Dermot Kennedy",
"album": "Nothing Else Matters",
"type": "song",
"duration": 181,
"tracknumber": 1,
"albumart": "https://i.scdn.co/image/ab67616d0000b273174ed5990252345aea26c246",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:2ZqH86V4wKLhoxmlMAPrlT",
"service": "spop",
"name": "Unforgettable - Aus Sing meinen Song, Vol. 7",
"artist": "Max Giesinger",
"album": "Sing meinen Song - Das Tauschkonzert, Vol. 7",
"type": "song",
"duration": 215,
"tracknumber": 12,
"albumart": "https://i.scdn.co/image/ab67616d0000b273b7afcd41ec9bec56bf219f43",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:2yE8FIyAqgihpur7BuIJo8",
"service": "spop",
"name": "This Close",
"artist": "Sasha Broad-Kolff",
"album": "This Close",
"type": "song",
"duration": 220,
"tracknumber": 1,
"albumart": "https://i.scdn.co/image/ab67616d0000b2739c42d255d002d10d8f80bec5",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:7gW7i2RDp4VIZ9a4qsWyPd",
"service": "spop",
"name": "Für immer - Aus Sing meinen Song, Vol. 7",
"artist": "LEA",
"album": "Sing meinen Song - Das Tauschkonzert, Vol. 7",
"type": "song",
"duration": 205,
"tracknumber": 6,
"albumart": "https://i.scdn.co/image/ab67616d0000b273b7afcd41ec9bec56bf219f43",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:2TIlqbIneP0ZY1O0EzYLlc",
"service": "spop",
"name": "Someone You Loved",
"artist": "Lewis Capaldi",
"album": "Breach",
"type": "song",
"duration": 182,
"tracknumber": 3,
"albumart": "https://i.scdn.co/image/ab67616d0000b273b280aea74eef855675d7b93b",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:6akJULhQxwRxYixWkm1FcN",
"service": "spop",
"name": "One Life (Live 2017)",
"artist": "Boyce Avenue",
"album": "Live At The Royal Albert Hall",
"type": "song",
"duration": 249,
"tracknumber": 4,
"albumart": "https://i.scdn.co/image/ab67616d0000b273014e76430111d3317834156f",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:2fkofazzEKdQF5WcY8l7Vw",
"service": "spop",
"name": "Imperfect Me (Live 2017)",
"artist": "Boyce Avenue",
"album": "Live At The Royal Albert Hall",
"type": "song",
"duration": 185,
"tracknumber": 3,
"albumart": "https://i.scdn.co/image/ab67616d0000b273014e76430111d3317834156f",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:6BF7yOcsrVEXOijT94jSfm",
"service": "spop",
"name": "Unter uns Darwinfinken - Live",
"artist": "Jupiter Jones",
"album": "Glory.Glory.Hallelujah (Live)",
"type": "song",
"duration": 251,
"tracknumber": 2,
"albumart": "https://i.scdn.co/image/ab67616d0000b273e8ddbce4744b7594feb81391",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:3FmXthXVuPt1MBRPHmggiF",
"service": "spop",
"name": "The Silence - Live at The Regency Ballroom San Francisco",
"artist": "Manchester Orchestra",
"album": "The Silence (Live at The Regency Ballroom San Francisco)",
"type": "song",
"duration": 466,
"tracknumber": 1,
"albumart": "https://i.scdn.co/image/ab67616d0000b2731c8ec01d58a9b13fb933e711",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:4Dl855fAN0nKsqlpsuh8pG",
"service": "spop",
"name": "A Thousand Years / Say You Won’t Let Go (Live 2017)",
"artist": "Boyce Avenue",
"album": "Live At The Royal Albert Hall",
"type": "song",
"duration": 212,
"tracknumber": 7,
"albumart": "https://i.scdn.co/image/ab67616d0000b273014e76430111d3317834156f",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:0E4Y1XIbs8GrAT1YqVy6dq",
"service": "spop",
"name": "Afterglow",
"artist": "Ed Sheeran",
"album": "Afterglow",
"type": "song",
"duration": 185,
"tracknumber": 1,
"albumart": "https://i.scdn.co/image/ab67616d0000b27388e170d5ced543d191593fc8",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:45NUv122ojC03U0Hj8Nnda",
"service": "spop",
"name": "Zwischen der Zeit",
"artist": "Jupiter Jones",
"album": "Entweder geht diese scheussliche Tapete - oder ich.",
"type": "song",
"duration": 249,
"tracknumber": 7,
"albumart": "https://i.scdn.co/image/ab67616d0000b2739bbc5f240eadab669acac9d0",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:6PQ88X9TkUIAUIZJHW2upE",
"service": "spop",
"name": "Bad Habits",
"artist": "Ed Sheeran",
"album": "Bad Habits",
"type": "song",
"duration": 231,
"tracknumber": 1,
"albumart": "https://i.scdn.co/image/ab67616d0000b2734e03a288fd79707055759f9c",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:61nwVpHcimkvZUXCWJ0BrE",
"service": "spop",
"name": "Yellow (Live 2017)",
"artist": "Boyce Avenue",
"album": "Live At The Royal Albert Hall",
"type": "song",
"duration": 263,
"tracknumber": 2,
"albumart": "https://i.scdn.co/image/ab67616d0000b273014e76430111d3317834156f",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:2VxeLyX666F8uXCJ0dZF8B",
"service": "spop",
"name": "Shallow",
"artist": "Lady Gaga",
"album": "A Star Is Born Soundtrack",
"type": "song",
"duration": 215,
"tracknumber": 12,
"albumart": "https://i.scdn.co/image/ab67616d0000b273e2d156fdc691f57900134342",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:0yeqPAksuGh5aIkrftVzqy",
"service": "spop",
"name": "Wenn Alle Es Verstehen",
"artist": "Jupiter Jones",
"album": "Leise",
"type": "song",
"duration": 368,
"tracknumber": 6,
"albumart": "https://i.scdn.co/image/ab67616d0000b273f0f9d046522a26166d748b7c",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:6dCCkhpU9TJzau8Dsuz8NF",
"service": "spop",
"name": "Leiser - Aus Sing meinen Song, Vol. 7",
"artist": "Ilse DeLange",
"album": "Sing meinen Song - Das Tauschkonzert, Vol. 7",
"type": "song",
"duration": 216,
"tracknumber": 36,
"albumart": "https://i.scdn.co/image/ab67616d0000b273b7afcd41ec9bec56bf219f43",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:2H14vPy0UPxCtR6lPUUNwb",
"service": "spop",
"name": "Cinderella (Live 2017)",
"artist": "Boyce Avenue",
"album": "Live At The Royal Albert Hall",
"type": "song",
"duration": 201,
"tracknumber": 6,
"albumart": "https://i.scdn.co/image/ab67616d0000b273014e76430111d3317834156f",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:5F5E3thZM1LYxl1kqO87ZW",
"service": "spop",
"name": "Everlong (Live 2017)",
"artist": "Boyce Avenue",
"album": "Live At The Royal Albert Hall",
"type": "song",
"duration": 248,
"tracknumber": 5,
"albumart": "https://i.scdn.co/image/ab67616d0000b273014e76430111d3317834156f",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:2uJcLlydqLdGiiABFa4KfN",
"service": "spop",
"name": "Mr Red White and Blue",
"artist": "Coffey Anderson",
"album": "Boots and Jeans",
"type": "song",
"duration": 207,
"tracknumber": 6,
"albumart": "https://i.scdn.co/image/ab67616d0000b273668a0f594708082117eb90dc",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:7MRSAhuQAF4LTZ0mHaxn8r",
"service": "spop",
"name": "New York",
"artist": "Snow Patrol",
"album": "Fallen Empires",
"type": "song",
"duration": 240,
"tracknumber": 9,
"albumart": "https://i.scdn.co/image/ab67616d0000b2731580fe8779d8b622df5b932c",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:0XpTuvT4Yueddiv20w6M9a",
"service": "spop",
"name": "Schwarz",
"artist": "LEA",
"album": "Schwarz",
"type": "song",
"duration": 156,
"tracknumber": 1,
"albumart": "https://i.scdn.co/image/ab67616d0000b273c203d1cf6b8c51d1eb3de714",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:4k4rZRbyY0SivA62lFNJ7W",
"service": "spop",
"name": "Still - Live",
"artist": "Jupiter Jones",
"album": "Glory.Glory.Hallelujah (Live)",
"type": "song",
"duration": 240,
"tracknumber": 10,
"albumart": "https://i.scdn.co/image/ab67616d0000b273e8ddbce4744b7594feb81391",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:6zaH3Q6zPnjdZlREdcOemU",
"service": "spop",
"name": "Wir sind ja schliesslich nicht Metallica - Live",
"artist": "Jupiter Jones",
"album": "Glory.Glory.Hallelujah (Live)",
"type": "song",
"duration": 217,
"tracknumber": 3,
"albumart": "https://i.scdn.co/image/ab67616d0000b273e8ddbce4744b7594feb81391",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:4Iy0sGIwZZ39D4JnXZFuHi",
"service": "spop",
"name": "Ride The Wave (Live 2017)",
"artist": "Boyce Avenue",
"album": "Live At The Royal Albert Hall",
"type": "song",
"duration": 236,
"tracknumber": 18,
"albumart": "https://i.scdn.co/image/ab67616d0000b273014e76430111d3317834156f",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:698ItKASDavgwZ3WjaWjtz",
"service": "spop",
"name": "Faded",
"artist": "Alan Walker",
"album": "Different World",
"type": "song",
"duration": 212,
"tracknumber": 15,
"albumart": "https://i.scdn.co/image/ab67616d0000b273a108e07c661f9fc54de9c43a",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:6RrMHotaEaRn7nWo2HmfEI",
"service": "spop",
"name": "Wir Sind Ja Schliesslich Nicht Metallica",
"artist": "Jupiter Jones",
"album": "Leise",
"type": "song",
"duration": 240,
"tracknumber": 7,
"albumart": "https://i.scdn.co/image/ab67616d0000b273f0f9d046522a26166d748b7c",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:1bhUWB0zJMIKr9yVPrkEuI",
"service": "spop",
"name": "Perfect Duet (Ed Sheeran & Beyoncé)",
"artist": "Ed Sheeran",
"album": "Perfect Duet (Ed Sheeran & Beyoncé)",
"type": "song",
"duration": 259,
"tracknumber": 1,
"albumart": "https://i.scdn.co/image/ab67616d0000b273af6b2fca3b6e24612a5fe5d8",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:5BUbCP1797SByi5Gnq2aZK",
"service": "spop",
"name": "Broken Angel (Live 2017)",
"artist": "Boyce Avenue",
"album": "Live At The Royal Albert Hall",
"type": "song",
"duration": 291,
"tracknumber": 8,
"albumart": "https://i.scdn.co/image/ab67616d0000b273014e76430111d3317834156f",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:5rzwaJ4x3067nM3YmG99V0",
"service": "spop",
"name": "Afraid of Heights",
"artist": "Billy Talent",
"album": "Afraid of Heights (Deluxe Version)",
"type": "song",
"duration": 225,
"tracknumber": 2,
"albumart": "https://i.scdn.co/image/ab67616d0000b273934e2d0e8e2f6fe8a8fb399b",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:54VwxeOm3RebgDmsW4elPZ",
"service": "spop",
"name": "Für dich - Aus Sing meinen Song, Vol. 7",
"artist": "Ilse DeLange",
"album": "Sing meinen Song - Das Tauschkonzert, Vol. 7",
"type": "song",
"duration": 194,
"tracknumber": 4,
"albumart": "https://i.scdn.co/image/ab67616d0000b273b7afcd41ec9bec56bf219f43",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:6vdpOJoKjpVMA6rty1wkIL",
"service": "spop",
"name": "Fast Car (Live 2017)",
"artist": "Boyce Avenue",
"album": "Live At The Royal Albert Hall",
"type": "song",
"duration": 301,
"tracknumber": 14,
"albumart": "https://i.scdn.co/image/ab67616d0000b273014e76430111d3317834156f",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:2i2JtDSr6GbkRpTToH15SN",
"service": "spop",
"name": "Back to the Start",
"artist": "Michael Schulte",
"album": "Back to the Start",
"type": "song",
"duration": 193,
"tracknumber": 1,
"albumart": "https://i.scdn.co/image/ab67616d0000b2736d3b8f4ff3a248f61271bfa1",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:2qRN3126wJjszL4M8TgcSc",
"service": "spop",
"name": "Wir werden uns wiedersehen - Aus Sing meinen Song, Vol. 7",
"artist": "Nico Santos",
"album": "Sing meinen Song - Das Tauschkonzert, Vol. 7",
"type": "song",
"duration": 288,
"tracknumber": 50,
"albumart": "https://i.scdn.co/image/ab67616d0000b273b7afcd41ec9bec56bf219f43",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:1bbM0XxF2JRR58pepkLdPG",
"service": "spop",
"name": "Wenn alle es verstehen - Live",
"artist": "Jupiter Jones",
"album": "Glory.Glory.Hallelujah (Live)",
"type": "song",
"duration": 354,
"tracknumber": 5,
"albumart": "https://i.scdn.co/image/ab67616d0000b273e8ddbce4744b7594feb81391",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:0eZBeB2xFIS65jQHerispi",
"service": "spop",
"name": "The Sound of Silence",
"artist": "Disturbed",
"album": "Immortalized (Deluxe Edition)",
"type": "song",
"duration": 248,
"tracknumber": 11,
"albumart": "https://i.scdn.co/image/ab67616d0000b273a58c62e75b82e9c3b47d9ef3",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:27dqFqT0UkmLepPk91yD2v",
"service": "spop",
"name": "Torn / Castle On The Hill (Live 2017)",
"artist": "Boyce Avenue",
"album": "Live At The Royal Albert Hall",
"type": "song",
"duration": 207,
"tracknumber": 9,
"albumart": "https://i.scdn.co/image/ab67616d0000b273014e76430111d3317834156f",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:32y9LSjv2Q49T3NnkETXCm",
"service": "spop",
"name": "OK",
"artist": "Robin Schulz",
"album": "Uncovered",
"type": "song",
"duration": 189,
"tracknumber": 7,
"albumart": "https://i.scdn.co/image/ab67616d0000b273c874b3eb6242b8d632ac2305",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:4hc9r2VUybKAC61BL1UYMy",
"service": "spop",
"name": "Auf das was da noch kommt - Aus Sing meinen Song, Vol. 7",
"artist": "Nico Santos",
"album": "Sing meinen Song - Das Tauschkonzert, Vol. 7",
"type": "song",
"duration": 211,
"tracknumber": 1,
"albumart": "https://i.scdn.co/image/ab67616d0000b273b7afcd41ec9bec56bf219f43",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:0ZBU783cHgEKIpvzz9HHEP",
"service": "spop",
"name": "Every Breath (Live 2017)",
"artist": "Boyce Avenue",
"album": "Live At The Royal Albert Hall",
"type": "song",
"duration": 264,
"tracknumber": 10,
"albumart": "https://i.scdn.co/image/ab67616d0000b273014e76430111d3317834156f",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
},
{
"uri": "spotify:track:4IoYz8XqqdowINzfRrFnhi",
"service": "spop",
"name": "You Found Me",
"artist": "The Fray",
"album": "The Fray",
"type": "song",
"duration": 241,
"tracknumber": 3,
"albumart": "https://i.scdn.co/image/ab67616d0000b27392b32435efed601fc8f1045d",
"samplerate": "320Kbps",
"bitdepth": "16 bit",
"trackType": "spotify"
}
]
}
But I still have the "unknown error" while browsing through Media.
No one and idea here :(
Sorry, I've been swamped lately (would have posted a link to what I'm up to but don't want to self-promote :)). If anyone can get me logs of what HA is getting from Volumio that could take us to the next step towards resolving this.
I switch both HA and volumio to English and I am also now using Hassos (latest version) in a VM but I still get this error message
2022-03-04 12:27:45 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139631667425632] Error handling message: Unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1162, in websocket_browse_media
payload = await player.async_browse_media(media_content_type, media_content_id)
File "/usr/src/homeassistant/homeassistant/components/volumio/media_player.py", line 289, in async_browse_media
return await browse_node(
File "/usr/src/homeassistant/homeassistant/components/volumio/browse_media.py", line 146, in browse_node
json_item = json.loads(media_content_id)
File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.9/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 68 (char 67)
Hey, I've got the same issue. I'm running the latest versions of Volumio & Home Assistant on two separates raspberry, both in english.
What's interesting is that I can browse my Volumio music library from the media player card on my Lovelace Board but when I try to do it from the media menu entry, It only shows "Unknown error".
Here's my log :
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response await func(hass, connection, msg) File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1162, in websocket_browse_media payload = await player.async_browse_media(media_content_type, media_content_id) File "/usr/src/homeassistant/homeassistant/components/volumio/media_player.py", line 289, in async_browse_media return await browse_node( File "/usr/src/homeassistant/homeassistant/components/volumio/browse_media.py", line 146, in browse_node json_item = json.loads(media_content_id) File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.9/json/decoder.py", line 353, in raw_decode obj, end = self.scan_once(s, idx) json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 69 (char 68)
Sorry, I've been swamped lately (would have posted a link to what I'm up to but don't want to self-promote :)). If anyone can get me logs of what HA is getting from Volumio that could take us to the next step towards resolving this.
I'm happy to try anything but you would have to say exactly what I have to do as I'm no expert. I have attached some log entries, are they any good? volumio_error_log.txt
@HemiBob as mentioned above, I need form logs than are available with the current code. The required change is to add a log here so we can see what's going on.
Would love to help but I have no idea where I will find that file. I think I'm looking for "/usr/src/homeassistant/homeassistant/components/volumio/browse_media.py". I managed to find /usr/src but it was empty. So, I'm stuck. So sorry, maybe someone who knows what they're doing could help?
From: On Freund @.> Sent: 05 March 2022 15:17 To: home-assistant/core @.> Cc: Bob @.>; Mention @.> Subject: Re: [home-assistant/core] Unkown error while browsing through Media using Volumio (Issue home-assistant/frontend#12276)
@HemiBobhttps://github.com/HemiBob as mentioned above, I need form logs than are available with the current code. The required change is to add a log herehttps://github.com/home-assistant/core/blob/dev/homeassistant/components/volumio/browse_media.py#L146 so we can see what's going on.
— Reply to this email directly, view it on GitHub<home-assistant/frontend#12276>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGFE7PVIFG42OY7PXU45NS3U6N3ILANCNFSM5N5Q4AMQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you were mentioned.Message ID: @.***>
It depends on the installation type. I'm running core, so I determine where the source files are. I don't have experience with other installation types so don't know where to find the sources.
@OnFreund I know where is this file, I can add anything there what you tell me to add, but could you please also specify what exactly needs to be added there? I.e. How to add a log there?
You'll need to add:
_LOGGER = logging.getLogger(__name__)
at line 15, and:
_LOGGER.error("media_content_id: %s", media_content_id)
Before line 146 (I'm using error
so it's easily discoverable in the logs).
I have got this error message following the addition of the above two lines:
Logger: homeassistant.loader
Source: components/volumio/browse_media.py:15
First occurred: 00:37:56 (1 occurrences)
Last logged: 00:37:56
Unexpected exception importing platform homeassistant.components.volumio.media_player
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/loader.py", line 572, in get_platform
cache[full_name] = self._import_platform(platform_name)
File "/usr/src/homeassistant/homeassistant/loader.py", line 589, in _import_platform
return importlib.import_module(f"{self.pkg_path}.{platform_name}")
File "/usr/local/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/usr/src/homeassistant/homeassistant/components/volumio/media_player.py", line 43, in <module>
from .browse_media import browse_node, browse_top_level
File "/usr/src/homeassistant/homeassistant/components/volumio/browse_media.py", line 15, in <module>
_LOGGER = logging.getLogger(__name__)
NameError: name 'logging' is not defined
My bad, sorry about that. You'll also need to add:
import logging
before line 15
OK, this is what I have get in the log now:
2022-03-07 08:30:12 ERROR (MainThread) [homeassistant.components.volumio.browse_media] media_content_id: {"albumart": "/albumart?sourceicon=music_service/mpd/favouritesicon.png"
2022-03-07 08:30:12 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [23219946822624] Error handling message: Unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1162, in websocket_browse_media
payload = await player.async_browse_media(media_content_type, media_content_id)
File "/usr/src/homeassistant/homeassistant/components/volumio/media_player.py", line 289, in async_browse_media
return await browse_node(
File "/usr/src/homeassistant/homeassistant/components/volumio/browse_media.py", line 148, in browse_node
json_item = json.loads(media_content_id)
File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.9/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 73 (char 72)
2022-03-07 08:30:21 ERROR (MainThread) [homeassistant.components.volumio.browse_media] media_content_id: {"albumart": "/albumart?sourceicon=music_service/mpd/artisticon.png"
2022-03-07 08:30:21 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [23219946822624] Error handling message: Unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1162, in websocket_browse_media
payload = await player.async_browse_media(media_content_type, media_content_id)
File "/usr/src/homeassistant/homeassistant/components/volumio/media_player.py", line 289, in async_browse_media
return await browse_node(
File "/usr/src/homeassistant/homeassistant/components/volumio/browse_media.py", line 148, in browse_node
json_item = json.loads(media_content_id)
File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.9/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 69 (char 68)
Interesting.
Can you also add
_LOGGER.error("item: %s", json.dumps(item))
before line 92
Sure, here it is:
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/mpd/favouritesicon.png", "name": "Favorites", "uri": "favourites", "plugin_type": "", "plugin_name": ""}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/mpd/playlisticon.png", "name": "Playlists", "uri": "playlists", "plugin_type": "music_service", "plugin_name": "mpd"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/mpd/musiclibraryicon.png", "name": "Music Library", "uri": "music-library", "plugin_type": "music_service", "plugin_name": "mpd"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/mpd/artisticon.png", "name": "Artists", "uri": "artists://", "plugin_type": "music_service", "plugin_name": "mpd"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/mpd/albumicon.png", "name": "Albums", "uri": "albums://", "plugin_type": "music_service", "plugin_name": "mpd"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/mpd/genreicon.png", "name": "Genres", "uri": "genres://", "plugin_type": "music_service", "plugin_name": "mpd"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"name": "Media Servers", "uri": "upnp", "plugin_type": "music_service", "plugin_name": "upnp_browser", "albumart": "/albumart?sourceicon=music_service/upnp_browser/dlnaicon.png"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/last_100/icon.png", "name": "Last 100", "uri": "Last_100", "plugin_type": "music_service", "plugin_name": "last_100"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/webradio/icon.png", "icon": "fa fa-microphone", "name": "Web Radio", "uri": "radio", "plugin_type": "music_service", "plugin_name": "webradio"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"name": "Spotify", "uri": "spotify", "plugin_type": "music_service", "plugin_name": "spop", "albumart": "/albumart?sourceicon=music_service/spop/spotify.png"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/mpd/favouritesicon.png", "name": "Favorites", "uri": "favourites", "plugin_type": "", "plugin_name": ""}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/mpd/playlisticon.png", "name": "Playlists", "uri": "playlists", "plugin_type": "music_service", "plugin_name": "mpd"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/mpd/musiclibraryicon.png", "name": "Music Library", "uri": "music-library", "plugin_type": "music_service", "plugin_name": "mpd"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/mpd/artisticon.png", "name": "Artists", "uri": "artists://", "plugin_type": "music_service", "plugin_name": "mpd"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/mpd/albumicon.png", "name": "Albums", "uri": "albums://", "plugin_type": "music_service", "plugin_name": "mpd"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/mpd/genreicon.png", "name": "Genres", "uri": "genres://", "plugin_type": "music_service", "plugin_name": "mpd"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"name": "Media Servers", "uri": "upnp", "plugin_type": "music_service", "plugin_name": "upnp_browser", "albumart": "/albumart?sourceicon=music_service/upnp_browser/dlnaicon.png"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/last_100/icon.png", "name": "Last 100", "uri": "Last_100", "plugin_type": "music_service", "plugin_name": "last_100"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"albumart": "/albumart?sourceicon=music_service/webradio/icon.png", "icon": "fa fa-microphone", "name": "Web Radio", "uri": "radio", "plugin_type": "music_service", "plugin_name": "webradio"}
2022-03-09 18:25:14 ERROR (MainThread) [homeassistant.components.volumio.browse_media] item: {"name": "Spotify", "uri": "spotify", "plugin_type": "music_service", "plugin_name": "spop", "albumart": "/albumart?sourceicon=music_service/spop/spotify.png"}
2022-03-09 18:25:15 ERROR (MainThread) [homeassistant.components.volumio.browse_media] media_content_id: {"albumart": "/albumart?sourceicon=music_service/mpd/favouritesicon.png"
2022-03-09 18:25:15 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [23065724905216] Error handling message: Unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1162, in websocket_browse_media
payload = await player.async_browse_media(media_content_type, media_content_id)
File "/usr/src/homeassistant/homeassistant/components/volumio/media_player.py", line 289, in async_browse_media
return await browse_node(
File "/usr/src/homeassistant/homeassistant/components/volumio/browse_media.py", line 149, in browse_node
json_item = json.loads(media_content_id)
File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.9/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 73 (char 72)
2022-03-09 18:25:19 ERROR (MainThread) [homeassistant.components.volumio.browse_media] media_content_id: {"albumart": "/albumart?sourceicon=music_service/mpd/artisticon.png"
2022-03-09 18:25:19 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [23065724905216] Error handling message: Unknown error
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 27, in _handle_async_response
await func(hass, connection, msg)
File "/usr/src/homeassistant/homeassistant/components/media_player/__init__.py", line 1162, in websocket_browse_media
payload = await player.async_browse_media(media_content_type, media_content_id)
File "/usr/src/homeassistant/homeassistant/components/volumio/media_player.py", line 289, in async_browse_media
return await browse_node(
File "/usr/src/homeassistant/homeassistant/components/volumio/browse_media.py", line 149, in browse_node
json_item = json.loads(media_content_id)
File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.9/json/decoder.py", line 353, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 69 (char 68)
This is really odd. The Volumio integration is passing
{"albumart": "/albumart?sourceicon=music_service/mpd/favouritesicon.png", "name": "Favorites", "uri": "favourites", "plugin_type": "", "plugin_name": ""}
but it getting back:
{"albumart": "/albumart?sourceicon=music_service/mpd/favouritesicon.png"
My first suspicion was some length limitation, but we also have this with a different length:
{"albumart": "/albumart?sourceicon=music_service/mpd/artisticon.png"
I think we need the help of someone with a better understanding of the media browser infrastructure. Maybe try asking one of the core team members on Discord to take a look at this issue?
Also, which client is this happening with? App? Browser?
It's happening from a Windows PC browser and the ios app as well.
Is it not going to be something with comma in the json response? json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 69 (char 68)
Yes, it is about the comma, that we knew from the start, the question is why is the media_content_id
truncated just before the comma?
@balloob would you have some time please to look at this? (I was talking to @elupus re this issue and by a very quick look he said that the ending "}* character looks to be forgotten!?)
Sounds like a bug in the frontend.
In the media panel all the navigation IDs are appended to the URL. It's appended using format <type>,<content_id>/<type>,<content_id>/etc...
. So we split on ,
here https://github.com/home-assistant/frontend/blob/dev/src/panels/media-browser/ha-panel-media-browser.ts#L172-L174
So you'll need to look for a bugfix in the frontend.
A workaround is opening the media panel via the more info dialog as it won't use the URL to store IDs.
Thank you @balloob for the very quick feedback. Do you have someone in mind who would be the best to contact regarding this?
@zsarnett Many thanks for the fix! Do you have a hint on which HA release this will be included?
2022.5
I confirm that this is working ok now. Thank you very much for the fix!
The problem
I use the Volumio integration to play musik. When I try to browse through "Media" I always get an "unkown error". This is the error message in the log:
Volumio is runnung on a Pi0 2. The version of Volumio is 3.198. The media player is working fine so far. Browsing through "Media" using the Spotify integration works also fine.
What version of Home Assistant Core has the issue?
core-2022.2.5
What was the last working version of Home Assistant Core?
unknown
What type of installation are you running?
Home Assistant Container
Integration causing the issue
Volumio
Link to integration documentation on our website
https://www.home-assistant.io/integrations/volumio/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response