Exception with Manual Import on latest V3 update

Sonarr version (exact version): 3.0.0.348
Mono version (if Sonarr is not running on Windows): 5.14.0.177
OS: Synology DSM 6.2 (Sonarr installed via Docker)
Debug logs:
(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. Post in .txt not .doc, .rtf or some other formatted document)
Description of issue: Manually importing an episode of ‘Channel 4 (UK) Documentaries’ and getting this exception:

18-12-30 12:32:48.3|Warn|ImportApprovedEpisodes|Couldn't import episode /downloads/The Secret World of Emily Bronte (29 Dec 2018)[Hdtv mp4][Subs]SnG.mp4

[v3.0.0.348] System.ArgumentException: An empty file name is not valid.
  at System.IO.DirectoryInfo.CheckPath (System.String path) [0x00016] in <2943701620b54f86b436d3ffad010412>:0 
  at System.IO.DirectoryInfo..ctor (System.String path, System.Boolean simpleOriginalPath) [0x00006] in <2943701620b54f86b436d3ffad010412>:0 
  at System.IO.DirectoryInfo..ctor (System.String path) [0x00000] in <2943701620b54f86b436d3ffad010412>:0 
  at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo..ctor(string)
  at NzbDrone.Common.Extensions.PathExtensions.IsParentPath (System.String parentPath, System.String childPath) [0x00060] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Extensions\PathExtensions.cs:92 
  at NzbDrone.Common.Extensions.PathExtensions.GetRelativePath (System.String parentPath, System.String childPath) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Extensions\PathExtensions.cs:60 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.GetOriginalFilePath (NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x0006f] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:188 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List`1[T] decisions, System.Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.MediaFiles.EpisodeImport.ImportMode importMode) [0x00270] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:108

Tried renaming the MP4 file, but get the same:

18-12-30 12:39:21.0|Warn|QualityFinder|Unable to find exact quality for Unknown and 480. Using SDTV as fallback
18-12-30 12:39:21.1|Warn|ImportApprovedEpisodes|Couldn't import episode /downloads/Secret World of Emily Bronte.mp4

[v3.0.0.348] System.ArgumentException: An empty file name is not valid.
  at System.IO.DirectoryInfo.CheckPath (System.String path) [0x00016] in <2943701620b54f86b436d3ffad010412>:0 
  at System.IO.DirectoryInfo..ctor (System.String path, System.Boolean simpleOriginalPath) [0x00006] in <2943701620b54f86b436d3ffad010412>:0 
  at System.IO.DirectoryInfo..ctor (System.String path) [0x00000] in <2943701620b54f86b436d3ffad010412>:0 
  at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo..ctor(string)
  at NzbDrone.Common.Extensions.PathExtensions.IsParentPath (System.String parentPath, System.String childPath) [0x00060] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Extensions\PathExtensions.cs:92 
  at NzbDrone.Common.Extensions.PathExtensions.GetRelativePath (System.String parentPath, System.String childPath) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Extensions\PathExtensions.cs:60 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.GetOriginalFilePath (NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x0006f] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:188 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List`1[T] decisions, System.Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.MediaFiles.EpisodeImport.ImportMode importMode) [0x00270] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:108

Feels like something with the 29-Dec release, as manual import (and Sonarr v3) has been working perfectly and without incident for the last 2 months. May be something specific to this file/import, since at least one other show has correctly imported (automatic, not manual) in the last 12 hours. This is the first episode for this show, so I tried manually creating the show folder, but that didn’t solve it.

I guess it could be file permissions or something, but perhaps the exception could be caught and more diagnostics logged so it’s easier to understand what the problem is?

Update: Same issue appears to be happening for all Manual Imports, so looks like something is properly broken in the latest release. Also, I tried updating to the phantom-develop branch, to see if it was fixed (since the source looks different on line 108 in the Import function) but this didn’t fix it, so something else is going on.

