Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "path gave a file that doesn't have a matching file location" #83

Open
1 task done
tgxiii opened this issue Dec 20, 2024 · 9 comments
Open
1 task done

Error "path gave a file that doesn't have a matching file location" #83

tgxiii opened this issue Dec 20, 2024 · 9 comments

Comments

@tgxiii
Copy link

tgxiii commented Dec 20, 2024

Jellyfin version.

10.10.13

Shokofin version.

5.0.0.0

Shoko Server version, release channel, and commit hash.

Version 5.0.0.92 (Dev, 5a1bc7f)

File structure of your Media Library Folder in Jellyfin/Import Folder in Shoko Server.

/data/anime/{Collection|Favorites}/{Series Name}/{various file names}.{extension}

Screenshot of the "library settings" section of the plugin settings.

image
image

image
image
image
image
image
image
image

Library Type(s).

Shows

Do the issue persists after creating a library with Shoko set as the only metadata provider? (Now is your time to check if you haven't already.)

  • Yes, I hereby confirm that the issue persists after creating a library with Shoko set as the only metadata provider.

Issue

Getting this error for what seems like every file:

[2024-12-19 21:52:35.525 -08:00] [ERR] [65] Shokofin.Providers.EpisodeProvider: Threw unexpectedly while refreshing "/data/anime/Favorites/Bleach/[DB] Bleach - 175- The Revenging Assassin, Ichigo i… [90E0D98E].avi": False
System.Exception: I have no idea how this happened, but the path gave a file that doesn't have a matching file location. See you in #support. (File=8038)
   at Shokofin.API.ShokoAPIManager.GetFileInfoByPath(String path)
   at Shokofin.Providers.EpisodeProvider.GetMetadata(EpisodeInfo info, CancellationToken cancellationToken)
[2024-12-19 21:52:35.526 -08:00] [ERR] [65] Shokofin.Providers.ImageProvider: Threw unexpectedly for Episode "Bleach - 175- The Revenging Assassin, Ichigo i…"; "I have no idea how this happened, but the path gave a file that doesn't have a matching file location. See you in #support. (File=8038)"
System.Exception: I have no idea how this happened, but the path gave a file that doesn't have a matching file location. See you in #support. (File=8038)
   at Shokofin.API.ShokoAPIManager.GetFileInfoByPath(String path)
   at Shokofin.API.ShokoAPIManager.TryGetEpisodeIdsForPath(String path, List`1& episodeIds)
   at Shokofin.API.ShokoAPIManager.TryGetEpisodeIdForPath(String path, String& episodeId)
   at Shokofin.IdLookup.TryGetEpisodeIdFor(String path, String& episodeId)
   at Shokofin.IdLookup.TryGetEpisodeIdFor(BaseItem item, String& episodeId)
   at Shokofin.Providers.ImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)

Stack Trace

No response

@revam
Copy link
Member

revam commented Dec 21, 2024

Pretty sure this is GitHub and not #support on our Discord, but here goes.

Can you send the API response for the file with id 8038? You can use curl or swagger. We have a guide for how to use swagger to auth and send requests (to reset the web ui) in our Discord, but I'm not going to send that here since I'm writing this on mobile rn.

If my suspicious is correct then it's because of path mappings being different for the '…' symbol (not three '.'s) between the Jellyfin host and Shoko Server host, making it so it can't be recognised, but confirming what the Shoko APIv3 returns will clarify if it is or not.

@tgxiii
Copy link
Author

tgxiii commented Dec 22, 2024

I tried joining Discord but got this:

image

Here's the response:

{
  "ID": 8038,
  "Size": 178258198,
  "IsVariation": false,
  "Hashes": {
    "ED2K": "CA74CF7CEE7158AC31106A0FCE7D1C27",
    "SHA1": "7BBF15E3C999B96BF97C257D574B3B2091F8618D",
    "CRC32": "90E0D98E",
    "MD5": "E3A0FECE0AC34D8A69C20C1CE754A96E"
  },
  "Locations": [
    {
      "ID": 8038,
      "FileID": 8038,
      "ImportFolderID": 1,
      "RelativePath": "Bleach/[DB] Bleach - 175- The Revenging Assassin, Ichigo i… [90E0D98E].avi",
      "IsAccessible": true
    }
  ],
  "AVDump": {
    "Status": null,
    "LastDumpedAt": null,
    "LastVersion": null
  },
  "Resolution": "480p",
  "Duration": "00:24:01.9910000",
  "ResumePosition": null,
  "Viewed": null,
  "Watched": null,
  "Imported": "2024-12-11T07:55:35.2865206Z",
  "Created": "2024-12-11T06:20:46.2933772Z",
  "Updated": "2024-12-11T06:20:48.4894209Z"
}

This is the file in the Shoko Server container:

root@51239bc9b237:/usr/src/app/build# ls -l /data/anime/Favorites/Bleach | grep 175-
-rwxrwxrwx 1 shoko users 178258198 Jul  4  2008 [DB] Bleach - 175- The Revenging Assassin, Ichigo i… [90E0D98E].avi

This is the file in Jellyfin in Ubuntu:

root@jellyfin:~# ls -l /data/anime/Favorites/Bleach | grep 175-
-rwxr-xr-x 1 root root 178258198 Jul  4  2008 [DB] Bleach - 175- The Revenging Assassin, Ichigo i… [90E0D98E].avi

Here's one example though without the ...:

[2024-12-21 21:40:56.457 -08:00] [INF] [56] Shokofin.Providers.ImageProvider: Getting 1 images for season 3 in "Full Metal Alchemist" (Series="1",Language="en")
[2024-12-21 21:40:57.655 -08:00] [INF] [68] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Starting "/usr/lib/jellyfin-ffmpeg/ffprobe" with args "-analyzeduration 200M -probesize 1G -i file:\"/data/anime/Favorites/Hagane no Renkinjutsushi (2009)/[Coalgirls] Fullmetal Alchemist- Brotherhood - 16- Footsteps of a Comrade-in-Arms [679B4F44].mkv\" -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format"
[2024-12-21 21:40:57.987 -08:00] [ERR] [68] Shokofin.Providers.EpisodeProvider: Threw unexpectedly while refreshing "/data/anime/Favorites/Hagane no Renkinjutsushi (2009)/[Coalgirls] Fullmetal Alchemist- Brotherhood - 16- Footsteps of a Comrade-in-Arms [679B4F44].mkv": False
System.Exception: I have no idea how this happened, but the path gave a file that doesn't have a matching file location. See you in #support. (File=1)
   at Shokofin.API.ShokoAPIManager.GetFileInfoByPath(String path)
   at Shokofin.Providers.EpisodeProvider.GetMetadata(EpisodeInfo info, CancellationToken cancellationToken)
[2024-12-21 21:40:57.987 -08:00] [ERR] [68] Shokofin.Providers.ImageProvider: Threw unexpectedly for Episode "Fullmetal Alchemist- Brotherhood - 16- Footsteps of a Comrade-in-Arms"; "I have no idea how this happened, but the path gave a file that doesn't have a matching file location. See you in #support. (File=1)"
System.Exception: I have no idea how this happened, but the path gave a file that doesn't have a matching file location. See you in #support. (File=1)
   at Shokofin.API.ShokoAPIManager.GetFileInfoByPath(String path)
   at Shokofin.API.ShokoAPIManager.TryGetEpisodeIdsForPath(String path, List`1& episodeIds)
   at Shokofin.API.ShokoAPIManager.TryGetEpisodeIdForPath(String path, String& episodeId)
   at Shokofin.IdLookup.TryGetEpisodeIdFor(String path, String& episodeId)
   at Shokofin.IdLookup.TryGetEpisodeIdFor(BaseItem item, String& episodeId)
   at Shokofin.Providers.ImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)
