Cannot create unknown type - V2018.2.3 Onwards - Troubleshooting steps

Description

System.Xaml.XamlObjectWriterException: Cannot create unknown type

Troubleshooting steps

Explanation With Solution Approach

When the process is executed from the robot, It searches for the activity version in the following location:

  1. Robot Location - C:\Users{user profile} \ .nuget\packages
  2. Orchestrator feed - ~/NuGetPackages/Activities
  3. MyGet feed - https://www.myget.org/F/workflow/

Reason of issue:

  1. The issue is because packages are not downloaded in the Robot machine and Robot is looking for the missing packages in Orchestrator, MyGet & Nuget location and they are not available in Orchestrator location and somehow Robot is not able to reach or download from MyGet / NuGet of the locations. (if for the first time the process is being executed)
    Or,
  2. The currently installed packages are corrupt due to the unknown reason for example - abruptly Robot crash or server crash (the process was working fine and it stopped suddenly or after an upgrade)

Considering 2nd as the reason for the issue and the issue is with specific Robot machine or with one or fewer process.
https://forum.uipath.com/t/cannot-create-unknown-type-http-schemas-uipath-com-workflow-activities-invokeworkflowfile-solution-steps/117213

As you are facing this issue, it is not available in 1st & 2nd location, also it is not able to fetch the required package from Myget feed.

Permanent solution Approach: (considering 1st as the reason for the issue)
To auto download the missing packages you need to whitelist the host -

Kindly white-list the below mentioned in the Robot page.
MyGet.org**
NuGet.org**

For more details please refer the below link:
https://robot.uipath.com/docs/ip-addresses-the-robot-connects-to

Immediate Fix :

Please follow the below steps of moving the project dependencies of manually moving packages (the ones listed in the PROJECT.JSON file of the project) to Orchestrator NuGet package location.
On execution, Robot would download from Orchestrator configured package location.

  • Copy the identified nupkg from development environment where the process is working .

    • Location : C:\Program Files (x86)\UiPath\Studio\Packages Or
    • Location : %userprofile% / .nuget / packages / indentify the folder - copy only the one with with .nupkg extension (inside the folder → version → nupkg file)
  • Paste the missing packages inside Activities folder that is present in
    C:\Program Files (x86)\UiPath\Orchestrator\NuGetPackages path in orchestrator server (default location until you have made changes i.e. configuring a custom location)

(Note : copy only the nupkg file and directly place in ~/NuGetPackages/Activities )

Additionally, there would be any further dependencies, you can find out from the project json file. (open it in notepad)
Make sure you move all missing packages related to the project.

For Example :
(Note : copy only the nupkg file and directly place in ~/NuGetPackages/Activities )
It will be a single file , don’t copy everything .

No need of creating any folder , directly paste the file in Orchestrator  ~/NuGetPackages/Activities location. 

Example : Below screenshot

7 Likes

I do not have orchestrator and copying the missing .nupkg requires me to goto IT. They are unhappy with the manual movement of files. Is there a way to package all the dependencies in one .nupkg before deploying?