18-12-31 10:00:57.2|Debug|DiskScanService|Scanning '/downloads/The Secret Life of Ice/@eaDir' for video files
18-12-31 10:00:57.2|Debug|DiskScanService|0 video files were found in /downloads/The Secret Life of Ice/@eaDir
18-12-31 10:00:57.2|Debug|Api|[GET] /api/v3/manualimport?folder=%2Fdownloads%2F&filterExistingFiles=true: 200.OK (399 ms)
18-12-31 10:01:13.7|Debug|Api|[GET] /api/v3/episode?seriesId=452&seasonNumber=1: 200.OK (186 ms)
18-12-31 10:01:30.4|Debug|Api|[GET] /api/v3/episode?seriesId=461&seasonNumber=2018: 200.OK (15 ms)
18-12-31 10:01:42.2|Debug|Api|[POST] /api/v3/command: 201.Created (148 ms)
18-12-31 10:01:42.3|Debug|Parser|Parsing string 'Les.Misérables.1of6.WebRip.720p.x264-noz.mp4'
18-12-31 10:01:42.3|Debug|Parser|Episode Parsed. Les Misérables - S01E01 
18-12-31 10:01:42.3|Debug|Parser|Language parsed: English
18-12-31 10:01:42.3|Debug|QualityParser|Trying to parse quality for Les.Misérables.1of6.WebRip.720p.x264-noz.mp4
18-12-31 10:01:42.3|Debug|Parser|Quality parsed: WEBRip-720p v1
18-12-31 10:01:42.3|Debug|Parser|Release Group parsed: noz
18-12-31 10:01:42.3|Debug|VideoFileInfoReader|Getting media info from /downloads/Les.Misérables.1of6.WebRip.720p.x264-noz.mp4
18-12-31 10:01:42.4|Debug|AggregateLanguage|Using language: English
18-12-31 10:01:42.4|Debug|Parser|Parsing string 'Les.Misérables.1of6.WebRip.720p.x264-noz'
18-12-31 10:01:42.4|Debug|Parser|Episode Parsed. Les Misérables - S01E01 
18-12-31 10:01:42.4|Debug|Parser|Language parsed: English
18-12-31 10:01:42.4|Debug|QualityParser|Trying to parse quality for Les.Misérables.1of6.WebRip.720p.x264-noz
18-12-31 10:01:42.4|Debug|Parser|Quality parsed: WEBRip-720p v1
18-12-31 10:01:42.4|Debug|Parser|Release Group parsed: noz
18-12-31 10:01:42.4|Debug|AggregateQuality|Using quality: WEBRip-720p v1
18-12-31 10:01:42.4|Warn|ImportApprovedEpisodes|Couldn't import episode /downloads/Les.Misérables.1of6.WebRip.720p.x264-noz.mp4

[v3.0.0.348] System.ArgumentException: An empty file name is not valid.
  at System.IO.DirectoryInfo.CheckPath (System.String path) [0x00016] in <2943701620b54f86b436d3ffad010412>:0 
  at System.IO.DirectoryInfo..ctor (System.String path, System.Boolean simpleOriginalPath) [0x00006] in <2943701620b54f86b436d3ffad010412>:0 
  at System.IO.DirectoryInfo..ctor (System.String path) [0x00000] in <2943701620b54f86b436d3ffad010412>:0 
  at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo..ctor(string)
  at NzbDrone.Common.Extensions.PathExtensions.IsParentPath (System.String parentPath, System.String childPath) [0x00060] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Extensions\PathExtensions.cs:92 
  at NzbDrone.Common.Extensions.PathExtensions.GetRelativePath (System.String parentPath, System.String childPath) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Extensions\PathExtensions.cs:60 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.GetOriginalFilePath (NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x0006f] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:188 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List`1[T] decisions, System.Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.MediaFiles.EpisodeImport.ImportMode importMode) [0x00270] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:108 

18-12-31 10:01:42.4|Debug|Parser|Parsing string 'Secret World of Emily Bronte.mp4'
18-12-31 10:01:42.4|Debug|Parser|Unable to parse Secret World of Emily Bronte.mp4
18-12-31 10:01:42.4|Debug|Parser|Attempting to parse episode info using directory and file names. downloads
18-12-31 10:01:42.4|Debug|Parser|Parsing string 'downloads Secret World of Emily Bronte.mp4'
18-12-31 10:01:42.4|Debug|Parser|Unable to parse downloads Secret World of Emily Bronte.mp4
18-12-31 10:01:42.4|Debug|Parser|Attempting to parse episode info using directory name. downloads
18-12-31 10:01:42.4|Debug|Parser|Parsing string 'downloads.mp4'
18-12-31 10:01:42.4|Debug|Parser|Unable to parse downloads.mp4
18-12-31 10:01:42.4|Debug|VideoFileInfoReader|Getting media info from /downloads/Secret World of Emily Bronte.mp4
18-12-31 10:01:42.7|Debug|AggregateLanguage|Using language: English
18-12-31 10:01:42.7|Warn|QualityFinder|Unable to find exact quality for Unknown and 480. Using SDTV as fallback
18-12-31 10:01:42.7|Debug|AggregateQuality|Using quality: SDTV v1
18-12-31 10:01:42.7|Warn|ImportApprovedEpisodes|Couldn't import episode /downloads/Secret World of Emily Bronte.mp4

[v3.0.0.348] System.ArgumentException: An empty file name is not valid.
  at System.IO.DirectoryInfo.CheckPath (System.String path) [0x00016] in <2943701620b54f86b436d3ffad010412>:0 
  at System.IO.DirectoryInfo..ctor (System.String path, System.Boolean simpleOriginalPath) [0x00006] in <2943701620b54f86b436d3ffad010412>:0 
  at System.IO.DirectoryInfo..ctor (System.String path) [0x00000] in <2943701620b54f86b436d3ffad010412>:0 
  at (wrapper remoting-invoke-with-check) System.IO.DirectoryInfo..ctor(string)
  at NzbDrone.Common.Extensions.PathExtensions.IsParentPath (System.String parentPath, System.String childPath) [0x00060] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Extensions\PathExtensions.cs:92 
  at NzbDrone.Common.Extensions.PathExtensions.GetRelativePath (System.String parentPath, System.String childPath) [0x00000] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Common\Extensions\PathExtensions.cs:60 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.GetOriginalFilePath (NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.Parser.Model.LocalEpisode localEpisode) [0x0006f] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:188 
  at NzbDrone.Core.MediaFiles.EpisodeImport.ImportApprovedEpisodes.Import (System.Collections.Generic.List`1[T] decisions, System.Boolean newDownload, NzbDrone.Core.Download.DownloadClientItem downloadClientItem, NzbDrone.Core.MediaFiles.EpisodeImport.ImportMode importMode) [0x00270] in M:\BuildAgent\work\63739567f01dbcc2\src\NzbDrone.Core\MediaFiles\EpisodeImport\ImportApprovedEpisodes.cs:108 

