Sign in to follow this  
Followers 0
sherkas

Browser has been deleted, _iecreate failure

7 posts in this topic

Ive been working on a great script the last two weeks. Everything is ironed out and working great. All my IE calls are solid and working. Today I go into the business to test the latest code and using the EXACT code from yesterday that worked, does not today.

There site is an internal one, which is added to there trusted zones on their browsers. It is in IE8, all environments are windows 7.

Now it was working yesterday, but today when creating a blank browser it works. I can navigate that browser to google.com and it works just fine. As soon as I navigate it to there internal site that object reference is no longer valid. I get the Browser has been deleted error. I cannot use that reference any longer.

Ive tried getting the window handle after creation and using that at the later point when this happens... no luck. Ive tried reattaching via the title and no luck. Ive tried many ways to get around this however it comes back to the problem of, it worked yesterday but not today.

 

Any suggestions on where to go? Im hoping it fixes itself overnight, but is there any way to deal with this error? It happens on multiple computers (4 tested) and they all run into the same error. So I know its not just one user messing up their settings.

The real kicker is, there is one computer (out of a possible 5) that is pretty much identical to the rest except it runs on that one just fine. Same code, same OS, same everything. Why is this happening?

Share this post


Link to post
Share on other sites



Sounds like you are moving between zones. Check the one computer where it works to see what zone their internal site resides in. Otherwise, you should be able to reattach to the IE instance using _IEAttach.

Share this post


Link to post
Share on other sites

The error does exist on the internet and here '?do=embed' frameborder='0' data-embedContent>>

That explains more and similarly whats going on. The error exactly is:--> IE.au3 T3.0-1 Error from function _IELoadWait, $_IEStatus_ClientDisconnected (-2147417848, Browser has been deleted prior to operation.)

 

@Danp2 It does sound like that and the internal site is in the Trusted Sites zone and when comparing both computers, it seems the security settings are identical. So this is where the issue may of course be but it looks properly done (they are listed as a trusted site). I will try today and remove them from that to see if then its not passed as something else. I did try an attach after navigating to the site anyways but it still errors out after the attach.

Ive tried all the suggestions in the above link and none have worked so far. I will keep trying though

Share this post


Link to post
Share on other sites

I got the same problem here. My script works very well outside an intranet, but when I run the same script on a computer in this intranet, I got the following error:

IE.au3 T3.0-2 Error from function _IELoadWait, $_IESTATUS_ClientDisconnected (-2147023179, Browser has been deleted prior to operation.)

The difference is, the site this script tries to access is outside of the intranet.

Any workarounds?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Quoted from AutoIt Function Descrition for _IELoadWait()

Browser scripting security restrictions may sometimes prevent _IELoadWait() from guaranteeing that a page is fully loaded and can occasionally result in untrapped errors.
In these cases you may need to avoid calling _IELoadWait() and attempt to employ other methods of insuring that the page load has completed.
These methods might include using a Sleep command, examining browser status bar text and other methods. When using functions that call _IELoadWait() for objects other than the InternetExplorer (browser) object, you may also be successful by calling _IELoadWait() for the browser yourself (e.g. _IELoadWait($oIE)).

The most common causes of trouble are page redirects and cross-site scripting security restrictions associated with frames. Page re-writing techniques employed by some applications (e.g. Gmail) can also cause trouble here.

 So if we want our scripts to work across zone, we may have to avoid calling _IELoadWait()

 

Edit 1: we can't because many other function calls like _IECreate() automatically calls _IELoadWait()... Stuck?

Edit 2: Found this interesting post from @MrMitchellhttps://www.autoitscript.com/forum/topic/143664-loadwait-error/?do=findComment&comment=1012384

What's the _IEAttach() method they were talking about in these threads? I read the function description and examples and can't understand it. Are they referring to reattaching an $oIE variable to an IE window that already exists by matching some patterns about this window? Could anyone give an quick example?

Edited by HuaAi
New ideas

Share this post


Link to post
Share on other sites

You can turn off calling the _IELoadWait function inside of the other _IE functions by setting the $iWait parameter to false or 0.


If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0