I use testcafe to run my E2E tests. Everything works when I run testcafe using command line. When tests are run by a build agent (a windows service) tests hang but only on Internet explorer (chrome and FF work). I managed to reproduce that issue on Win10 and WinServer2012. The problem seem to occur only when Internet Explorer is launched in so called session zero (GUI app launched by a windows service). I already tried different users (LOCALSYSTEM and a local account with admin rights) but always I get the same result - tests hang. Everything works when I run browser via login/psexec/runas. I already also tried to play with IE security settings, my firewall and anitvirus. But problem still persists. The last option that I tired was to use VS debugger to connect to the browser and check console for js errors - but no errors where shown.
Did anyone has this kind of problems before? I will appreciate any tips how to debug this issue - because I run out of any more ideas....
Log from testcafe:
UnhandledPromiseRejectionWarning: Error: The IE 11.0.0 / Windows 10.0.0 browser disconnected. This problem may appear when a brwser hangs or is closed, or due to network issues.
at Timeout.<anonymous> (C:\Users\xxx\source\repos\ClientPortalSmokeTests\node_modules\testcafe\lib\browser\connection\index.js:23:34)
at ontimeout (timers.js:482:11)
at tryOnTimeout (timers.js:317:5)
at Timer.listOnTimeout (timers.js:277:5)
(node:23936) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async funcion without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:23936) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handld will terminate the Node.js process with a non-zero exit code.