[Bug] v1.6.4 & v1.6.5 .NET exception #40

Closed
opened 2026-02-05 16:48:28 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @TizzAmmazz on GitHub (Jul 20, 2025).

Originally assigned to: @PatrickSt1991 on GitHub.

Have you checked the wiki?
Samsung Jellyfin Installer Wiki

Which version of the application did you use?
v1.6.4 & v1.6.5 - v1.6.2 works correctly

Is your Samsung TV in developer mode?
N/A

What Tizen version is your TV running?
N/A

Was the Tizen CLI installed by the tool at the following location?
%LocalAppData%\Programs\TizenStudioCli
N/A

Additional Context
Add any other context or logs about the problem here.
Log from Windows events:

Application: Samsung-Jellyfin-Installer.exe
CoreCLR Version: 8.0.1825.31117
.NET Version: 8.0.18
Description: The process was terminated due to an unhandled exception.
Exception Info: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users[REDACTED]\AppData\Local\Samsung-Jellyfin-Installe'.
at System.IO.Enumeration.FileSystemEnumerator 1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
at System.IO.Enumeration.FileSystemEnumerator 1.Init()
at System.IO.Enumeration.FileSystemEnumerable 1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
at System.IO.Enumeration.FileSystemEnumerableFactory.UserDirectories(String directory, String expression, EnumerationOptions options)
at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
at System.IO.Directory.GetDirectories(String path, String searchPattern, EnumerationOptions enumerationOptions)
at Samsung_Jellyfin_Installer.App.CleanOldSettings() in C:\Users\Patrick\source\repos\Samsung-Jellyfin-Installer\App.xaml.cs:line 92
at Samsung_Jellyfin_Installer.App.OnStartup(StartupEventArgs e) in C:\Users\Patrick\source\repos\Samsung-Jellyfin-Installer\App.xaml.cs:line 51
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.DispatcherOperation.InvokeImpl()
at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
at System.Windows.Threading.DispatcherOperation.Invoke()
at System.Windows.Threading.Dispatcher.ProcessQueue()
at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
at System.Windows.Application.RunDispatcher(Object ignore)
at System.Windows.Application.RunInternal(Window window)
at Samsung_Jellyfin_Installer.App.Main()

