We are getting below exception using the outlook connector - FindEmail/Retrieve email method. bot runs fine continuously upto 4 hrs then it will encounter this exception. We checked the outlook set-up and versions all seems fine. We also added a handle if this exception will occur, then bot will restart the outlook but still no luck.
"Exception: System.ComponentModel.Win32Exception (0x80004005): Error creating window handle.\r\n at System.Windows.Forms.NativeWindow.CreateHandle(CreateParams cp)\r\n at System.Windows.Forms.Control.CreateHandle()\r\n at System.Windows.Forms.Control.get_Handle()\r\n at OpenSpan.Office.MicrosoftOfficeBase..ctor()\r\n at OpenSpan.Office.MicrosoftOutlookMail..ctor(MailItem mailItem, Boolean hookEvents)\r\n at Extensions.MicrosoftOutlookExtension.FindEmails(String folder, String from, String to, String receivedTime, String subjectStartsWith). Message Error creating window handle
I would suggest that you open a support case as you will likely need someone to examine your automation to see what you are doing. I would look for any loops or anything in your solution where you are failing to close or dispose of any previous objects. For example; if your proxies are global instead of local, or if you have a loop where you are constantly copying something and failing to dispose of the copies.