Hello Guys
I’m currently studying how to use UI Studio and I have been encountering an error code that has been spamming me.
Error Code:
Error: LibGit2Sharp.LibGit2SharpException: invalid path ‘\?\C:\Users\Millow\AppData\Local\JetBrains\IdeaIC2021.1\index\shared\shared.index.hashes.org.jetbrains.kotlin.idea.versions.KotlinJsMetadataVersionIndex\shared.index.hashes.org.jetbrains.kotlin.idea.versions.KotlinJsMetadataVersionIndex_storage.storage.keystream.len’ (path too long)
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__DisplayClass17_01.b__1(IRepository _)
at UiPath.Studio.Plugin.Git.Services.GitSession.ThreadSafeExecute[TResult](Func2 action, Func1 repoFactory)
at UiPath.Studio.Plugin.Git.Services.GitSession.<>c__DisplayClass17_01.<ExecuteAsync>b__0(CancellationToken _) at UiPath.Shared.ProducerConsumerPair.<>c__DisplayClass18_01.b__0()
at System.Threading.Tasks.Task1.InnerInvoke() at System.Threading.ExecutionContext.RunInternal(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.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__DisplayClass30_0.<<DocumentService_DocumentModified>b__0>d.MoveNext()
— End of stack trace from previous location —
at System.Threading.Tasks.Task.<>c.b__140_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
Depends on permissions, if the user can map a drive or not. Could just do it via command prompt. But what happens if the user running the automation already has that drive mapped to something else?
Trying to get around it with drive mappings really isn’t a good solution.
Is your Windows later than Windows 10 version 1607?
That is the point of using the map Activity inside a Try Catch and catch the error that the letter is already used or use the activity that returns True of False on does a directory exist as it can include a drive letter, and use a loop to find an unused drive letter.
Sure, that kind of logic is doable, but if you’re on a late enough version of Windows it would be easier to just eliminate the path length restriction. It’s amazing the restriction still exists by default in Windows. It’s 2022 and we can only have a 260 character path?!
True, I was just offering a possible work around for someone that may not have a later Windows version available. My company did not move to Windows 10 until late February this year.