GoogleSpreadSheet.Activities fail from Orhestrator

Hi team,
I am using UiPathTeam.GoogleSpreadsheet.Activities package version 1.0.2.1. While this works when running the workflow from Studio, it does not work when the workflow is triggered from the Orchestrator at https://demo.uipath.com/.
Studio and Robot version is 2018.2.3 Enterprise edition.
The workflow did run successfully in the past also from the same Orchestrator, but probably I was using a lower version of UiPath or Orchestrator had lower version of UiPath.Below is the errormessage in a prompt when running from Orchestrator
“Cannot create unknown type’{clr-namespace:GoogleSpreadsheet.Activities;assembly=GoogleSpreadsheet.Activities}'GoogleSheetApplicationScope”.
Tried package reinstall, restart, recreation of process/robot/job in Orchestrator etc
Found similar issue: Problems automating Uipath run ¡ Issue #22 ¡ UiPath/Community.Activities ¡ GitHub, is this a known issue and open yet?

Looking forward to your support.

Regards,
Amrita Hegde

1 Like

Hi Amrita,

Did you try manually uploading package uipathteam.googlespreadsheet.activities.1.0.2.1.nupkg to Orchestrator?

In case your workflow is developed with an older version of the Studio, could you create a small test workflow with GoogleSpreadsheet activities in UiPath Studio 2018.2.3 and try to run it from Studio and from Orchestrator, after manually uploading GoogleSpreadsheet package? Also in order to isolate the issue, you should try triggering the execution on the same Dev machine, where it worked fine by executing from Studio.

I created a small workflow using UiPathTeam.GoogleSpreadsheet.Activities package version 1.0.2.1 in UiPath Studio 2018.2.3. When I tried running from Orchestrator (https://demo.uipath.com/) there was a message that package GoogleSpreadsheet is missing. After manually uploading this package to Orchestrator, the job ran successfully.

Thank you,
Daniela Dumitrascu

1 Like

Hi Daniela,

I have now manually uploaded the uipathteam.googlespreadsheet.activities.1.0.2.1.nupkg to Orchestrator.The result is a ‘Could not load file or assembly Google.Apis.Core, Version 1.29.2.0 or of its dependencies’

The workflow was developed with older version of Studio.But even now it runs fine in Studio. Can you tell me what versions of Google.Apis*.dll are expected to be present in C:\Program Files (x86)\UiPath\Studio ? I see that version of Google.Apis.Core.dll is 1.13.1.0 in there.I am not sure if these dlls need to be manually replaced with higher versions? Please suggest.

regards,
Amrita

Please note under AppData\Local\UiPath\Activities I see the following versions

Google.Apis.1.29.2
Google.Apis.Auth.1.29.2
Google.Apis.Core.1.29.2
Google.Apis.Sheets.v4.1.29.2.1002

Also my workflow package itself contains a folder GooglePackage wherein I have manually copied version 1.29.2 of following
Google.Apis.Auth.dll
Google.Apis.Core.dll
Google.Apis.Core.xml

Please suggest how to fix this

Hi Amrita,

UiPathTeam.GoogleSpreadsheets.Activity has the following dependencies:

https://www.nuget.org/packages/Google.Apis/1.29.2

https://www.nuget.org/packages/Google.Apis.Auth/1.29.2

https://www.nuget.org/packages/Google.Apis.Sheets.v4/1.29.2.1002

https://www.nuget.org/packages/Newtonsoft.Json/10.0.3

¡ Google.Apis (>= 1.29.2)

¡ Google.Apis.Auth (>= 1.29.2)

¡ Google.Apis.Sheets.v4 (>= 1.29.2.1002)

¡ Newtonsoft.Json (>= 10.0.3)

To update these dependencies the following dll’s : Google.Apis.dll, Google.Apis.Auth.dll, Newtonsoft.Json, Google.Apis.Sheets.v4 should be copied in the folder where Studio/Platform is installed (for example : under c:\Program Files (x86)\UiPath\Studio), overriding the older versions existing there.

Since you can run from the Studio just fine, I think these dlls were already updated at some point. Could you try to update the dlls again in Studio, place the dependencies /packages under c:\Program Files (x86)\UiPath\Studio\Packages\ and maybe also upload manually in Orchestrator the dependencies/packages listed above?

Thank you,

Daniela Dumitrascu

Hi Amrita,

Could you please try updating : Google.Apis.dll, Google.Apis.Auth.dll, Newtonsoft.Json, Google.Apis.Sheets.v4 where Studio/Platform is installed (for example under c:\Program Files (x86)\UiPath\Studio), overriding the older versions existing there (you can do a backup of the older versions). Even if you have the dlls in other packages, the Studio will load first the ones found in the installation folder, and probably would not load another version of the same dlls afterwards.

You can extract the needed dlls from the packages:

Thank you,
Daniela Dumitrascu

Hi Daniela,

I replaced the dlls with the versions you’ve mentioned in c:\Program Files (x86)\UiPath\Studio, copied the packages to c:\Program Files (x86)\UiPath\Studio\Packages and uploaded Packages to Orchestrator.

Now I receive a messagebox Error:“invalid_request”,Description:“”,Uri:“”
The workflow still runs well in Studio.

Hi Daniela,

I also created a new workflow that contains only Read range, Add data row and Write range activities.Workflow fails only while running from Orchestrator. See details below

  • Process: GSheetTest
  • Environment: Demo
  • Robot: RobotAmrita
  • Info: “Execution error : Google.Apis.Auth.OAuth2.Responses.TokenResponseException: Error:"invalid_request", Description:"", Uri:""\r\n at GoogleSpreadsheet.Activities.GoogleInteropActivity1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)\r\n at System.Activities.AsyncCodeActivity1.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)\r\n at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)”
  • Start Time: 2018/09/05 12:32:39
  • End Time: 2018/09/05 12:32:41

