WatiN, NUnit, and CruiseControl.NET-- Error Message 800704a6

When starting a test suite in NUnit with WatiN via CruiseControl.NET (as a service), this error appears:

SetUp : System.Runtime.InteropServices.COMException : Creating an instance of the COM component with CLSID {0002DF01-0000-0000-000-000000000046} from the IClassFactory failed due to the following error: 800704a6. TearDown : System.NullReferenceException : Object reference not set to an instance of an object. 

This error was a nightmare for debugging because it is not consistent (25% percent of the time occurs) and is not reproduced. Anyone have similar problems?

+4
source share
2 answers

Restart your computer

Windows updates appear that make it difficult to create new COM objects.

Looking back at ServerFault and StackOverflow, I found a few posts that mention error code 800704a6 .

This, in particular, made him click me - https://serverfault.com/questions/179156/ie8-script-error-800704a6 , indicating that the error code was like ERROR_SHUTDOWN_IS_SCHEDULED

I also had this error:

Creating an instance of the COM component with CLSID {0002DF01-0000-0000-000-000000000046} from the IClassFactory failed due to the following error: 800704a6

+4
source

AFAIK WatiN needs a user work (such as a desktop) to work. Thus, I assume the following:

  • you use the CruiseControl.Net service as a regular user account
  • this account (usually) is registered on the server hosting CruiseControl.Net.
  • tests fail if there is no desktop session

Previously, this was enough to check the box "Allow service to interact with the desktop" ("Service Properties", "Logon" tab), but I'm not sure if this still works after Vista. What will work (but in an ugly, hacky) launch of CruiseControl.Net from the console, in a desktop session instead of a service.

+2
source

Source: https://habr.com/ru/post/1304392/


All Articles