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

[Issue]: 8 Empty Collections "Collections".."Collections8" #11258

Closed
1 task done
Explosion-Scratch opened this issue Mar 30, 2024 · 12 comments · Fixed by #11444
Closed
1 task done

[Issue]: 8 Empty Collections "Collections".."Collections8" #11258

Explosion-Scratch opened this issue Mar 30, 2024 · 12 comments · Fixed by #11444
Labels
bug Something isn't working release critical A bug severe enough or impactful enough to block stable release

Comments

@Explosion-Scratch
Copy link

Explosion-Scratch commented Mar 30, 2024

Please describe your bug

I just set up Jellyfin and it keeps creating 8 collections:

image

I can delete these but then they Re-appear. Auto create collections is off for both my Movies and Music libraries.

Reproduction Steps

Go to dashboard

Jellyfin Version

Unstable (master branch)

if other:

No response

Environment

- OS: Ubuntu 22
- Linux Kernel: aarch64 Linux 5.10.160-legacy-rk35xx
- Virtualization: Docker
- Clients: Browser (probably all the others)
- Browser: Chrome 120
- FFmpeg Version: 6.0.1-1+git20240229.99d938d6~jammy
- Playback Method: N/A
- Hardware Acceleration: N/A
- GPU Model: Rockchip GPU on Orange PI 5B
- Plugins: Default plugins
- Reverse Proxy: Cloudflare tunnels
- Base URL: https://jf.[MY_DOMAIN]/
- Networking: ??
- Storage: lots

Jellyfin logs

Sometimes I get error refreshing item but nothing collections related it seems:

