Import failure due to path mismatch; Sonarr mishandles Unix filepath

Sonarr version (exact version): 2.0.0.5344
Mono version (if Sonarr is not running on Windows): 5.10.1.57
OS: FreeNAS 11.3-U1
Debug logs:
Import failed, path does not exist or is not accessible by Sonarr: /media/downloads/Chopped.S45E06.Just.Desserts.Celebrities.720p.WEBRip.x264-LiGATE[rarbg]

Description of issue:
In the Unix file path, to compensate for the ‘[’ character, there is an escape character ‘backslash’ which is added so what Sonarr is looking for doesn’t account for the escape character ‘’. As a result, Sonarr perceives a failed path and perceives no file. But the file does exist on a slightly different path reported by the OS.

What the host OS in the Sonarr jail sees:
ls /media/downloads/Chopped.S45E06.Just.Desserts.Celebrities.720p.WEBRip.x264-LiGATE\[rarbg]/ Chopped.S45E06.Just.Desserts.Celebrities.720p.WEBRip.x264-LiGATE.mkv


OK, I’m having to hand edit the above because the forum page keeps removing the ‘backslash’. In between LiGATE and [rarbg] is a backslash character in the unix path name as shown in the included graphic.
Close

You can use backticks ` to escape when posting.

Which download client is this coming from? I don’t recall this coming up before as most paths reach Sonarr unescaped (which it’s expecting).

Thanks for the note. Client is qBittorrent v4.1.9.1

I was going to look at the changes for 2.0.0.5344 - Mar 13 2020 (pushed out in the last couple of weeks), but the github release page doesn’t have the last 2 bugfix releases:

root@sonarr:/media/downloads # getfacl Chopped.S45E06.Just.Desserts.Celebrities.720p.WEBRip.x264-LiGATE`\[rarbg]/
# file: Chopped.S45E06.Just.Desserts.Celebrities.720p.WEBRip.x264-LiGATE[rarbg]/
# owner: nobody
# group: nogroup
            owner@:rwxp--aARWcCos:-------:allow
            group@:rwxp--a-R-c--s:-------:allow
         everyone@:rwxp--a-R-c--s:-------:allow
root@sonarr:/media/downloads # ls -ld Chopped.S45E06.Just.Desserts.Celebrities.720p.WEBRip.x264-LiGATE\[rarbg]/
drwxrwxrwx  2 nobody  nogroup  6 Apr  2 17:38 Chopped.S45E06.Just.Desserts.Celebrities.720p.WEBRip.x264-LiGATE[rarbg]/

Fixed after further investigation. :grinning:

So, this turned out to be a path issue. In a previous jail-based Sonarr, both Sonarr and Qbittorrent shared a physical host. I have since moved Sonarr into a docker container.

So, in Sonarr, Settings::Download Client::Remote Path Mappings, the remote host with Qbittorrent, the Qbittorrent remote path (e.g. /media/downloads/) and the local Sonarr path (e.g. /downloads/) in the docker container need to be mapped out. With this additional information, Sonarr is able to resolve the paths between the two hosts as they were slightly different.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.