Unable to publish the Uipath workflow getting error "Compilation failed or was cancelled"

Hi Team,

I am Unable to publish the UiPath workflow getting error “Compilation failed or was cancelled”.


I have updated all the packages and I have converted Legacy to windows version.

If you see in above attachments only I have issue with login flows, main and process .xaml files .

Can any one have any idea or solution please let me know .

I need to publish the code to Orchestror.

R
Thanks in advance
Regards,
Baby

Hi @Baby123

That error means that at some point you have a workflow that calls itself.

It doesn’t have to be direct like Main invoking main, but if main invokes a workflow that invokes main, that would also trigger that error.

Evaluate the flow of execution and make sure there’s no recursion/ self-invocation.

This was allowed in the legacy framework but does not compile in windows framework.

Hi @aquesada , i have one workflow like LastPass launch which is using to launch the Lastpass application and also launch another application which based on Vendor - like name of the application inside the Lastpass.

For example I have same name application but different usernames. Now, I am lunching part1 - Baby application.after launching part1 - Baby I am checking if username is matching with part1Baby username or not . If username is not matching I am logout current application and relunch the Lastpass application and Lunch the part1 - Baby application.

In this scenario I am invoking Lastpass application twice or thrice.

Is that effort of compilation issue occurred.

Please let me know the alternative way to solve this issue

Thanks,
Baby

Try to use remove unused option…! remove imports, args, variables and workflows

Note: take back up before you use it

@aquesada

*Check your workflow for any syntax errors or validation issues. Look for red underlines or error indicators in the activities. Fix any errors that you find.

*Ensure that all dependencies (activities, packages, custom libraries) are properly installed and up-to-date. Check for any missing or conflicting dependencies

*Close and restart UiPath Studio. Sometimes, restarting the application can resolve temporary issues.

Cheers!!

Hi @Baby123 I’m not sure i follow but it sounds like you’re invoking the same workflow sequentially conditionally inside other invoked workflows and that can lead to the issue we’re seeing

Can you try to invoke the workflow in a loop while the condition you’re looking to satisfy has yet to become true? that should prevent recursive invocations

Try simply removing any workflow invocations of parent workflows in child workflows and see if it compiles simply before getting too deep into the restructuring. If that doesn’t work I would suggest restarting everything and maybe following some of the other suggestions presented by @sasi_poosarla above ^