[2024-12-21 21:40:58.328 -08:00] [ERR] [68] Shokofin.API.ShokoAPIManager: Encountered an error while trying to lookup the file id for "/data/anime/Favorites/Hagane no Renkinjutsushi (2009)/[Coalgirls] Fullmetal Alchemist- Brotherhood - 16- Footsteps of a Comrade-in-Arms [679B4F44].mkv"
System.Exception: I have no idea how this happened, but the path gave a file that doesn't have a matching file location. See you in #support. (File=1)
   at Shokofin.API.ShokoAPIManager.GetFileInfoByPath(String path)
   at Shokofin.API.ShokoAPIManager.TryGetFileIdForPath(String path, String& fileId)
{
  "ID": 1,
  "Size": 610439784,
  "IsVariation": false,
  "Hashes": {
    "ED2K": "A2E19EE56AA05C0099F7271B2810C4A7",
    "SHA1": "66061C9C12E53AF483CA65D0D64D2CC0D8FC1521",
    "CRC32": "679B4F44",
    "MD5": "3F9D565AA7B43B90CB27CE0577A648A4"
  },
  "Locations": [
    {
      "ID": 1,
      "FileID": 1,
      "ImportFolderID": 1,
      "RelativePath": "Hagane no Renkinjutsushi (2009)/[Coalgirls] Fullmetal Alchemist- Brotherhood - 16- Footsteps of a Comrade-in-Arms [679B4F44].mkv",
      "IsAccessible": true
    }
  ],
  "AVDump": {
    "Status": null,
    "LastDumpedAt": null,
    "LastVersion": null
  },
  "Resolution": "720p",
  "Duration": "00:24:27.2150000",
  "ResumePosition": null,
  "Viewed": null,
  "Watched": null,
  "Imported": "2024-12-21T05:44:31.306381Z",
  "Created": "2024-12-21T05:44:12.2016511Z",
  "Updated": "2024-12-21T05:44:22.6428143Z"
}

