Reputation: 281
When running a suite of tests in NUnit with WatiN through 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 has been a nightmare to debug because it is not consistent (happens 25% percent of the time) and is not reproducible. Has anyone has any similar issues?
Upvotes: 4
Views: 2665
Reputation: 4216
There are windows updates getting in the way of instantiating new COM objects.
After looking around on ServerFault and StackOverflow, I found several posts that mention the 800704a6
error code.
This one in particular made it click for me - https://serverfault.com/questions/179156/ie8-script-error-800704a6 stating that the error code was like to be ERROR_SHUTDOWN_IS_SCHEDULED
I had that exact error too:
Creating an instance of the COM component with CLSID
{0002DF01-0000-0000-000-000000000046} from the IClassFactory
failed due to the following error: 800704a6
Upvotes: 4
Reputation: 32684
AFAIK WatiN needs a user (i.e. desktop) session to work. Thus my guess is:
It used to be enough to check the box "Allow Service to Interact with Desktop" (Service Properties, tab "Log On"), but I'm not sure this still works after Vista. What will work (but in an ugly, hackish way) is running CruiseControl.Net from console, in a desktop session instead of as a service.
Upvotes: 2