Google connection invalid or you do not have access to it

Hello,

I run into this problem almost every single time I move something from Development to Production. Everything works fine with my Integration Service in Dev, but as soon as I move everything over to Prod, I get these “connection invalid” errors. Insanely frustrating. I’ve checked the connection status on all my bots, and they are fine. Here is the error message. Does anyone know why this always happens? The account listed in the “Use Google Drive” scope is fine, that works in Prod. It errors once the bot gets to the “download sheet” activity.

  • Info: Connection [8881d55f-448c-ed11-ac20-0050f29e0988] is invalid or you do not have access to it

UiPath.ConnectionClient.Contracts.ConnectionHttpException: Connection [8881d55f-448c-ed11-ac20-0050f29e0988] is invalid or you do not have access to it at UiPath.ConnectionClient.Helpers.HttpResponseMessageExtensions.EnsureConnectionStatusCodeAsync(HttpResponseMessage response, CancellationToken ct)
at UiPath.ConnectionClient.Helpers.HttpConnectionServiceClient.RequestAsync(Uri uri, HttpMethod method, String content, TimeSpan timeout, Dictionary2 headers, CancellationToken ct) at UiPath.ConnectionClient.Helpers.HttpConnectionServiceClient.RequestAsync[T](Uri uri, HttpMethod method, String content, TimeSpan timeout, Dictionary2 headers, CancellationToken ct)
at UiPath.ConnectionClient.Helpers.HttpConnectionServiceClient.RequestWithRetryAsync[T](Uri uri, HttpMethod method, String content, TimeSpan timeout, Dictionary2 headers, CancellationToken ct) at UiPath.ConnectionClient.ConnectionClient.<>c__DisplayClass7_0.<b__0>d.MoveNext() --- End of stack trace from previous location --- at UiPath.ConnectionClient.Helpers.CacheHelpers1.GetValueFromCache(MemoryCache cache, String key, Func1 refreshValueFunc, DateTimeOffset expiry, Boolean forceRefresh) at UiPath.ConnectionClient.Helpers.CacheHelpers1.GetValueFromCache(MemoryCache cache, String key, Func1 refreshValueFunc, Boolean forceRefresh) at UiPath.ConnectionClient.ConnectionClient.GetAccessToken(String connectionId, Boolean forceRefresh, CancellationToken ct) at UiPath.GSuite.Activities.Services.GoogleConnectionClient.GetTokenInternalAsync(String connectionId, CancellationToken ct) at UiPath.Shared.Authentication.Google.OAuth2.ConnectionCredential.GetTokenAsync(CancellationToken cancellationToken) at UiPath.Shared.Authentication.Google.OAuth2.ConnectionCredential.InterceptAsync(HttpRequestMessage request, CancellationToken cancellationToken) at Google.Apis.Http.ConfigurableMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) in C:\Apiary\2021-09-08.15-52-39\Src\Support\Google.Apis.Core\Http\ConfigurableMessageHandler.cs:line 440 at System.Net.Http.HttpClient.g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Google.Apis.Requests.ClientServiceRequest1.ExecuteUnparsedAsync(CancellationToken cancellationToken) in C:\Apiary\2021-09-08.15-52-39\Src\Support\Google.Apis\Requests\ClientServiceRequest.cs:line 246
at Google.Apis.Requests.ClientServiceRequest1.ExecuteAsync(CancellationToken cancellationToken) in C:\Apiary\2021-09-08.15-52-39\Src\Support\Google.Apis\Requests\ClientServiceRequest.cs:line 216 at UiPath.GSuite.Drive.Extensions.DriveExtensions.GetFileAsync(DriveService client, CloudObjectIdentifier identifier, CancellationToken cancellationToken) at UiPath.GSuite.Drive.Services.DriveServiceProxy.<>c__DisplayClass20_0.<b__0>d.MoveNext() --- End of stack trace from previous location --- at UiPath.Shared.TelemetryService.NullTelemetryService.OperationContextAsync(Func2 method)
at UiPath.GSuite.Drive.Services.DriveServiceProxy.DownloadFileAsync(DownloadFileRequest downloadFileRequest, CancellationToken cancellationToken)
at UiPath.GSuite.Activities.DownloadSpreadsheet.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 System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
— End of stack trace from previous location —
at UiPath.Executor.BaseRunner.EndExecute(IAsyncResult result)
at UiPath.Executor.InProcessRunner.EndExecute(IAsyncResult result)
at UiPath.Core.Activities.ExecutorInvokeActivity.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)

@Josh_James

Can you check that in PROD any connection restrictions for Gdrive?

Hope this may help you

Thanks,
Srini

Hello. No restrictions in Prod that I am aware of. We use several other Processes that use Integration Service. I feel like Prod is trying to use the integration connected to MY account in Dev. The only account I can choose in Dev is the default one, which is mine. But I renamed it to the “bot1” account that everything else uses. So that connection should just reference the name being used, right?

I’ve also noticed in Dev in debug mode that the Gdrive connection will randomly feel like telling me the user is not authorized even though I’ve done several tests previous to this error message. These Google Workspace activities are insanely frustrating at times.

The only fix for this is copy/pasting my OLD Google scopes from old projects that only have “default” as the account name. Not “accountname (Default)”. The latter does not work. Hoping this gets resolved.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.