JIT compilation is disabled for non-Legacy projects error

Hi, my UiPath community version 2024.2.1 is suddenly hitting error as below. It was still working fine last week. After googling, I saw that some people managed to solve their error by updating all packages to the latest version. For mine, all packages are already at their latest.My UiPath.System.Activities is at 24.2.0-preview. I actually even tried downgrading to the non preview version of 23.10.5 but the error is still showing up unless I run debug mode.
Anyone has ideas how to solve this? Thanks in advance. :slight_smile:

System.InvalidOperationException: JIT compilation is disabled for non-Legacy projects. ExpressionToCompile { Code = Date.Now.AddDays(+14).ToString(“dd MMM yyyy”), ImportedNamespaces = System.Collections.Generic.HashSet1[System.String], VariableTypeGetter = System.Func2[System.String,System.Type], LambdaReturnType = System.String } should have been compiled by the Studio Compiler. at UiPath.Executor.DisabledJustInTimeCompiler.CompileExpression(ExpressionToCompile compilerRequest)
at System.Activities.JitCompilerHelper1.Compile[T](LocationReferenceEnvironment environment, Boolean isLocationReference) at System.Activities.JitCompilerHelper1.Compile[T](CodeActivityPublicEnvironmentAccessor publicAccessor, Boolean isLocationReference)
at Microsoft.VisualBasic.Activities.VisualBasicHelper.Compile[T](String expressionText, CodeActivityPublicEnvironmentAccessor publicAccessor, Boolean isLocationExpression)
at Microsoft.VisualBasic.Activities.VisualBasicValue1.CacheMetadata(CodeActivityMetadata metadata) at System.Activities.CodeActivity1.OnInternalCacheMetadataExceptResult(Boolean createEmptyBindings)
at System.Activities.Activity1.OnInternalCacheMetadata(Boolean createEmptyBindings) at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList1& validationErrors)
at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack1& activitiesRemaining, ActivityCallStack parentChain, IList1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback)
at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors) at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors)
at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.WorkflowApplication.EnsureInitialized()
at System.Activities.WorkflowApplication.Enqueue(InstanceOperation operation, Boolean push)
at System.Activities.WorkflowApplication.SimpleOperationAsyncResult.Run(TimeSpan timeout)
at System.Activities.WorkflowApplication.BeginRun(AsyncCallback callback, Object state)
at UiPath.Executor.RobotRunner.RunWorkflow()

Hi @civician

Check the below thread

Regards

Hi, thanks for your reply.
I have tried updating to 24.2.0-preview and also downgrading to 23.10.5.
Error is still showing.

Hi @civician

Try updating UiPath.System.Activities to the latest version by keeping Runtime Rule as Lowest As Applicable.

Regards

Hi,

I have tried to set Runtime Rule to Lowest As Applicable but the error is still showing except when running in Debug mode.

Hi @civician

I hope the UiPath.System.Activities is in the latest version. Which version of Studio are you using?

Regards

Hi @civician

→ Identify the main sequence or XAML file that appears to be corrupted. Create a new XAML file and transfer all activities except the potentially corrupted sequence to the new file. Ensure that you do not replicate the problematic sequence in the new XAML.

→ Or Instead of copy and paste can you please try it by manually typing the assign the variables like Code and it’s value in the workflow.

Thank you

Hi @Dhanamithra_R_G,
Thank you very much, the error is gone after I did manual assign by pulling an assign box for the variable. Strangely, it was working previously when I did the variable setting from the bottom variable tab.

Hi @civician, That’s great.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.