Path too long error while opening or debugging Ui path stiudio

23.6.1-beta.13324+Branch.release-v23.6.1.Sha.52787b786620e97cba5555379da6e6bb423b3e6b

path too long: ‘C:/Users//AppData/Local/Microsoft/Office/16.0/Wef/webview2/8588f42b-f39f-4724-85e7-8872ab3ec68c_ADAL/2/EBWebView/Default/Service Worker/CacheStorage/571988c4897ef87c20ec4d6b13878cf6c36e1caf/03c9c318-ad31-4241-a05c-4945f20e68c4/index-dir/the-real-index’

Error: LibGit2Sharp.LibGit2SharpException: path too long: ‘C:/Users/arpit.alne/AppData/Local/Microsoft/Office/16.0/Wef/webview2/8588f42b-f39f-4724-85e7-8872ab3ec68c_ADAL/2/EBWebView/Default/Service Worker/CacheStorage/571988c4897ef87c20ec4d6b13878cf6c36e1caf/03c9c318-ad31-4241-a05c-4945f20e68c4/index-dir/the-real-index’
at LibGit2Sharp.Core.Ensure.HandleError(Int32 result)
at LibGit2Sharp.Core.Proxy.git_status_list_new(RepositoryHandle repo, GitStatusOptions options)
at LibGit2Sharp.RepositoryStatus…ctor(Repository repo, StatusOptions options)
at LibGit2Sharp.Repository.RetrieveStatus(StatusOptions options)
at UiPath.Studio.Plugin.Git.Services.RepositoryStatusService.RetrieveStatus(String repositoryPath, StatusOptions options, Action2 sandboxedAction) at UiPath.Studio.Plugin.Git.Services.ItemStatusService.UpdateCache(String workingDirectory, String path, IGetStatusOptions options) at UiPath.Studio.Plugin.Git.Services.ItemStatusService.GetItemStatusCore(String workingDirectory, String path, IGetStatusOptions options) at UiPath.Studio.Plugin.Git.Services.ItemStatusService.<>c__DisplayClass12_0.<GetItemStatusAsync>b__0() at UiPath.Studio.Plugin.Git.Services.GitSession.<>c__DisplayClass20_01.b__2(IRepository _)
at UiPath.Studio.Plugin.Git.Services.GitSession.ExecuteInternal[TResult](Func2 action, Func1 repoFactory)
at UiPath.Studio.Plugin.Git.Services.GitSession.<>c__DisplayClass20_01.<ExecuteAsync>b__1() at System.Threading.Tasks.Task1.InnerInvoke()
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
— End of stack trace from previous location —
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
— End of stack trace from previous location —
at UiPath.Studio.Plugin.Git.Services.GitSession.SafeExecuteAsync[TResult](Func1 action) at UiPath.Studio.Plugin.Git.Services.GitSession.ExecuteAsync[TResult](Func1 action)
at UiPath.Studio.Plugin.Git.Services.ItemStatusService.GetItemStatusAsync(IGitSession session, String path, IGetStatusOptions options)
at UiPath.Studio.Plugin.Git.GitSourceControl.GetItemStatusAsync(String path, Boolean refreshCache)
at UiPath.Studio.SourceControl.Shared.Services.UI.BaseSourceControlUi1.RefreshBadgesAsync() at UiPath.Studio.Shell.SourceControl.SourceControlService.RefreshBadgesCore(IReadOnlyCollection1 paths, OperationType operationType)
at UiPath.Studio.Shell.SourceControl.SourceControlService.<>c__DisplayClass33_0.<<DocumentService_DocumentModified>b__0>d.MoveNext()
— End of stack trace from previous location —
at UiPath.Studio.Shared.MVVM.Services.DispatcherService.<>c__DisplayClass21_0.<b__0>d.MoveNext()
— End of stack trace from previous location —
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), HResult -2146233088

Error -

image

image

@Arpit_Alne

Is it happening for all projects?

If not can you locate the file and delete it please

Cheers

1 Like

Yes will all process, Which file need to relocate?

@Arpit_Alne

The one which you see in the error message just delete them…most of them I believe are not being used in the code

cheers

1 Like

Yes I tried Deleting, but its auto creating that file

Hi @Arpit_Alne

Could you please try moving your project to a location with a much shorter and trying to open it from there?
Just as a test, simply move your project folder to your Documents folder and try opening it from there.

1 Like

Yes its in documents folder,
image

Did it help to remedy one of the “path too long” errors?

Hi, @Arpit_Alne

The path you are providing is probably more than 260 characters and therefore it is throwing an error, if you allow the long path this issue might be resolved.

Steps you need to follow for enabling long path:

  1. Accessing Registry Editor

    • Press the Windows key + R to open the Run dialog.
    • Type regedit and press Enter to open the Registry Editor.
  2. Navigating to the Key:

    • In the Registry Editor, navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem.
  3. Changing LongPathsEnabled:

    • Look for the entry named LongPathsEnabled.
    • Right-click on it and select Modify.
    • Change the value to 1 and confirm.
  4. Restarting the Computer:

    • Close the Registry Editor.
    • Restart your computer.
  5. Accessing Group Policy Editor:

    • After restarting, search for gpedit.msc in the Windows search bar.
    • Open the Local Group Policy Editor.
  6. Navigating in Group Policy Editor:

    • In the Group Policy Editor, navigate to Computer Configuration > Administrative Templates > System > Filesystem.
  7. Enabling Win32 Long Paths:

    • Find the policy named Win32 Long Paths.
    • Double-click on it to open the settings.
    • Select the Enabled option.
    • Save the changes and close the Group Policy Editor.

Or just…shorten the folder names so the path isn’t so long.