Find Files and Folders general exception while processing

The Find Files and Folders activity was working fine about a week ago then suddenly started to fail with the below error. This is running on a machine with Studio version 20.22 activity is 2.1.1, tried updating didn’t work. Tested on an updated 2024 Studio version, still didn’t work. The authentication is ApplicationID and Secret. Confirmed the Application ID is correct, Secret key is up to date, in Azure I can see that the bot is connecting and logs show a successful login. Permissions were also checked and they are fine so is the naming convention of the destination/drive name/Site URL. No changes were made to anything this was working one day and started suddenly failing the next. I’ve searched the forum for resolutions but many of the topics with similar issues were left with no solution. Would greatly appreciate any input on this.

RemoteException wrapping Microsoft.Graph.ServiceException: Code: generalException
Message: General exception while processing
Inner error:
AdditionalData:
date: 2025-01-17T09:19:08
request-id: x
client-request-id: x
ClientRequestId: x

at Microsoft.Graph.SimpleHttpProvider.d__10.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 Microsoft.Graph.BaseRequest.d__40.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 Microsoft.Graph.BaseRequest.d__341.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 Microsoft.Graph.DriveSharedWithMeRequest.<GetAsync>d__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 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task) at UiPath.MicrosoftOffice365.Files.Extensions.FilesExtensions.<FindFilesAndFoldersAsync>d__36.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.MicrosoftOffice365.Activities.Files.FindFilesAndFolders.<ExecuteAsync>d__32.MoveNext() --- End of stack trace from previous location where exception was thrown --- at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at UiPath.Shared.Activities.ContinuableAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at UiPath.MicrosoftOffice365.Activities.Office365BaseClientActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result) at UiPath.MicrosoftOffice365.Activities.Office365ClientActivity2.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)

Hello @gabriel.borisov1!

It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.

First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.

You can check out some of our resources directly, see below:

  1. Always search first. It is the best way to quickly find your answer. Check out the image icon for that.
    Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.

  2. Topic that contains most common solutions with example project files can be found here.

  3. Read our official documentation where you can find a lot of information and instructions about each of our products:

  4. Watch the videos on our official YouTube channel for more visual tutorials.

Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.

Thank you for helping us build our UiPath Community!

Cheers from your friendly
Forum_Staff

1 Like

I am having a very similar issue. The automation has been running for months without issue. Then suddenly, general exception for Microsoft Office Find Files and Folders activity.
There have been no changes to the SP site and folders.
Inner Exception is below.

RemoteException wrapping Microsoft.Graph.ServiceException: Code: generalException
Message: General exception while processing
Inner error:
AdditionalData:
date: 2025-01-23T19:53:05
request-id: 380d579f-4d4a-46ff-a4e1-7ad243ea675b
client-request-id: 380d579f-4d4a-46ff-a4e1-7ad243ea675b
ClientRequestId: 380d579f-4d4a-46ff-a4e1-7ad243ea675b

at Microsoft.Graph.SimpleHttpProvider.SendAsync(HttpRequestMessage request,
HttpCompletionOption completionOption,
CancellationToken cancellationToken)
at Microsoft.Graph.BaseRequest.SendRequestAsync(Object serializableObject,
CancellationToken cancellationToken,
HttpCompletionOption completionOption)
at Microsoft.Graph.BaseRequest.SendAsync[T](Object serializableObject,
CancellationToken cancellationToken,
HttpCompletionOption completionOption)
at Microsoft.Graph.DriveSharedWithMeRequest.GetAsync(CancellationToken cancellationToken)
at UiPath.MicrosoftOffice365.Files.Extensions.FilesExtensions.FindFilesAndFoldersAsync(GraphServiceClient graphClient,
String query,
String folder,
String driveName,
String siteUrl,
String account,
CancellationToken cancellationToken)
at UiPath.MicrosoftOffice365.Activities.Files.FindFilesAndFolders.ExecuteAsync(AsyncCodeActivityContext context,
CancellationToken cancellationToken)
at UiPath.Shared.Activities.AsyncTaskCodeActivityImplementation.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at UiPath.Shared.Activities.AsyncTaskCodeActivity.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at UiPath.Shared.Activities.ContinuableAsyncCodeActivity.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at UiPath.MicrosoftOffice365.Activities.Office365BaseClientActivity.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at UiPath.MicrosoftOffice365.Activities.Office365ClientActivity`2.EndExecute(AsyncCodeActivityContext context,
IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)

Is not looking as an Inner Exception.

Some particular configurations might prevent the error from showing correctly in Orchestrator. You can set the following Try/Catch to throw the right error:

More details on https://uipath.my.salesforce-sites.com/CaseView/articles/en_US/Knowledge/Code-generalException-Microsoft-Office-365

1 Like

I did try this, this, the Throw for exception.InnerException was returning null. Tried a run instead of a debug, no luck in getting a proper log message either. The weirdest thing is that we have other bots that use the same activity, same version, same studio version, same machine, same SharePoint tennant and app ID, looking for files in the same Drive and URL locations, but the activity for this particular bot fails. Tried hardcoding everything, tennant, app, secret code, Drive, URL no luck. Even compared the xaml files of the working bot and the one that fails and they look pretty identical.

1 Like

Create a case with support on https://customerportal.uipath.com

100% having the same issue. Suddenly began on January the 9th with automations that had worked for months. Nothing in SharePoint has changed, and we reverified the permissions. Have submitted a ticket to UiPath. If I learn anything from the interaction with their support, I will respond back here.

Issue started around the same time for me too, on the 8th. I had a ticket with UiPath and they directed me to install Fiddler that helped troubleshoot.
https://uipath.my.salesforce-sites.com/CaseView/articles/Knowledge/How-to-use-Fiddler-to-debug-an-issue?lang=en_US

From the logs I saw that the request was failing when trying to reach a sharedwithme folder. I tried unchecking Shared from the Microsoft Office 365 Scope, but what solved it was adding a subfolder in the Find Files and Folders activity.

I have tried adding a subfolder in the activity, adding a drive name in the activity, and I created a new folder for the files and pointed the automation to that. Even went so far as creating new credentials (App ID and Secret). None of these solutions have resolved the issue.

Other O365 activities still work fine in the scope when interacting with SharePoint in the O365 scope.

This automation has run perfectly fine for months with no issues until Jan 9.

Can you observe which Office 365 package did you use in the past, and try to reuse that version in your automation?

That’s been tried. I have also upgraded and downloaded the package to see if that would help.