UiPath.Core.Activities.OnUiElementVanish warning

I have an activity which is giving a warning, and the activity behaves correctly during debugging on the machine and when the VM is logged into while running from orchestrator. But behaves differently(incorrect) when ran from orchestrator without logging to the VM.

Warning: Argument 'Condition' of activity 'If' is bound to an expression that contains activity 'InvokeMethod<Boolean>'. 'InvokeMethod<Boolean>' can cause the expression to idle during evaluation. If the argument expressions of activity 'If' modify shared state then going idle during expression evaluation can produce unexpected values for the arguments.
Warning: Argument 'Operand' of activity 'Not<Boolean,Boolean>' is bound to an expression that contains activity 'InvokeMethod<Boolean>'. 'InvokeMethod<Boolean>' can cause the expression to idle during evaluation. If the argument expressions of activity 'Not<Boolean,Boolean>' modify shared state then going idle during expression evaluation can produce unexpected values for the arguments.

I suspect this warning is pointing out something but I’m not sure what to look for.

Hi @Moshin_Ali_Khan

Please review the thread below, which contains a similar solution.

Try using Check app State activity form Modern design experience. @Moshin_Ali_Khan

Hello @Moshin_Ali_Khan

I would sugest you use the “Check App State” modern activity to determine if the element vanishes.

Regards
Soren