Skip to content

[BUG] Incorrect padding error with Denon AVR #608

@JSubelj

Description

@JSubelj

Describe the bug
When I try to browse like opening artists, albums etc. on my Denon AVR X1600H, I get an error - server communication fail (dosen't really have any additional info) but in docker logs I get the following:

...
upmpdcli-navidrome  | CMDTALK: subsonic-app.py: '2026-01-18 15:40:54.342376 browse executed (show_tag_entries) collecting [5] entries in [0.185]'
upmpdcli-navidrome  | CMDTALK: subsonic-app.py: "2026-01-18 15:40:58.869237 browse: args: --{'cmdtalk:proc': 'browse', 'count': '100', 'offset': '0', 'flag': 'children', 'objid': '0$subsonic$/eyJuIjogImEiLCAidiI6ICJvIn0'}--"
upmpdcli-navidrome  | CMDTALK: subsonic-app.py: "2026-01-18 15:40:58.869470 Could not decode [eyJuIjogImEiLCAidiI6ICJvIn0] [<class 'binascii.Error'>] [Incorrect padding]"
upmpdcli-navidrome  | CMDTALK: subsonic-app.py: 'processmessage: processor raised: [Incorrect padding]'
upmpdcli-navidrome  | Traceback (most recent call last):
upmpdcli-navidrome  |   File "/usr/share/upmpdcli/cdplugins/pycommon/cmdtalk.py", line 170, in processmessage
upmpdcli-navidrome  |     outfields = processor.process(params)
upmpdcli-navidrome  |   File "/usr/share/upmpdcli/cdplugins/pycommon/cmdtalkplugin.py", line 67, in process
upmpdcli-navidrome  |     return self.dispatcher.run(params[prcnmkey], params)
upmpdcli-navidrome  |            ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
upmpdcli-navidrome  |   File "/usr/share/upmpdcli/cdplugins/pycommon/cmdtalkplugin.py", line 51, in run
upmpdcli-navidrome  |     return func(params)
upmpdcli-navidrome  |   File "/usr/share/upmpdcli/cdplugins/subsonic/subsonic-app.py", line 3076, in browse
upmpdcli-navidrome  |     decoded_path: str = codec.decode(last_path_item)
upmpdcli-navidrome  |                         ~~~~~~~~~~~~^^^^^^^^^^^^^^^^
upmpdcli-navidrome  |   File "/usr/share/upmpdcli/cdplugins/subsonic/codec.py", line 28, in decode
upmpdcli-navidrome  |     message_bytes: bytes = base64.b64decode(base64_bytes)
upmpdcli-navidrome  |                            ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
upmpdcli-navidrome  |   File "/usr/lib/python3.13/base64.py", line 88, in b64decode
upmpdcli-navidrome  |     return binascii.a2b_base64(s, strict_mode=validate)
upmpdcli-navidrome  |            ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
upmpdcli-navidrome  | binascii.Error: Incorrect padding
upmpdcli-navidrome  | :2:../src/mediaserver/cdplugins/plgwithslave.cxx:596::PlgWithSlave::browse: slave failure

As I see it, the problem is that Denon sends incorrectly padded base64 string and python fails to translate it. Is there a workaround? I can't change Denon's behaviour (even tho I think that Denon is definitely to blame).

To Reproduce
Steps to reproduce the behavior:

  1. Run server
  2. On Denon AVR go to any category
  3. See error

Expected behavior
Server serving data (even tho base64 is incorrectly padded).

Docker run command
docker compose up

Docker-compose.yaml file

 upmpdcli:
        image: giof71/upmpdcli:latest
        container_name: upmpdcli-navidrome
        network_mode: host
        depends_on:
            - navidrome
        environment:
            - RENDERER_MODE=NONE
            - FRIENDLY_NAME=navidrome-dlna
            - SUBSONIC_ENABLE=yes
            - SUBSONIC_AUTOSTART=yes
            - SUBSONIC_BASE_URL=${SUBSONIC_BASE_URL}
            - SUBSONIC_PORT=${SUBSONIC_PORT}
            - SUBSONIC_USER=${SUBSONIC_USER}
            - SUBSONIC_PASSWORD=${SUBSONIC_PASSWORD}
            - SUBSONIC_APPEND_YEAR_TO_ALBUM=Yes #optional
            - SUBSONIC_APPEND_CODECS_TO_ALBUM=Yes #optional
            - SUBSONIC_DOWNLOAD_PLUGIN=yes #optional, will download updated plugin from the specified branch
            - SUBSONIC_PLUGIN_BRANCH=latest #optional, it is the branch to be downloaded if SUBSONIC_DOWNLOAD_PLUGIN is set to yes
        restart: unless-stopped

Screenshots
If applicable, add screenshots to help explain your problem.

Operating system(please complete the following information):

Additional context
Thank you for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions