I am getting the following error. However, It doesn’t make much sense because it worked perfectly yesterday and every day before and is now throwing this error. Nothing has been changed in the code or file paths between runs. Can someone help? I can’t figure out why it randomly cannot access it.
21.10.7+Branch.support-v21.10.Sha.4fc9759469a976c6aff9aff581b459a31fa01cd9
Source: Log Failed Closing All Applications
Message: One or more errors occurred.
Exception Type: System.AggregateException
RemoteException wrapping System.AggregateException: One or more errors occurred. —> RemoteException wrapping System.IO.IOException: The process cannot access the file ‘D:\Bot_Logs\CloserBot\20221116\072337_Log_CloseOutPerformer_CON_EXPIRED_20221116_072337.txt’ because it is being used by another process.
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
at System.IO.StreamWriter…ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
at System.IO.StreamWriter…ctor(String path, Boolean append, Encoding encoding)
at System.IO.File.InternalAppendAllText(String path, String contents, Encoding encoding)
at System.IO.File.AppendAllText(String path, String contents, Encoding encoding)
at UiPath.Core.Activities.AppendLine.<>c__DisplayClass21_0.b__0()
at UiPath.Core.Activities.Retry.<>c__DisplayClass1_0.b__0()
at UiPath.Core.Activities.Retry.Do[ResultType](Func1 action, Int32 timeoutMS, Int32 retryCount) --- End of inner exception stack trace --- at UiPath.Core.Activities.TaskAsyncCodeActivity
1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager