Episodes with numbers in the name disappear, redownload, and fail to import

Sonarr version (exact version): 2.0.0.4753
Mono version (if Sonarr is not running on Windows): 4.2.3
OS: Ubuntu 17.04 + Docker 17.06.0-ce, “ubuntu:yakkety”
((Debug logs)): Will provide if necessary, always fails with any episode with a number at end of title (not just start of name as I see existing reports)
(Make sure debug logging is enabled in settings and post the full log to hastebin/pastebin/dropbox/google drive or something similar, do not post them directly here)
Description of issue:Episodes imported long time ago. On rescan, episode disappears from series list. Episode is re-downloaded, import fails saying file already exists on disk. Refresh doesn’t find episode.

Couldn’t import episode /TV_To_Move/Manual/Castle.2009.S06E16.1080p.WEB-DL.DD5.1.H264-ECI.NL.mkv: Destination already exists [/sealsnas2/USB9/sync_root/tv/Castle (2009)/Season 06/Castle (2009) - 06x16 - Room 147 [WEBDL-1080p].mkv]

System.IO.IOException: Destination already exists [/sealsnas2/USB9/sync_root/tv/Castle (2009)/Season 06/Castle (2009) - 06x16 - Room 147 [WEBDL-1080p].mkv]
at NzbDrone.Common.Disk.DiskTransferService.ClearTargetPath (System.String targetPath, Boolean overwrite) <0x41978b70 + 0x00093> in :0
at NzbDrone.Common.Disk.DiskTransferService.TransferFile (System.String sourcePath, System.String targetPath, TransferMode mode, Boolean overwrite, DiskTransferVerificationMode verificationMode) <0x41977b80 + 0x00613> in :0
at NzbDrone.Common.Disk.DiskTransferService.TransferFile (System.String sourcePath, System.String targetPath, TransferMode mode, Boolean overwrite, Boolean verified) <0x41977b00 + 0x0005b> in :0
at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.TransferFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Tv.Series series, System.Collections.Generic.List1 episodes, System.String destinationFilePath, TransferMode mode) <0x419773b0 + 0x00439> in <filename unknown>:0 at NzbDrone.Core.MediaFiles.EpisodeFileMovingService.MoveEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) <0x4196ec10 + 0x0011f> in <filename unknown>:0 at NzbDrone.Core.MediaFiles.UpgradeMediaFileService.UpgradeEpisodeFile (NzbDrone.Core.MediaFiles.EpisodeFile episodeFile, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode, Boolean copyOnly) <0x4196dcd0 + 0x0061d> in <filename unknown>:0 at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List1 decisions, Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, ImportMode importMode) <0x41938cd0 + 0x01442> in :0
Close

Couldn’t import episode /TV_To_Move/Manual/Community.S04E01.1080p.WEB-DL.AAC2.0.AVC-TrollHD.mp4: Destination already exists [/sealsnas2/USB9/sync_root/tv/Community/Season 04/Community - 04x01 - History 101 [WEBDL-1080p].mp4]

Couldn’t import episode /TV_To_Move/Manual/The.Blacklist.Redemption.S01E05.1080p.AMZN.WEBRip.DD5.1.x264-ViSUM.mkv: Destination already exists [/sealsnas5/USB1/TV/The Blacklist- Redemption/Season 01/The Blacklist- Redemption - 01x05 - Borealis 301 [WEBDL-1080p].mkv]

thanks

Yes we need ((debug logs)).

The file isn’t hidden or unavailable to the user you’re checking with for some reason?
Why did it disappear?
Is it a locally mounted disk, network share, cloud storage or something else?

I’m currently doing a find all missing episodes, I will post debug logs after it completes :slight_smile:

The docker container is mounting the volumes which are host mounted volumes (nfs).

If I manually rename the file to remove number in the episode name, sonarr can see the file on rescan.

thanks

I turned on DEBUG logging. I told the show with the “missing” episode to rescan. I manually imported. Link below:

debug log

thanks!

I don’t have access.

Is that when you typically see this error? The snippet looks to be during an import from the unsorted folder (though being a snippet it’s an incomplete picture).

I changed the permissions…please try again debug.log

I just did a rescan to show that the scan does not find the file even though it exists and was put there previously by sonarr.
The manual import fails to import because the file exists at the destination.

thanks

Which file in this case?

I see several files being processed when you scanned the Castle series folder, I also see Sonarr trying to import another file for that series, but it failed saying the file already existed.

What are the permissions for the file that Sonarr didn’t pick up? (ls -la from the specific season folder)

Sorry, I tried to import a number of files I knew would fail due to the episode name.
The Castle one is named Castle.2009.S06E16.1080p.WEB-DL.DD5.1.H264-ECI.NL.mkv

From inside the docker container:

