Invoke code fails on bot machine

Hello everyone,

Need help with below scenario.

Invoke code to fetch internet headers from outlook mail works fine on my machine but fails on bot machine.

System exception → Exception has been thrown by the target of an invocation.

have already imported microsoft.office.interop.outlook namespace and also added same as assembly reference to process xaml

Thanks

Hi
wrap all the code with a “try catch” sentence and find out the real error message using Console.WriteLine

Thanks for your response!

I think that’s another challenge that all are trying to resolve.

How to log inside “Invoke code” activity?

I used try catch block around invoke code to capture error using System.Exception, System.Reflection.TargetInvocationException and SystemException.Exception(as per log on orchestrator) but no luck in getting message logged or error rethrown.

Code doesn’t break now and bypasses Invoke Code activity without failure

Update uipath.system.activities package version and check.

Thanks for your response!

This is to fix invoke code issue or to capture error through try catch?

This is to fix invoke code issue.

If try with upgrading to higher version does not working than try with upgrading activity package to any lower version and Check Again.

I was also getting this error once and than upgrading Activities package to lower version has fixed my issue.

@lepumin @sb001 Thankyou both for your time!

Issue is resolved. I was able to log exception and hence resolve it.

I forgot to mention earlier that issue is with shared mailbox as per which i had to adjust vb.net code and it works fine now!

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