MediaBrowser / Emby

Emby Server is a personal media server with apps on just about every device.
https://emby.media
GNU General Public License v2.0
4.11k stars 803 forks source link

Outdated SMB client: SharpCifs.Smb.SmbException: This client does not support the negotiated dialect. #3780

Closed reijin90 closed 1 year ago

reijin90 commented 1 year ago

Hi!

It seems that emby uses an outdated SMB client protocol which does not support current SMB implementations. I was not able to find out which library is being used specifically, but this one, which seems to exhibit the exact same error is deprecated and points to a new implementation which supports current SMB versions: https://github.com/ume05rw/SharpCifs.Std

error log entry:

2023-05-01 10:14:05.815 Error ProviderManager: Error validating children for 2358 smb://192.168.1.3
*** Error Report ***
Version: 4.7.11.0
Command line: /Applications/EmbyServer.app/Contents/MacOS/EmbyServer.dll
Operating system: Darwin 21.6.0 Darwin Kernel Version 21.6.0: Sun Nov 6 23:29:57 PST 2022; root:xnu-8020.240.14~1/RELEASE_ARM64_T8101
Framework: .NET 6.0.5
OS/Process: arm64/arm64
Runtime: Applications/EmbyServer.app/Contents/MacOS/System.Private.CoreLib.dll
Processor count: 8
Data path: /Users/USER/.config/emby-server
Application path: /Applications/EmbyServer.app/Contents/MacOS
SharpCifs.Smb.SmbException: SharpCifs.Smb.SmbException: Failed to connect: 0.0.0.0<00>/192.168.1.3
at SharpCifs.Smb.SmbFile.DoShareEnum(List`1 list, Boolean files, String wildcard, Int32 searchAttributes, ISmbFilenameFilter fnf, ISmbFileFilter ff)
at SharpCifs.Smb.SmbFile.DoEnum(List`1 list, Boolean files, String wildcard, Int32 searchAttributes, ISmbFilenameFilter fnf, ISmbFileFilter ff)
at SharpCifs.Smb.SmbFile.ListFiles(String wildcard, Int32 searchAttributes, ISmbFilenameFilter fnf, ISmbFileFilter ff)
at SharpCifs.Smb.SmbFile.ListFiles()
at Emby.Server.Implementations.IO.SharpCifsFileSystem.ListFiles(SmbFile dir, Boolean recursive)
at Emby.Server.Implementations.IO.SharpCifsFileSystem.GetFileSystemEntries(String path, Boolean recursive)
at MediaBrowser.Controller.Providers.DirectoryService.GetFileSystemEntries(String path, Boolean clearCache)
at MediaBrowser.Controller.Entities.Folder.GetNonCachedChildren(IDirectoryService directoryService, LibraryOptions libraryOptions)
at MediaBrowser.Controller.Entities.Folder.ValidateChildrenInternal(IProgress`1 progress, CancellationToken cancellationToken, Boolean recursive, Boolean refreshChildMetadata, MetadataRefreshOptions refreshOptions, IDirectoryService directoryService)
at Emby.Providers.Manager.ProviderManager.RefreshCollectionFolderChildren(MetadataRefreshOptions options, CollectionFolder collectionFolder, CancellationToken cancellationToken)
SharpCifs.Util.Transport.TransportException: I/O error occurred.
at SharpCifs.Util.Transport.Transport.Connect(Int64 timeout)
at SharpCifs.Smb.SmbTransport.Connect()
SharpCifs.Util.Transport.TransportException: I/O error occurred.
at SharpCifs.Util.Transport.Transport.Connect(Int64 timeout)
SharpCifs.Smb.SmbException: This client does not support the negotiated dialect.
at SharpCifs.Smb.SmbTransport.DoConnect()
at SharpCifs.Util.Transport.Transport.Run()

I'm running a samba server via https://github.com/crazy-max/docker-samba

LukePulverenti commented 1 year ago

Hi, this has been updated in the upcoming 4.8 server release, but we still suggest mounting to the local system if you can. Thanks.