root@sealsubuntu:/# touch /sealsnas2/USB9/sync_root/tv/Castle\ \(2009\)/Season\ 06/temp_file
root@sealsubuntu:/# ls -la /sealsnas2/USB9/sync_root/tv/Castle\ \(2009\)/Season\ 06
total 40221124
drwxrwxrwx  2 1026 users       4096 Jul  6 23:02 .
drwxrwxrwx 10 1026 users       4096 Jun 18 02:54 ..
-rwxrwxrwx  1 1026 users 1743219639 Mar  4  2014 Castle (2009) - 06x01 - Valkyrie (1) [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1420853386 Sep 24  2013 Castle (2009) - 06x01 - Valkyrie [WEBDL-720p].mkv
-rwxrwxrwx  1 1026 users 1721276215 Mar  4  2014 Castle (2009) - 06x02 - Dreamworld (2) [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1802527078 Mar  4  2014 Castle (2009) - 06x03 - Need to Know [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1790597312 Mar  4  2014 Castle (2009) - 06x04 - Number One Fan [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1811938231 Mar  4  2014 Castle (2009) - 06x05 - Time Will Tell [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1722384309 Mar  4  2014 Castle (2009) - 06x06 - Get a Clue [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1711698569 Mar  4  2014 Castle (2009) - 06x07 - Like Father, Like Daughter [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1665118443 Mar  4  2014 Castle (2009) - 06x08 - A Murder Is Forever [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1680438445 Nov 19  2013 Castle (2009) - 06x09 - Disciple [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1764926638 Nov 26  2013 Castle (2009) - 06x10 - The Good, The Bad & The Baby [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1709932691 Jan  7  2014 Castle (2009) - 06x11 - Under Fire [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1726290899 Jan 14  2014 Castle (2009) - 06x12 - Deep Cover [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1713846149 Jan 21  2014 Castle (2009) - 06x13 - Limelight [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1735626788 Aug 18  2014 Castle (2009) - 06x14 - Dressed to Kill [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1754834689 Feb 18  2014 Castle (2009) - 06x15 - Smells Like Teen Spirit [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1712016359 Feb 25  2014 Castle (2009) - 06x16 - Room 147 [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1709539100 Mar  4  2014 Castle (2009) - 06x17 - In the Belly of the Beast [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1696065524 Mar 18  2014 Castle (2009) - 06x18 - The Way of the Ninja [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1705651205 Mar 25  2014 Castle (2009) - 06x19 - The Greater Good [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1734207498 Apr 22  2014 Castle (2009) - 06x20 - That '70s Show [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1687267804 Apr 29  2014 Castle (2009) - 06x21 - Law & Boarder [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1712419121 May  6  2014 Castle (2009) - 06x22 - Veritas [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1753594063 May 13  2014 Castle (2009) - 06x23 - For Better or Worse [WEBDL-1080p].mkv
-rw-r--r--  1 1024 users          0 Jul  6 23:02 temp_file
root@sealsubuntu:/# rm /sealsnas2/USB9/sync_root/tv/Castle\ \(2009\)/Season\ 06/temp_file
root@sealsubuntu:/# ls -la /sealsnas2/USB9/sync_root/tv/Castle\ \(2009\)/Season\ 06
total 40221124
drwxrwxrwx  2 1026 users       4096 Jul  6 23:03 .
drwxrwxrwx 10 1026 users       4096 Jun 18 02:54 ..
-rwxrwxrwx  1 1026 users 1743219639 Mar  4  2014 Castle (2009) - 06x01 - Valkyrie (1) [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1420853386 Sep 24  2013 Castle (2009) - 06x01 - Valkyrie [WEBDL-720p].mkv
-rwxrwxrwx  1 1026 users 1721276215 Mar  4  2014 Castle (2009) - 06x02 - Dreamworld (2) [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1802527078 Mar  4  2014 Castle (2009) - 06x03 - Need to Know [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1790597312 Mar  4  2014 Castle (2009) - 06x04 - Number One Fan [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1811938231 Mar  4  2014 Castle (2009) - 06x05 - Time Will Tell [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1722384309 Mar  4  2014 Castle (2009) - 06x06 - Get a Clue [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1711698569 Mar  4  2014 Castle (2009) - 06x07 - Like Father, Like Daughter [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1665118443 Mar  4  2014 Castle (2009) - 06x08 - A Murder Is Forever [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1680438445 Nov 19  2013 Castle (2009) - 06x09 - Disciple [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1764926638 Nov 26  2013 Castle (2009) - 06x10 - The Good, The Bad & The Baby [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1709932691 Jan  7  2014 Castle (2009) - 06x11 - Under Fire [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1726290899 Jan 14  2014 Castle (2009) - 06x12 - Deep Cover [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1713846149 Jan 21  2014 Castle (2009) - 06x13 - Limelight [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1735626788 Aug 18  2014 Castle (2009) - 06x14 - Dressed to Kill [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1754834689 Feb 18  2014 Castle (2009) - 06x15 - Smells Like Teen Spirit [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1712016359 Feb 25  2014 Castle (2009) - 06x16 - Room 147 [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1709539100 Mar  4  2014 Castle (2009) - 06x17 - In the Belly of the Beast [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1696065524 Mar 18  2014 Castle (2009) - 06x18 - The Way of the Ninja [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1705651205 Mar 25  2014 Castle (2009) - 06x19 - The Greater Good [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1734207498 Apr 22  2014 Castle (2009) - 06x20 - That '70s Show [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1687267804 Apr 29  2014 Castle (2009) - 06x21 - Law & Boarder [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1712419121 May  6  2014 Castle (2009) - 06x22 - Veritas [WEBDL-1080p].mkv
-rwxrwxrwx  1 1026 users 1753594063 May 13  2014 Castle (2009) - 06x23 - For Better or Worse [WEBDL-1080p].mkv

You can see that I have write access to create the “temp_file” and remove it, also that 06x16 exists in the file system.

thanks!

Ahh, I was trying to figure out why you were seeing the issue trying to copy the file because the file already existed, but that may be a symptom of the underlying issue.

The issue is due to the square brackets being treated as an anime hash or release group + the number in the title so it gets parsed as an absolute episode, absolute episode 147 to be exact.

You can use manual import (on wanted missing) and point it at the season folder and import it properly, or drop the square brackets completely and Sonarr will handle it without issue.

We have plans to correct the issue, but it’s a considerable task to cover the edge cases.

thanks! Removing the [] fixes the issue.

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