[2024-03-29 02:02:59.793 +00:00] [ERR] [50] MediaBrowser.Providers.Manager.ProviderManager: Error refreshing item
System.InvalidOperationException: Cannot update refresh progress of item 'MusicArtist' (5e6effafcbd46ccf500c0bf0d78b5965) because a refresh for this item is not running
   at MediaBrowser.Providers.Manager.ProviderManager.<>c__DisplayClass72_0.<OnRefreshProgress>b__0(Guid _)
   at System.Collections.Concurrent.ConcurrentDictionary`2.AddOrUpdate(TKey key, Func`2 addValueFactory, Func`3 updateValueFactory)
   at MediaBrowser.Providers.Manager.ProviderManager.OnRefreshProgress(BaseItem item, Double progress)
   at MediaBrowser.Controller.Entities.Audio.MusicAlbum.RefreshAllMetadata(MetadataRefreshOptions refreshOptions, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass67_0.<<RefreshAllMetadataForContainer>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at MediaBrowser.Providers.Manager.ProviderManager.RunMetadataRefresh(Func`1 action, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.RefreshAllMetadataForContainer(IMetadataContainer container, MetadataRefreshOptions refreshOptions, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.RefreshChildMetadata(BaseItem child, MetadataRefreshOptions refreshOptions, Boolean recursive, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass70_0`1.<<RunTasks>b__1>d.MoveNext()
--- End of stack trace from previous location ---
   at MediaBrowser.Controller.Entities.Folder.RunTasks[T](Func`3 task, IList`1 children, IProgress`1 progress, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal2(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken)
   at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.RefreshArtist(MusicArtist item, MetadataRefreshOptions options, CancellationToken cancellationToken)
   at MediaBrowser.Providers.Manager.ProviderManager.StartProcessingRefreshQueue()

FFmpeg logs

N/A

Please attach any browser or client logs here

N/A

Please attach any screenshots here

See above

Code of Conduct

  • I agree to follow this project's Code of Conduct
@Explosion-Scratch Explosion-Scratch added the bug Something isn't working label Mar 30, 2024
@jellyfin-bot
Copy link
Contributor

Hi, it seems like your issue report has the following item(s) that need to be addressed:

  • You have not filled in the environment completely.
  • You have not provided any ffmpeg logs. They should be included if transcoding or remuxing.

This is an automated message, currently under testing. Please file an issue here if you encounter any problems.

@Explosion-Scratch
Copy link
Author

@jellyfin-bot I edited it 🥺

@sebastianpc
Copy link

sebastianpc commented Apr 4, 2024

I am having the same issue, except with about 500 collections.

Folders get deleted, and when the folders doesn't exist, a library scan fails.

I can delete them in Libraries, but they still appear on the homepage, and then the scans fail, because the folder got deleted

Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Providers.Manager.ProviderManager.<>c__DisplayClass69_0.<OnRefreshProgress>b__0(Guid _)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Providers.Manager.ProviderManager.OnRefreshProgress(BaseItem item, Double progress)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass64_1.<ValidateChildrenInternal2>b__0(Double innerPercent)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]: [18:43:12] [ERR] Error refreshing folder
Apr 04 18:43:12 HOSTNAME jellyfin[382017]: System.InvalidOperationException: Cannot update refresh progress of item 'Series' (ac89b023c89dccb24115f12e5c5e11cb) because a refresh for this item is not running
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Providers.Manager.ProviderManager.<>c__DisplayClass69_0.<OnRefreshProgress>b__0(Guid _)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Providers.Manager.ProviderManager.OnRefreshProgress(BaseItem item, Double progress)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass64_1.<ValidateChildrenInternal2>b__0(Double innerPercent)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]: [18:43:12] [ERR] Error refreshing folder
Apr 04 18:43:12 HOSTNAME jellyfin[382017]: System.InvalidOperationException: Cannot update refresh progress of item 'Folder' (67c71f7f1f66d8200b5460fc3ff68708) because a refresh for this item is not running
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Providers.Manager.ProviderManager.<>c__DisplayClass69_0.<OnRefreshProgress>b__0(Guid _)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Providers.Manager.ProviderManager.OnRefreshProgress(BaseItem item, Double progress)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass64_1.<ValidateChildrenInternal2>b__0(Double innerPercent)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]: [18:43:12] [ERR] Error refreshing folder
Apr 04 18:43:12 HOSTNAME jellyfin[382017]: System.InvalidOperationException: Cannot update refresh progress of item 'Folder' (67c71f7f1f66d8200b5460fc3ff68708) because a refresh for this item is not running
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Providers.Manager.ProviderManager.<>c__DisplayClass69_0.<OnRefreshProgress>b__0(Guid _)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Providers.Manager.ProviderManager.OnRefreshProgress(BaseItem item, Double progress)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass64_1.<ValidateChildrenInternal2>b__0(Double innerPercent)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]: [18:43:12] [ERR] Error refreshing folder
Apr 04 18:43:12 HOSTNAME jellyfin[382017]: System.InvalidOperationException: Cannot update refresh progress of item 'Folder' (67c71f7f1f66d8200b5460fc3ff68708) because a refresh for this item is not running
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Providers.Manager.ProviderManager.<>c__DisplayClass69_0.<OnRefreshProgress>b__0(Guid _)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Providers.Manager.ProviderManager.OnRefreshProgress(BaseItem item, Double progress)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass64_1.<ValidateChildrenInternal2>b__0(Double innerPercent)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]: [18:43:12] [ERR] Error refreshing folder
Apr 04 18:43:12 HOSTNAME jellyfin[382017]: System.InvalidOperationException: Cannot update refresh progress of item 'Series' (ac89b023c89dccb24115f12e5c5e11cb) because a refresh for this item is not running
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Providers.Manager.ProviderManager.<>c__DisplayClass69_0.<OnRefreshProgress>b__0(Guid _)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Providers.Manager.ProviderManager.OnRefreshProgress(BaseItem item, Double progress)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass64_1.<ValidateChildrenInternal2>b__0(Double innerPercent)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]: [18:43:12] [ERR] Error refreshing folder
Apr 04 18:43:12 HOSTNAME jellyfin[382017]: System.InvalidOperationException: Cannot update refresh progress of item 'AggregateFolder' (f27caa37e5142225cceded48f6553502) because a refresh for this item is not running
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Providers.Manager.ProviderManager.<>c__DisplayClass69_0.<OnRefreshProgress>b__0(Guid _)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Providers.Manager.ProviderManager.OnRefreshProgress(BaseItem item, Double progress)
Apr 04 18:43:12 HOSTNAME jellyfin[382017]:    at MediaBrowser.Controller.Entities.Folder.<>c__DisplayClass64_2.<ValidateChildrenInternal2>b__1(Double innerPercent)```

@sebastianpc
Copy link

When I try to delete it from the Libraries page, I get the following error.

The folder exists when clicking the "Confirm" button, but the error below still appears

[19:00:36] [ERR] Error refreshing owned items for /var/lib/jellyfin/root/default/Collections360
System.IO.DirectoryNotFoundException: Could not find a part of the path '/var/lib/jellyfin/root/default/Collections360'.
   at System.IO.Enumeration.FileSystemEnumerator`1.Init()
   at System.IO.DirectoryInfo.InternalEnumerateInfos(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
   at MediaBrowser.Controller.Providers.DirectoryService.<>c.<GetFileSystemEntries>b__5_0(String p, IFileSystem fileSystem)
   at MediaBrowser.Controller.IO.FileData.GetFilteredFileSystemEntries(IDirectoryService directoryService, String path, IFileSystem fileSystem, IServerApplicationHost appHost, ILogger logger, ItemResolveArgs args, Int32 flattenFol>
   at MediaBrowser.Controller.Entities.CollectionFolder.CreateResolveArgs(IDirectoryService directoryService, Boolean setPhysicalLocations)
   at MediaBrowser.Controller.Entities.BaseItem.RefreshMetadata(MetadataRefreshOptions options, CancellationToken cancellationToken)
[19:00:36] [ERR] Error processing request: Could not find a part of the path '/var/lib/jellyfin/root/default/Collections360'. URL DELETE /Library/VirtualFolders.

@Shadowghost
Copy link
Contributor

@sebastianpc that issue should be fixed with #11286

@sebastianpc
Copy link

I have gotten a weird state where the collections exists on the front page, but not in the admin panel

@gnattu
Copy link
Member

gnattu commented Apr 19, 2024

Then its related code might need the same treatment in #11352 then.

@jellyfin-bot jellyfin-bot added this to Needs triage in Issue Triage for Main Repo Apr 19, 2024
@sebastianpc
Copy link

It might be the same.
The delete request is also sent to VirtualFolder.

I just updated my jellyfin, but it seems the latest in the repos were built 4 days ago, and it appears that the fix was only merged in yesterday.

I'll take a look if its fixed next unstable build

@joshuaboniface
Copy link
Member

joshuaboniface commented Apr 25, 2024

Reproducing this on 10.9.0 build version 2024042215.
Screenshot from 2024-04-24 20-08-55

Started with a fresh install, added Shows and Movies libraries, and enabled auto collections on both, and this was present next day.

Lots of errors like so in the logs:

Apr 24 19:41:41 jf2.p..net jellyfin[10375]: [19:41:41] [ERR] Error refreshing Captain America Collection with ["0bf0f104-a1cf-6a70-8e4a-b38394f40a8a", "7077cd20-6035-19af-d0a5-9b6d3f188748", "02a34522-ea51-5b19-cc5b-d3c72da6cafd"]  
Apr 24 19:41:41 jf2.p..net jellyfin[10375]: System.InvalidOperationException: Sequence contains no elements                                                                                                                             
Apr 24 19:41:41 jf2.p..net jellyfin[10375]:    at System.Linq.ThrowHelper.ThrowNoElementsException()                                                                                                                                    
Apr 24 19:41:41 jf2.p..net jellyfin[10375]:    at Emby.Server.Implementations.Collections.CollectionManager.EnsureLibraryFolder(String path, Boolean createIfNeeded)                                                                    
Apr 24 19:41:41 jf2.p..net jellyfin[10375]:    at Emby.Server.Implementations.Collections.CollectionManager.CreateCollectionAsync(CollectionCreationOptions options)                                                                    
Apr 24 19:41:41 jf2.p..net jellyfin[10375]:    at Emby.Server.Implementations.Library.Validators.CollectionPostScanTask.Run(IProgress`1 progress, CancellationToken cancellationToken)                                                  
Apr 24 19:41:42 jf2.p..net jellyfin[10375]: [19:41:42] [WRN] Library folder /var/lib/jellyfin/data/collections is inaccessible or empty, skipping                                                                                       
Apr 24 19:41:42 jf2.p..net jellyfin[10375]: [19:41:42] [WRN] Library folder /var/lib/jellyfin/data/playlists is inaccessible or empty, skipping                                                                                         
Apr 24 19:42:12 jf2.p..net jellyfin[10375]: [19:42:12] [ERR] Error refreshing Cars Collection with ["5d07527d-ae77-1628-c1da-05bb86c66acb", "8cdfd70f-1ec5-4316-a9b1-1bb5b528e6bb", "3d9595a1-f2ec-9d88-1bcb-6159e9bda5ed"]             
Apr 24 19:42:12 jf2.p..net jellyfin[10375]: System.InvalidOperationException: Sequence contains no elements                                                                                                                             
Apr 24 19:42:12 jf2.p..net jellyfin[10375]:    at System.Linq.ThrowHelper.ThrowNoElementsException()                                                                                                                                    
Apr 24 19:42:12 jf2.p..net jellyfin[10375]:    at Emby.Server.Implementations.Collections.CollectionManager.EnsureLibraryFolder(String path, Boolean createIfNeeded)                                                                    
Apr 24 19:42:12 jf2.p..net jellyfin[10375]:    at Emby.Server.Implementations.Collections.CollectionManager.CreateCollectionAsync(CollectionCreationOptions options)                                                                    
Apr 24 19:42:12 jf2.p..net jellyfin[10375]:    at Emby.Server.Implementations.Library.Validators.CollectionPostScanTask.Run(IProgress`1 progress, CancellationToken cancellationToken)                                                  
Apr 24 19:42:13 jf2.p..net jellyfin[10375]: [19:42:13] [WRN] Library folder /var/lib/jellyfin/data/collections is inaccessible or empty, skipping                                                                                       
Apr 24 19:42:13 jf2.p..net jellyfin[10375]: [19:42:13] [WRN] Library folder /var/lib/jellyfin/data/playlists is inaccessible or empty, skipping          

But those folders it was complaining about definitely do exist.

Trying to replicate now but with a different data directory (just to rule out weirdness there).

@joshuaboniface
Copy link
Member

Confirmed replication with a different path too. The /var/lib/jellyfin/data/collections folder is created, with proper perms, but is empty.

@joshuaboniface joshuaboniface moved this from Needs triage to High priority in Issue Triage for Main Repo Apr 25, 2024
@joshuaboniface
Copy link
Member

Worth noting I'm seeing a lot of this sort of thing too, both for playlist and collections folders:

Apr 24 22:53:31 jf2.p..net jellyfin[410737]: [22:53:31] [WRN] [22] MediaBrowser.Controller.Entities.BaseItem: Library folder /srv/jellyfin/data/playlists is inaccessible or empty, skipping
Apr 24 22:53:31 jf2.p..net jellyfin[410737]: [22:53:31] [WRN] [22] MediaBrowser.Controller.Entities.BaseItem: Library folder /srv/jellyfin/data/playlists is inaccessible or empty, skipping

Given the paths and such, might be related.

@joshuaboniface
Copy link
Member

Another thing that might be related that's flooding the logs:

Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]: [23:02:40] [DBG] [28] Jellyfin.Drawing.ImageProcessor: Getting image size for item Person /srv/jellyfin/metadata/People/J/Jerry Bruckheimer/poster.jpg
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]: [23:02:40] [ERR] [28] Emby.Server.Implementations.Library.LibraryManager: Cannot get image dimensions for /srv/jellyfin/metadata/People/J/Jerry Bruckheimer/poster.jpg
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]: System.IO.FileNotFoundException: File not found
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]: File name: '/srv/jellyfin/metadata/People/J/Jerry Bruckheimer/poster.jpg'
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]:    at Jellyfin.Drawing.Skia.SkiaEncoder.GetImageSize(String path)
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]:    at Jellyfin.Drawing.ImageProcessor.GetImageDimensions(String path)
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]:    at Jellyfin.Drawing.ImageProcessor.GetImageDimensions(BaseItem item, ItemImageInfo info)
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]:    at Emby.Server.Implementations.Library.LibraryManager.UpdateImagesAsync(BaseItem item, Boolean forceUpdate)
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]: [23:02:40] [DBG] [28] Jellyfin.Drawing.ImageProcessor: Getting image size for item Person /srv/jellyfin/metadata/People/D/Don Simpson/poster.jpg
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]: [23:02:40] [ERR] [28] Emby.Server.Implementations.Library.LibraryManager: Cannot get image dimensions for /srv/jellyfin/metadata/People/D/Don Simpson/poster.jpg
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]: System.IO.FileNotFoundException: File not found
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]: File name: '/srv/jellyfin/metadata/People/D/Don Simpson/poster.jpg' 
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]:    at Jellyfin.Drawing.Skia.SkiaEncoder.GetImageSize(String path)
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]:    at Jellyfin.Drawing.ImageProcessor.GetImageDimensions(String path)
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]:    at Jellyfin.Drawing.ImageProcessor.GetImageDimensions(BaseItem item, ItemImageInfo info)
Apr 24 23:02:40 jf2.p.bonilan.net jellyfin[412241]:    at Emby.Server.Implementations.Library.LibraryManager.UpdateImagesAsync(BaseItem item, Boolean forceUpdate)

I have a hunch that all of these "file not found" errors are related; somehow some path is getting constructed incorrectly or something perhaps?

@nielsvanvelzen nielsvanvelzen added this to To do in Release 10.9.z via automation Apr 25, 2024
@nielsvanvelzen nielsvanvelzen added the release critical A bug severe enough or impactful enough to block stable release label May 2, 2024
@gnattu gnattu moved this from To do to In progress in Release 10.9.z May 2, 2024
Issue Triage for Main Repo automation moved this from High priority to Closed/Done May 5, 2024
Release 10.9.z automation moved this from In progress to Done May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release critical A bug severe enough or impactful enough to block stable release
Projects
Status: In Progress
Development

Successfully merging a pull request may close this issue.

7 participants