Originally created by @TizzAmmazz on GitHub (Jul 20, 2025). Originally assigned to: @PatrickSt1991 on GitHub. **Have you checked the wiki?** [Samsung Jellyfin Installer Wiki](https://github.com/PatrickSt1991/Samsung-Jellyfin-Installer/wiki) **Which version of the application did you use?** v1.6.4 & v1.6.5 - v1.6.2 works correctly **Is your Samsung TV in developer mode?** N/A **What Tizen version is your TV running?** N/A **Was the Tizen CLI installed by the tool at the following location?** `%LocalAppData%\Programs\TizenStudioCli` N/A **Additional Context** Add any other context or logs about the problem here. Log from Windows events: > Application: Samsung-Jellyfin-Installer.exe > CoreCLR Version: 8.0.1825.31117 > .NET Version: 8.0.18 > Description: The process was terminated due to an unhandled exception. > **Exception Info: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\[REDACTED]\AppData\Local\Samsung-Jellyfin-Installe'.** > at System.IO.Enumeration.FileSystemEnumerator 1.CreateDirectoryHandle(String path, Boolean ignoreNotFound) > at System.IO.Enumeration.FileSystemEnumerator 1.Init() > at System.IO.Enumeration.FileSystemEnumerable 1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized) > at System.IO.Enumeration.FileSystemEnumerableFactory.UserDirectories(String directory, String expression, EnumerationOptions options) > at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options) > at System.IO.Directory.GetDirectories(String path, String searchPattern, EnumerationOptions enumerationOptions) > at Samsung_Jellyfin_Installer.App.CleanOldSettings() in C:\Users\Patrick\source\repos\Samsung-Jellyfin-Installer\App.xaml.cs:line 92 > at Samsung_Jellyfin_Installer.App.OnStartup(StartupEventArgs e) in C:\Users\Patrick\source\repos\Samsung-Jellyfin-Installer\App.xaml.cs:line 51 > at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state) > at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) > at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) > at System.Windows.Threading.DispatcherOperation.InvokeImpl() > at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj) > at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) > --- End of stack trace from previous location --- > at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) > at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state) > at System.Windows.Threading.DispatcherOperation.Invoke() > at System.Windows.Threading.Dispatcher.ProcessQueue() > at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) > at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) > at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) > at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) > at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler) > at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs) > at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) > at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) > at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) > at System.Windows.Application.RunDispatcher(Object ignore) > at System.Windows.Application.RunInternal(Window window) > at Samsung_Jellyfin_Installer.App.Main()
OVERLORD added the closedbugtesting labels 2026-02-05 16:48:28 +03:00
Author
Owner

@PatrickSt1991 commented on GitHub (Jul 20, 2025):

@TizzAmmazz I see you've redacted your name

C:\Users[REDACTED]\AppData\Local\Samsung-Jellyfin-Installe

Can you at least give me a fake name with the same amount of characters?

It kinda looks like the path limit is exceeded

@PatrickSt1991 commented on GitHub (Jul 20, 2025): @TizzAmmazz I see you've redacted your name `C:\Users[REDACTED]\AppData\Local\Samsung-Jellyfin-Installe` Can you at least give me a fake name with the same amount of characters? It kinda looks like the path limit is exceeded
Author
Owner

@PatrickSt1991 commented on GitHub (Jul 20, 2025):

Nevermind my previous.

I'll implement this fix tomorrow;

public static void CleanOldSettings()
{
    string basePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Samsung-Jellyfin-Installe");

    // Check if the base directory exists before trying to enumerate it
    if (!Directory.Exists(basePath))
    {
        // Directory doesn't exist, nothing to clean
        return;
    }

    string exeName = Assembly.GetExecutingAssembly().GetName().Name;
    string currentVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();

    try
    {
        var dirs = Directory.GetDirectories(basePath);

        foreach (var dir in dirs)
        {
            if (dir.Contains(currentVersion))
                continue;

            try
            {
                Directory.Delete(dir, true);
            }
            catch (Exception ex)
            {
                // Log the error but continue with other directories
                // You might want to use proper logging here
                System.Diagnostics.Debug.WriteLine($"Failed to delete directory {dir}: {ex.Message}");
            }
        }
    }
    catch (Exception ex)
    {
        // Handle any other exceptions during directory enumeration
        System.Diagnostics.Debug.WriteLine($"Error during old settings cleanup: {ex.Message}");
    }
}

Needs a check if the folder exists or not

@PatrickSt1991 commented on GitHub (Jul 20, 2025): Nevermind my previous. I'll implement this fix tomorrow; ``` public static void CleanOldSettings() { string basePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Samsung-Jellyfin-Installe"); // Check if the base directory exists before trying to enumerate it if (!Directory.Exists(basePath)) { // Directory doesn't exist, nothing to clean return; } string exeName = Assembly.GetExecutingAssembly().GetName().Name; string currentVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString(); try { var dirs = Directory.GetDirectories(basePath); foreach (var dir in dirs) { if (dir.Contains(currentVersion)) continue; try { Directory.Delete(dir, true); } catch (Exception ex) { // Log the error but continue with other directories // You might want to use proper logging here System.Diagnostics.Debug.WriteLine($"Failed to delete directory {dir}: {ex.Message}"); } } } catch (Exception ex) { // Handle any other exceptions during directory enumeration System.Diagnostics.Debug.WriteLine($"Error during old settings cleanup: {ex.Message}"); } } ``` Needs a check if the folder exists or not
Author
Owner

@TizzAmmazz commented on GitHub (Jul 20, 2025):

Thank you for the update, the user folder name is 5 characters long, if it is of any use.

@TizzAmmazz commented on GitHub (Jul 20, 2025): Thank you for the update, the user folder name is 5 characters long, if it is of any use.
Author
Owner

@PatrickSt1991 commented on GitHub (Jul 21, 2025):

@TizzAmmazz should be fixed in v1.6.6

@PatrickSt1991 commented on GitHub (Jul 21, 2025): @TizzAmmazz should be fixed in [v1.6.6](https://github.com/PatrickSt1991/Samsung-Jellyfin-Installer/releases/tag/v1.6.6)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Samsung-Jellyfin-Installer#40