UiPath.DocumentUnderstanding.Persistence.OrchestratorException document understanding

 message: UiPath.DocumentUnderstanding.Persistence.OrchestratorException: Cannot access a closed Stream. ---> System.Exception: System.Net.Http.HttpRequestException: Error while copying content to a stream. ---> System.ObjectDisposedException: Cannot access a closed Stream. at System.IO.Stream.CopyToAsync(Stream destination, Int32 bufferSize, CancellationToken cancellationToken) at System.Net.Http.DelegatingStream.CopyToAsync(Stream destination, Int32 bufferSize, CancellationToken cancellationToken) at System.Net.Http.StreamToStreamCopy.CopyAsync(Stream source, Stream destination, Int32 bufferSize, Boolean disposeSource, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.HttpContent.<LoadIntoBufferAsyncCore>d__49.MoveNext() --- End of inner exception stack trace --- at System.Net.Http.HttpContent.<LoadIntoBufferAsyncCore>d__49.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Net.Http.HttpClient.<FinishSendAsyncBuffered>d__58.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at UiPath.DocumentUnderstanding.Persistence.Buckets.<GetWithHttpMessagesAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at UiPath.DocumentUnderstanding.Persistence.BucketsExtensions.<GetAsync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at UiPath.DocumentUnderstanding.Persistence.OrchestratorClient.<InternalExecuteAsync>d__11`1.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at UiPath.DocumentUnderstanding.Persistence.OrchestratorClient.<GetBucketIdByNameAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at UiPath.IntelligentOCR.Activities.CreateDocumentClassificationAction.<OnExecuteAsync>d__6.MoveNext() --- End of inner exception stack trace --- at UiPath.DocumentUnderstanding.Persistence.TaskExtensions.ThrowIfNeeded(Task task, Boolean suppressThrowException) at UiPath.IntelligentOCR.Activities.BaseOrchestratorClientAsyncActivity.ThrowIfNeeded(Task task, Boolean suppressThrowException) at UiPath.IntelligentOCR.Activities.BaseOrchestratorClientAsyncActivity.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)
level: Error
logType: User 

Hi,

From time to time I get this exception when working with documentunderstanding validation actions. I do not get where it is coming from as most actions do not give this exception. I also do not know what activity gives this exception as the source of the exception is named UiPath.DocumentUnderstanding.Persistence.

I will not be able to share my xaml files, but it only consists of a parrallel for each with the standard document understanding steps like digitize, classify and exctract, without any ML/AI.

The files used are pdf and the orchestrator is an on-prem installation.

Thanks you for your help

Hi @Barend,

Have you tried running the solution in debug mode that will help pinpoint the issue better?

Also, Is there any particular instance where/when you face this error?

Regards
Sonali

It does not happen in debug mode

It does not happen in debug mode It only happens in unattended (production) use. I also have not find when or where it happens. It looks like it has to do with the data used in the action not being able to be found in the orchestrator, but i’m not sure.

Hi @Barend,

I would suggest to refer DU template as mentioned in below link.

Looks like you project is missing something which might get resolved if you shift to this template provided by uipath for DU processes.

Hope this helps.

Regards
Sonali