Rename file throw below error

Hello Syncfusion team,


Recently some of our users reported this error many times when renaming file in filemanager. the error log message is:

System.ArgumentNullException: Value cannot be null. (Parameter 'source')

   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)

   at System.Linq.Enumerable.TryGetFirst[TSource](IEnumerable`1 source, Boolean& found)

   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)

   at Syncfusion.Blazor.FileManager.SfFileManager`1.TriggerActionCompleteEvents(String action, FileManagerResponse`1 response)

   at Syncfusion.Blazor.FileManager.SfFileManager`1.HandleHttpSuccess[T](HttpResponseMessage httpResponse, String action)

   at Syncfusion.Blazor.FileManager.SfFileManager`1.GetData[T](String action, T[] data, T targetData, String path, FileManagerAjaxSettings ajaxSettings, Boolean showHiddenItems, String name, String newName, String[] names, Boolean caseSensitive, String searchString, String targetPath, String[] renameFiles, Boolean showFileExtension)

   at Syncfusion.Blazor.FileManager.Internal.FileManagerDialog`1.PerformRename()

   at Syncfusion.Blazor.FileManager.Internal.FileManagerDialog`1.RenameClick()

   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)

   at Syncfusion.Blazor.Internal.SfBaseUtils.InvokeEvent[T](Object eventFn, T eventArgs)

   at Syncfusion.Blazor.Buttons.SfButton.OnClickHandler(MouseEventArgs args)

   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)

   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

It happened for me once. I selected a file and clicked rename from toolbar, after entering the new name and pressing Enter on keyboard, I got this error. when I refresh the file is renamed successfully. it didn't happen all times, but this error occured 29 times from 19/8/2024 until 3/10/2024

logError.png

.NET 8

current nugets: 27.1.5



1 Reply

SA SureshRajan Alagarsamy Syncfusion Team October 9, 2024 03:35 AM UTC

Hi Ahmed,

We have reviewed your query and understand that you are encountering issue the rename action in the File Manager component after upgrading to version 27.1.51. we created a sample and successfully validated the rename functionality. During our testing, we were able to rename folders and files using the Rename option in the toolbar without encountering any errors.

For your reference, we have attached the tested sample.

Sample: Attached as zip folder.

If the issue still persists, we recommend to share the below requested details with us.
  1. Share a complete code snippet details related to the File Manager component.
  2. Share an issue replication steps or issue video footage to better understand the problem.
  3. Please review the above shared sample and let us know if any key details were missed that are essential for reproducing the issue.
These details will help us to validate the query further and provide you with a prompt solution.

Regards,
Suresh.

Attachment: BlazorWebAppFileManager_eb5fd1b1.zip

Loader.
Up arrow icon