18-12-31 10:01:53.5|Debug|Api|[GET] /api/v3/health: 200.OK (2 ms)
18-12-31 10:01:53.5|Debug|Api|[GET] /api/v3/system/status: 200.OK (4 ms)
18-12-31 10:01:54.1|Debug|Api|[GET] /api/v3/diskspace: 200.OK (679 ms)
18-12-31 10:01:55.2|Debug|Api|[GET] /api/v3/command: 200.OK (3 ms)
18-12-31 10:01:55.2|Debug|Api|[GET] /api/v3/queue/status: 200.OK (6 ms)
18-12-31 10:01:55.2|Debug|Api|[GET] /api/v3/health: 200.OK (2 ms)
18-12-31 10:01:55.5|Debug|Api|[GET] /api/v3/log/file: 200.OK (6 ms)

Are you importing from Activity: Queue or Wanted: Missing then Manual Import?

Wanted: Missing => Manual Import.

Thanks, I think I see the issue, should be able to get it fixed up soon.

Nice. I have a reproducible case (it doesn’t seem to happen for all files, but does for some - I haven’t figured out the pattern). Let me know if you’ve got a branch to test with and I’ll update to that branch and see if it resolves it.

Thanks!

I think it’s due to the path, if the file is directly in /downloads it’ll fail, but if it’s in /downloads/subfolder it should work, pretty sure the bug has been there for a while, just nothing ran into it.

That would make sense. Just tried moving one of the failing files into a sub-folder in the downloads folder, and it seems to work now. :slight_smile:

Interesting that I’ve not seen this before though, as I tend to do quite a few manual imports (using GetIPlayer Automator) and most of them I just dump the file into the root of ‘downloads’! That said, perhaps it’s a Docker issue - related to the fact that I have a remote path mapping:

/volume1/video/Downloads/ => /downloads/

I only switched to running Sonarr within docker a month or so ago, which might explain why it’s a ‘new’ issue.

The build that exposed this issue is only a few days old, looks like you opened this thread within a day of that release when you first started seeing it.

Yeah, my Sonarr automatically updated to 3.0.0.348 on the 29-Dec, and I noticed it on the same day (lots of good Christmas TV to manually import ;)). I gave it a day or so to see if it was just me being dumb, and then tried phantom-develop, to see if it was already fixed.

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