Jump to content

Recommended Posts

Posted (edited)

This is not the first time this problem has shown its face but last time I just reinstalled windows and everything worked fine again, till now. I really don't want to have to reinstall windows every time though so maybe someone has an idea on how I could fix this.

At the moment I'm doing some automation and I am going from Linux to a VM of Windows (SSH using cygwin on Windows), which isn't a problem and all the scripting has been working fine. The problem is, now, that when my script creates an Internet Explorer (_IECreate()) it returns

IE.au3 V2.4-0 Error from functions _IECreate (Browser Object Creation Failed

With an @error of 1.

I look in windows task manager and the IExplorer.exe process is running so it is getting created. Anywhere _IECreate() is being called the error occurs so the following code will produce the above error for me

#include <IE.au3>

$oIE = _IECreate("google.com")
_IENavigate($oIE, "yahoo.com", 1)
_IEQuit($oIE)

Everything was working fine yesterday, I've been using IE.au3 (and the SSH part) for most, if not all, of what I've been doing and it has been working fine. I can't think of what has changed on my system that would have caused this.

Also the script runs fine, no errors, if I run it in windows. The only time it gives me that error is if I am SSH'd into windows running the script.

I have tried:

-Rebooting both VM Windows and Linux

-Making sure no IExplorer.exe processes is running

-Checking user permissions (just in-case)

-Deleting offline content, cookies, etc,... in Internet Explorer.

-Reinstalling Internet Explorer (version 7)

-Deleting and Reinstalling Auto-It

Edited by GSM
Posted

This would be caused by the code

ObjCreate("InternetExplorer.Application")
not returning an object... Can you try the VBScript equivalent CreateObject("InternetExplorer.Application") and see what that does?

Posted

I'm assuming I just change ObjCreate("InternetExplorer.Application") to CreateObject("InternetExplorer.Application") inside of IE.au3

And if that is the case it gives me the same error.

Posted

Perhaps a silly question, but do you perhaps have two machines in your network with the same IP address? Take some steps to insure that your SSH is connecting to the expected machine...

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Posted (edited)

@GSM: That will just give you an error for an unrecognized function. He meant try the VBScript equivalent in a VBScript to see if it fails that way as well - indicating an environment problem vice an AutoIt problem.

;)

Edit: Replying to GSM, not Dale.

Edited by PsaltyDS
Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted

@DaleHohm: It is definitely connecting to the right machine.

As for the VBScript does anyone have a example of what it should do just to test. I'm guessing more then just CreateObject("InternetExplorer.Application")

Posted

Are you saying that this works over SSH, then it fails, you reboot the VM and it still fails, then suddenly it works again? Or once it stops working you've only gotten it back after rebuilding Windows?

VBS Code:

Set oIE = CreateObject("InternetExplorer.Application")
oIE.visible = true
oIE.Navigate "http://www.autoitscript.com"

Also, sorry to be skeptical, but I've done support for too many years... how did you verify that you connect to the correct machine?

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Posted

The Vb script would be something like:

dim ie
set ie = CreateObject("InternetExplorer.Application")
ie.Visible=True

put that in .vbs file, run it, and see if IE comes up.

Like the penguin says, it's a test to see if something specific to AutoIt is causing the problem (Anti-virus, DEP, permissions) or if its something related to the InternetExplorer.Application object, or general COM objects.

Posted (edited)

@DaleHohm: I was mostly assuming because I am SSH'd into the vm Windows and can see my scripting files that no one else has. How else would you verify it?

Also running the script in windows works fine, which wasn't a problem. In linux, ssh into windows and running the script gives me syntax errors and commands not found.

@DaleHohm: As for this entire problem I'm not sure what started it. Yesterday everything was running fine. Then today it start giving me that error. So I did the things listed, posted that, then restarted both the VM Windows and Linux that it runs on and it worked fine for a bit. The automation was getting done, IExplorers were being made and used properly. Then a little while ago the error came back. I've restarted both since then. I have also installed IE 7 and IE 8 and neither seemed to work. Now I'm back to IE 7. Before any of this I was using IE 6.

Edited by GSM
Posted

Also running the script in windows works fine, which wasn't a problem. In linux, ssh into windows and running the script gives me syntax errors and commands not found.

You mean the AutoIt script you posted earlier, or did you try the VBScript? We're looking for if the VBScript works when SSH'd in to the Windows box.

;)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Posted (edited)

The VBScript I used (vbtestfile.vbs)

Set oIE = CreateObject("InternetExplorer.Application")
oIE.visible = true
oIE.Navigate "http://www.autoitscript.com"

The VBscript gave me this exactly:

./vbtestfile.vbs: line 1: syntax error near unexpected token '('
./vbtestfile.vbs: line 1: 'Set oIE = CreateObject("InternetExplorer.Application')

And this was on linux ssh into windows

I also tried evilertoaster's which was

dim ie
set ie = CreateObject("InternetExplorer.Application")
ie.Visible=True

and it gave me this

line 1: dim: command not found
line 2: syntax error near unexpected token '('
line 2: 'set ie = CreateObject("InternetExplorer.Application"'

I'll have to continue this tomorrow I need to head out now.

Thanks for the help so far guys.

Edited by GSM
Posted

./vbtestfile.vbs: line 1: syntax error near unexpected token '('
./vbtestfile.vbs: line 1: 'Set oIE = CreateObject("InternetExplorer.Application')

Those sure look like unix shell error messages and not VBS interpreter messages...

Perhaps a good night's sleep will help?

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Posted

Ya they are. I was just running it like I run the other scripts.

I know I'm doing something wrong, haven't used VBS at all...

Posted (edited)

Alright. Sorry for the delay.

So I ran the vbs like you said (ssh into windows and did CScript vbtestfile.vbs) Hopefully I'm doing that right now. It return

C:\vbtestfile.vbs(2,1) Microsoft VBScript runtime error: Permission denied: 'CreateObject'

Once more the vbtestfile.vs looks like this

dim ie
set ie = CreateObject("InternetExplorer.Application")
ie.Visible=true

I went ahead and made sure the user I'm logging into has full permissions over vbtestfile.vbs and the folder it is in. Not sure if that was part of the problem but it still gives me the same permission denied error.

Edited by GSM
Posted

Yes, you are running it correctly, and yes, the error message is the core of the problem, and no, it is not an AutoIt issue.

Suggest you Google something like "Permission denied: 'CreateObject' internetexplorer,application" and you will find many others with the same problem and with some digging I'll wager you'll find your resolution.

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Posted (edited)

I believe I found the problem. Had something to do with the permissions that the user was getting from Cygwin. I went ahead and just deleted the auto login keys and it has been working fine for awhile now. Wondering how that got changed...

Thanks for all the help ;)

Edited by GSM

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...