cancel
Showing results for 
Search instead for 
Did you mean: 

iexplore main window not found and RPC server unavailable

SOLVED
Highlighted
Contributor

iexplore main window not found and RPC server unavailable

This post is actually about two issues. I doubt the second one has anything to do with TestComplete but thought someone here might have seen it and be able to comment on it and both appear in the image of the log snapshot I've attached. 

 

the first issue has to do with the Sys.WaitBrowser statement. I am testing my web functionality with four separate browsers (iexplore, firefox, chrome and edge). at the start of each test iteration, i pass the string value of the browser being tested into a script that ensures a copy of that browser is not already active and closes it if it is. i've ensured that no browser was running when i started the test that produced the attached log. Note the Time Diff (sec) column of the log when checking "iexplore" and when checking "firefox". Why does it take a full minute for TestComplete to realize that there's not an IE browser running and less that 5 seconds to do the same task for firefox? Below is the vbscript code that both checks are using. As you can see i"ve tried to shorten any check to 2 seconds both in the Options.Run.Timeout and in the Timeout parameter of the Sys.WaitBrowser method but it still takes a minute. I've noticed the same delay with edge but not with chrome.

 

Sub BrowserCheck(browser)
Log.Message "Browser = " + browser
Options.Run.Timeout = 2000
If Sys.WaitBrowser(browser, 2000).Exists Then
Sys.Browser(browser).Close
End If
End Sub

 

 

The second issue is the RPC Server unavailable. I found this article online

https://helpdeskgeek.com/help-desk/how-to-fix-rpc-server-is-unavailable-error-in-windows/

and went through everything it suggested but everything it mentioned (services, Network, registry settings) was already set up correctly on my workstation. The project suite i was running when i took the snapshot of the attached log was running four keyword tests. The first ran through all four browsers successfully. The image is of the second keyword test in the project. It completed the IE iteration of the test but got the RPC server error on Firefox. Once the RPC error started all the tests following that falied on Internet Explorer with the same error. As i said, I'm fairly certain this has nothing specifically to do with TestComplete but just though maybe someone out there has had to deal with this. 

 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: iexplore main window not found and RPC server unavailable

As @BenoitB , there could be an iexplore process running in your Windows environment that doesn't have a UI... this is a pain in my side with regards to iexplore.. even when you close the browser manually, sometimes that process remains memory resident.  So, your WaitBrowser process FOUND the browser... but couldn't call the "Close" command because there was no window to close.

What I've taken to doing is, rather than attempting the "Close", I'd actually use "Terminate" to kill the process entirely.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

3 REPLIES 3
Highlighted
Community Leader

Re: iexplore main window not found and RPC server unavailable

Beware of that iexplore process could be used by another application or Windows itself and then as no dedicated window of this process is available the closing process could be erratic (invisible confirm dialog e.g.).

 

You can reduce time with setting a maximum time of closing:

Sys.Browser(browser).Close(10000);

 

And to be more robust, manage confirm or #32770 dialog that can appear.

 

Unless that i don't know, never had this problem.

 

About RPC error, i've had it (not in TestComplete) and it was a nightmare to get rid of .. Sort of Windows inside settings...

 

 

 

Un sourire et ça repart

Highlighted
Community Hero

Re: iexplore main window not found and RPC server unavailable

As @BenoitB , there could be an iexplore process running in your Windows environment that doesn't have a UI... this is a pain in my side with regards to iexplore.. even when you close the browser manually, sometimes that process remains memory resident.  So, your WaitBrowser process FOUND the browser... but couldn't call the "Close" command because there was no window to close.

What I've taken to doing is, rather than attempting the "Close", I'd actually use "Terminate" to kill the process entirely.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available

View solution in original post

Highlighted
Contributor

Re: iexplore main window not found and RPC server unavailable

I changed my Browser check routine to the following (incorporating the suggestions from both  @BenoitB and @tristaanogre). The result can be seen in the attached image. IE starts right up now AND (i'm guessing the two issues must have been related somehow because) I have not see the RPC error the last two or three time I have executed the project suite. SWEEEEET!  I gave kudos to both but accepted @tristaanogre as the solution. I initially just tried @BenoitB suggestion which helped but it seemed to be even better once I added the Terminate specifically for IE.

 

Thanks for your help

New Here?
Join us and watch the welcome video:
Top Kudoed Authors