0

I am running tests that needs to open a new instance of IE everytime for new test. My first test passes and closes the IE at the end and then my next test has to open a new IE but It failing at that point and giving me following error

 SetUp method failed. System.Runtime.InteropServices.COMException : Creating an instance of the COM component with CLSID {0002DF01-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 800704a6.
at WatiN.Core.IE.CreateNewIEAndGoToUri(Uri uri, LogonDialogHandler logonDialogHandler, Boolean createInNewProcess)

at WatiN.Core.IE..ctor()

I am currently running them using teamcity v5.1.4, nunit 2.5.5, watin 2.0 on a windows 7 machine with .net framework 3.5

Following is the code where its failing.

<TestFixtureSetUp()> _
Public Sub Setup()
    System.Threading.Thread.Sleep(100)
    _internetExplorer = New IE()
    LoginUser()
    CheckForDataBase()
End Sub

<TestFixtureTearDown()> _
Public Sub TearDown()
    Logout()
    _internetExplorer.Close()
End Sub

Any idea what could be reason for this

atif
  • 1
  • 2
  • After googling error 800704a6, it seems that it is javascript error. Do you think you can debug you code to be able to see the javascript console the second time it opens the browser ? Also, do you have this behavior only in teamcity or can you reproduce it by running manually nuni-console ? – Baptiste Pernet Dec 15 '10 at 16:33
  • Yes this error is occuring only when I run tests through teamcity. Working fine when running from nunit locally or via cc.net. – atif Dec 16 '10 at 08:36

2 Answers2

1

800704a6= error ERROR_SHUTDOWN_IS_SCHEDULED from win32. Is a reboot pending?

Sheng Jiang 蒋晟
  • 15,125
  • 2
  • 28
  • 46
  • This was a problem for me on one server, stopped a process from spawning, had to reboot. I was getting "Could not create instance" and the 800704a6 error code. – Nick Josevski Jan 10 '12 at 01:38
0

I suggest you have a look at this Q&A session. There are lots of informations concerning your problem. It can be related to the fact that updates are scheduled on your server.

Community
  • 1
  • 1
Baptiste Pernet
  • 3,318
  • 22
  • 47
  • Just found out that teamcity is not running the testfixture method again. I have a textfixture method that at the start calls a setup method and at the end call a teardown method as I am setting few things before and after the tests. It seems at first when its called it works fine but when It is called again in another file containing some other tests it fails and give the above mentioned error. I tried copying all the tests in one file and it works fine. I have seen this behavior only when running through teamcity. With cc.net and locally all works fine. any ideas – atif Dec 16 '10 at 10:17
  • Is your teamcity running as a service ? or as a console ? If it is as a service, you have to run it thought real user (that belongs to Administrator group), not as Local System. – Baptiste Pernet Dec 16 '10 at 11:18
  • My teamcity service is running from console. – atif Dec 16 '10 at 11:47