Amrita,

Could you please confirm that when you trigger the job from Orchestrator , it runs on the same machine with the Studio where you updated the dlls? If it runs on a remote machine/robot, those dlls should be updated there as well.

Daniela

Hi Daniela,

Yes I have a single machine with Studio and Robot and from Orchestrator I am triggering this same Robot instance.

Best regards,
Amrita

Any update on this issue?

Hi Amrita,

Do you get the same error if you execute the process from the System tray?

When you execute form Orchestrator the packages are unzipped and executed from %USERPROFILE%.nuget\Packages folder, so it is a different location when you execute from Studio.

Could you please clean the Cache and the temp folders below also?
→ C:\Users<username>\AppData\Local\Temp\nuget
→ C:\Users<username>\AppData\Local\NuGet\Cache

Please check if the %USERPROFILE%.nuget\Packages contains the correct version for the google packages. From the message that you have it seems that what you execute from Studio is not the same with what it is downloaded form Orchestrator and unzipped in the given location.

Daniela

Hi Daniela,

Yes, I get the same error when I try executing from System tray.

I have cleared Cache and Temp /nuget fĂłlders you mentioned and tested again.

%USERPROFILE%.nuget\Packages contains the correct versions.I also tried deleting these folders and retriggering download and execution from System tray. I noticed that for Newtonsoft.json both versions get downloaded 8.0.3 and 10.0.3.I have uploaded this package as well to Orchestrator, but still the same result.

Hi Daniela,
Could it be that some other dependent packages also need to be uploaded to Orchestrator?
Can you please tell me which other possibly dependent packages do you see in your tenant in Orchestrator?
Regards,
Amrita

Hi Daniela,

Thanks for your support so far. I am keen to understand how you were able to get the workflow running with same version of Studio , Robot and Orchestrator while it fails on my end. I request your help in replicating the same in my environment.
Would you be so kind and create a new tenant on your side and test by uploading only the necessary packages?
With regards to the robot machine I can confirm that %USERPROFILE%.nuget/packages contains dependencies downloaded correctly.
The project.json file in my sample workflow shows following dependencies
“dependencies”: {
“UiPath.Core.Activities”: “18.2.6745.15248”,
“UiPath.Credentials.Activities”: “1.1.6479.13204”,
“UiPath.Database.Activities”: “1.1.6660.26865”,
“UiPath.Excel.Activities”: “2.3.6682.26635”,
“UiPath.Mail.Activities”: “1.1.6562.21018”,
“UiPath.PDF.Activities”: “1.1.6732.21973”,
“UiPathTeam.GoogleSpreadsheet.Activities”: “1.0.2.1”
}

As this is a pressing issue for us now, if you suggest reverting back to older version of Studio and building the package again , please let me know.

Best regards,
Amrita

@Bogdan_Popescu Could you please share your thoughts on this topic? Is this a known issue with UiPathTeam.GoogleSpreadsheet.Activities when triggered from Orchestrator?

Hi @DanielaD, @Bogdan_Popescu ,

I was able to resolve this issue.

1)I deleted the packages v1.29.2 of Google.Apis,Google.Apis.Auth,Google.Apis.Sheets, and v10.0.3 Newtonsoft.Json, which were uploaded to Orchestrator as suggested above.

2)I deleted these packages from C:\Program Files (x86)\UiPath\Studio\Packages folder as well

3)I deleted these packages from %USERPROFILE%.nuget\packages as well.

4)I replaced the following dlls in C:\Program Files (x86)\UiPath\Studio with v1.29.2
Google.Apis,Google.Apis.Auth,Google.Apis.Core,Google.Apis.Sheets.v4
and v10.0.3.21018 Newtonsoft.Json

Having performed these steps, when I execute from Orchestrator, the above google.api packages v1.29.2 are not downloaded in %USERPROFILE%.nuget\packages any more. And the automation works again as expected. Thanks for the pointers so far.

Best regards,
Amrita

2 Likes

Hi Amrita,

Thank you for sharing the fix for this problem. I’m glad it is solved.

Daniela