Error with "Cannot create unknown type"

Hi all. I’m getting an error with my robot with the following error:

Quote
Cannot create unknown type
‘{http://schemas.microsoft.com/netfx/2009/xaml/activities}Variable({http://schemas.uipath.com/workflow/activities}Browser)’
Unquote

I’m not sure if a package is missing. If so, could anyone advise what’s missing? Or is it something else which is causing the error.

Thanks in advance.

are the following packages referenced?

  • UiPath.System.Activities
  • UiPath.UiAutomation.Activities

Hi @ed_horizon

Check the below thread.

Regards

Hie @ed_horizon so the common reason for this error is like this type so check and verify are the fulfilled the required things if not please provide them …

Possible Reasons:

  1. Namespace Mismatch: The error message contains namespaces that indicate a mismatch or confusion between different versions or types of libraries. This could happen if you’re using an activity or component that is not compatible with the current version of UiPath or if there’s a discrepancy between expected and actual namespaces.
  2. Variable Scope Issues: The variable mentioned in the error message might not be properly defined or scoped in your workflow. This could occur if a variable is being used in a context where it hasn’t been declared or is out of scope.
  3. Activity Version Mismatch: If you’re using activities from different versions of UiPath or if the project was created with a different version, there could be compatibility issues. Ensure all activities and libraries are up to date and compatible with your UiPath version.
  4. Workflow Corruption: Occasionally, the XAML file itself might become corrupted or have issues due to improper modifications or merging of workflows.

Solutions:

  1. Check Namespace and Activity Versions: Ensure that all activities and libraries used in your workflow are compatible with your version of UiPath. If you recently updated UiPath or any of its packages, ensure that all related packages are also updated to compatible versions.
  2. Verify Variable Definitions: Open the workflow and check the definition and scope of the variable mentioned in the error. Make sure that the variable is correctly defined and initialized. Also, check if it’s being referenced in the appropriate scope.
  3. Update Dependencies: Go to the “Manage Packages” section in UiPath Studio and update all dependencies to their latest versions. This can resolve issues related to outdated or incompatible packages.
  4. Recreate the Variable: Try deleting and recreating the variable in the workflow. Sometimes, simply refreshing the variable can resolve issues related to variable references.
  5. Rebuild the Workflow: If none of the above solutions work, consider recreating the affected portion of the workflow. This can help resolve issues related to workflow corruption.

cheers Happy Automation. :smile:

Thanks all. I will try to see if it’s due to missing packages first.