How to solve the error "Project type has changed since the latest published version (was Undefined, now is Process). Revert the project type or publish a new project"?
Issue Description
This error occurs when using the Automation Cloud Migration Tool to migrate from an On-Premise Orchestrator to Automation Cloud.
The Automation Cloud Migration Tool did not migrate a significant amount of the On-Premise packages, due to the following error:
"[YOUR_PACKAGE_NAME.Major.Minor.Patch.Suffix.nupkg] {"message":"Project type has changed since the latest published version (was Undefined, now is Process). Revert the project type or publish a new project.","errorCode":2007,"traceId":"00-xxx-xxx-01","resourceIds":null}"
This error is subsequently blocking the migration of the other processes.
Root Cause
ProjectType value from the [dbo].[PackageMetadata] table is causing the problem. When you publish any project from the 2018.4 version of Studio, it gets published with ProjectType as 0 which means Undefined.
Resolution
Approach #1
- Open the process in UiPath Studio
- Rename the project
- Publish it to the On-Premise Orchestrator tenant and retry the migration using the Automation Cloud Migration Tool
- Or publish directly from the UiPath Studio to the UiPath Cloud Orchestrator
Approach #2
- Download and install the NuGet Package Explorer from the Microsoft Store.
- Access the On-Premise Orchestrator -> Tenant -> Packages -> find the not migrated package process -> Version -> Download package
- Open the downloaded nupkg file with NuGet Package Explorer and access Edit Metadata Source
- Modify the value for and . Make sure that Title and Id have the same value and it is unique in the Orchestrator. Then Save the changes.
- Save the whole changes from File -> Save As -> Save.
- Access the On-Premise Orchestrator -> Tenant -> Packages -> Upload -> Browse for the nupkg file -> Upload it
- Add the process to your desired folder
- Retry the Migration Tool in order to see if the renamed package/process got migrated successfully
- Check if the process is working as it should
- Try this approach at the beginning only for one process and then perform the same for other impacted processes.
Approach #3
Note: It is suggested to get the help of a Database expert as UiPath never recommends any Database interactions.
- Access the On-Premise Orchestrator database
- Create a backup for the [dbo].[PackageMetadata]
- Download locally all affected package versions from your On-Premise Orchestrator
- Update the ProjectType value to 0 for the not migrated/impacted processes in the [dbo].[PackageMetadata] table
Example (adapt it based on your package Identifier and versions as you have in the [dbo].[PackageMetadata] table):
UPDATE [uipath].[dbo].[PackageMetadata]
SET [ProjectType]=0
WHERE [Identifier] = 'YOUR_PACKAGE_NAME' AND ([Version] = '1.0.9' OR [Version] = '1.0.7')
5. Retry the Migration Process and check if the previously not migrated processes are now migrated in the UiPath Cloud Orchestrator Tenant.
Note:
- Make sure that the UiPath Robots and UiPath Orchestrators are on the same version all the time. Hence, consider upgrading the UiPath Robot/UiPath Orchestrator to match versions.
- ProjectType possible values in UiPath Orchestrator:
Undefined -> 0
Process -> 1
ProcessLibrary -> 2
BusinessProcess ->3
BusinessProcessLibrary -> 4
TestAutomationProcess -> 5