@revam
Copy link
Member

revam commented Dec 22, 2024

can you also include the cross-references (XRefs) for one of the files?

@revam
Copy link
Member

revam commented Dec 22, 2024

also, which invite link did you use and where did you find it?

try https://discord.gg/shokoanime if you want to join and haven't that link already.

@tgxiii
Copy link
Author

tgxiii commented Dec 22, 2024

I used the one on shokoanime.com

I just tried that one that you gave and got this:

image

@tgxiii
Copy link
Author

tgxiii commented Dec 22, 2024

can you also include the cross-references (XRefs) for one of the files?

Which cross-reference do you need? I could only find Tmdb-related endpoints in Swagger.

@revam
Copy link
Member

revam commented Dec 23, 2024

I used the one on shokoanime.com

I just tried that one that you gave and got this:

Works fine for me.

can you also include the cross-references (XRefs) for one of the files?

Which cross-reference do you need? I could only find Tmdb-related endpoints in Swagger.

Can you include the cross-references (XRefs) as a query option when fetching one of the files?

E.g.
http://<shoko host>:8111/api/v3/File/<file id>?include=XRefs

@tgxiii
Copy link
Author

tgxiii commented Dec 23, 2024

Works fine for me.

Probably my account or IP. I tried with a different email and got the same thing for both invites.


Here's the File response with Xrefs:

{
  "ID": 1,
  "SeriesIDs": [
    {
      "SeriesID": {
        "ID": 1,
        "AniDB": 6107,
        "TMDB": {
          "Movie": [],
          "Show": []
        }
      },
      "EpisodeIDs": [
        {
          "ID": 23,
          "AniDB": 104977,
          "TMDB": {
            "Episode": [],
            "Movie": [],
            "Show": []
          },
          "ReleaseGroup": 7407,
          "ED2K": "A2E19EE56AA05C0099F7271B2810C4A7",
          "FileSize": 610439784,
          "Percentage": {
            "Start": 0,
            "End": 100,
            "Size": 100,
            "Group": 1
          },
          "Source": "AniDB"
        }
      ]
    }
  ],
  "Size": 610439784,
  "IsVariation": false,
  "Hashes": {
    "ED2K": "A2E19EE56AA05C0099F7271B2810C4A7",
    "SHA1": "66061C9C12E53AF483CA65D0D64D2CC0D8FC1521",
    "CRC32": "679B4F44",
    "MD5": "3F9D565AA7B43B90CB27CE0577A648A4"
  },
  "Locations": [
    {
      "ID": 1,
      "FileID": 1,
      "ImportFolderID": 1,
      "RelativePath": "Hagane no Renkinjutsushi (2009)/[Coalgirls] Fullmetal Alchemist- Brotherhood - 16- Footsteps of a Comrade-in-Arms [679B4F44].mkv",
      "IsAccessible": true
    }
  ],
  "AVDump": {
    "Status": null,
    "LastDumpedAt": null,
    "LastVersion": null
  },
  "Resolution": "720p",
  "Duration": "00:24:27.2150000",
  "ResumePosition": null,
  "Viewed": null,
  "Watched": null,
  "Imported": "2024-12-21T05:44:31.306381Z",
  "Created": "2024-12-21T05:44:12.2016511Z",
  "Updated": "2024-12-21T05:44:22.6428143Z"
}

@revam
Copy link
Member

revam commented Jan 21, 2025

It seems like you've mounted /data/anime/ in Jellyfin for the library but mounted /data/anime/Favorites/ in Shoko, so the relative path is one layer too deep when comparing the paths. Try either switching the mount to /data/anime/Favorites/ in Jellyfin or switching the mount to /data/anime/ in Shoko.

Judging by the code block in #83 (comment)

[2024-12-21 21:40:56.457 -08:00] [INF] [56] Shokofin.Providers.ImageProvider: Getting 1 images for season 3 in "Full Metal Alchemist" (Series="1",Language="en")
[2024-12-21 21:40:57.655 -08:00] [INF] [68] MediaBrowser.MediaEncoding.Encoder.MediaEncoder: Starting "/usr/lib/jellyfin-ffmpeg/ffprobe" with args "-analyzeduration 200M -probesize 1G -i file:\"/data/anime/Favorites/Hagane no Renkinjutsushi (2009)/[Coalgirls] Fullmetal Alchemist- Brotherhood - 16- Footsteps of a Comrade-in-Arms [679B4F44].mkv\" -threads 0 -v warning -print_format json -show_streams -show_chapters -show_format"
[2024-12-21 21:40:57.987 -08:00] [ERR] [68] Shokofin.Providers.EpisodeProvider: Threw unexpectedly while refreshing "/data/anime/Favorites/Hagane no Renkinjutsushi (2009)/[Coalgirls] Fullmetal Alchemist- Brotherhood - 16- Footsteps of a Comrade-in-Arms [679B4F44].mkv": False
System.Exception: I have no idea how this happened, but the path gave a file that doesn't have a matching file location. See you in #support. (File=1)
   at Shokofin.API.ShokoAPIManager.GetFileInfoByPath(String path)
   at Shokofin.Providers.EpisodeProvider.GetMetadata(EpisodeInfo info, CancellationToken cancellationToken)
[2024-12-21 21:40:57.987 -08:00] [ERR] [68] Shokofin.Providers.ImageProvider: Threw unexpectedly for Episode "Fullmetal Alchemist- Brotherhood - 16- Footsteps of a Comrade-in-Arms"; "I have no idea how this happened, but the path gave a file that doesn't have a matching file location. See you in #support. (File=1)"
System.Exception: I have no idea how this happened, but the path gave a file that doesn't have a matching file location. See you in #support. (File=1)
   at Shokofin.API.ShokoAPIManager.GetFileInfoByPath(String path)
   at Shokofin.API.ShokoAPIManager.TryGetEpisodeIdsForPath(String path, List`1& episodeIds)
   at Shokofin.API.ShokoAPIManager.TryGetEpisodeIdForPath(String path, String& episodeId)
   at Shokofin.IdLookup.TryGetEpisodeIdFor(String path, String& episodeId)
   at Shokofin.IdLookup.TryGetEpisodeIdFor(BaseItem item, String& episodeId)
   at Shokofin.Providers.ImageProvider.GetImages(BaseItem item, CancellationToken cancellationToken)
[2024-12-21 21:40:58.328 -08:00] [ERR] [68] Shokofin.API.ShokoAPIManager: Encountered an error while trying to lookup the file id for "/data/anime/Favorites/Hagane no Renkinjutsushi (2009)/[Coalgirls] Fullmetal Alchemist- Brotherhood - 16- Footsteps of a Comrade-in-Arms [679B4F44].mkv"
System.Exception: I have no idea how this happened, but the path gave a file that doesn't have a matching file location. See you in #support. (File=1)
   at Shokofin.API.ShokoAPIManager.GetFileInfoByPath(String path)
   at Shokofin.API.ShokoAPIManager.TryGetFileIdForPath(String path, String& fileId)

Combined with the screenshot of your media folders assigned to the library in your initial post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants