Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

IE stability issue - occasional Javascript errors #841

Closed
juliemr opened this issue May 22, 2014 · 15 comments
Closed

IE stability issue - occasional Javascript errors #841

juliemr opened this issue May 22, 2014 · 15 comments

Comments

@juliemr
Copy link
Member

juliemr commented May 22, 2014

Example:

     UnknownError: JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 129 milliseconds
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'WIN-8LIIH1BGM1D', ip: '172.20.42.188', os.name: 'Windows Server 2008 R2', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_38'
Session ID: ce12158e-4456-4529-8cc9-b8171739c296
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{platform=WINDOWS, elementScrollBehavior=0, javascriptEnabled=true, enablePersistentHover=true, ignoreZoomSetting=false, browserName=internet explorer, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss, version=11, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, allowAsynchronousJavaScript=false, initialBrowserUrl=, handlesAlerts=true, nativeEvents=true, takesScreenshot=true}]
   Stacktrace:
     UnknownError: JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 129 milliseconds
Build info: version: '2.41.0', revision: '3192d8a', time: '2014-03-27 17:17:32'
System info: host: 'WIN-8LIIH1BGM1D', ip: '172.20.42.188', os.name: 'Windows Server 2008 R2', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_38'
Session ID: ce12158e-4456-4529-8cc9-b8171739c296
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{platform=WINDOWS, elementScrollBehavior=0, javascriptEnabled=true, enablePersistentHover=true, ignoreZoomSetting=false, browserName=internet explorer, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss, version=11, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, allowAsynchronousJavaScript=false, initialBrowserUrl=, handlesAlerts=true, nativeEvents=true, takesScreenshot=true}]
==== async task ====
WebDriver.executeScript()
==== async task ====
Timed out waiting for page to load
    at null.<anonymous> (/Users/ralphj/protractor/spec/basic/findelements_spec.js:580:13)
==== async task ====
Asynchronous test function: it()
Error
    at verifyMethodsAdded (/Users/ralphj/protractor/spec/basic/findelements_spec.js:575:3)
    at Object.<anonymous> (/Users/ralphj/protractor/spec/basic/findelements_spec.js:462:1)

These happen during the wait for the page to load about 1% of the time.

@elgalu
Copy link
Contributor

elgalu commented May 22, 2014

Did you try increasing browser.manage().timeouts().pageLoadTimeout(40000);

@juliemr
Copy link
Member Author

juliemr commented May 22, 2014

Yeah, it's interesting that it's not actually failing the timeout for the wait. The actual code being executed in the browser (return window.location.href) is causing an error. If an error occurs during a webdriver.wait, it's propagated.

@juliemr
Copy link
Member Author

juliemr commented May 22, 2014

@elgalu
Copy link
Contributor

elgalu commented May 22, 2014

Weird, you get 9 ~ 10 failures on IE11 / IE10
When I run IE11 on a close Windows 8.1 laptop i only get failures related to getCurrentUrl()
https://gist.github.com/elgalu/5569c2eb6da599cfcd63

@juliemr
Copy link
Member Author

juliemr commented May 22, 2014

Thanks for more data!

Capturing the error I often get:

{ stack: null,
  description: '\'window\' is undefined',
  number: -2146823279 }

EDIT - this doesn't seem to be the common cause

@juliemr
Copy link
Member Author

juliemr commented May 22, 2014

Tried with windows 8 on saucelabs, didn't help. I didn't see the window is undefined error anymore, but the same end result.

@juliemr
Copy link
Member Author

juliemr commented May 22, 2014

Live errors now out on Travis - https://travis-ci.org/angular/protractor/jobs/25825485

juliemr added a commit that referenced this issue May 22, 2014
This should address #841

Ignoring the error and trying again has worked for all of my test cases,
and the error has never occurred more than once in a row.
@juliemr
Copy link
Member Author

juliemr commented May 22, 2014

Tentatively closing after 0500b2c. Please comment or open a new issue if something like this crops up again!

@fakewaffle
Copy link

I'm randomly getting the same type of timeouts with Browser Stack.

@fakewaffle
Copy link

@elgalu
Copy link
Contributor

elgalu commented Sep 5, 2014

@fakewaffle, same tests always pass in Chrome-BrowserStack* right?

@fakewaffle
Copy link

Yes, and Firefox. IE is hit or miss.

@DylanLacey
Copy link
Contributor

I'm seeing similar errors, but on execute_async Selenium commands in IE. The weird thing is, digging through the IEDriver source shows that these timeouts are occurring in the browser, not in the Selenium stack. The only two causes I could think of were that either IEDriver is completely ignoring the timeouts requested by users (Causing scripts to timeout almost immediately) or the browser is having timekeeping problems.

@fakewaffle Were your failing IE tests on BrowserStack? It'd be good to eliminate emulation problems from the equation (I'm seeing these errors on Sauce Labs).

@kaililleby
Copy link

I'm getting err.code 17 on windows 10 / explorer 11 - seemingly the same cause? The messages logged are the same as described in this issue.. should if (err.code == 13) be changed to if (err.code == 13 || err.code == 17) ?

cnishina pushed a commit that referenced this issue Mar 15, 2017
The `err` object doesn't have the `code` property any more (Selenium Server Standalone 3.3.1 + IEDriver win32 3.3.0), so we need a new way to detect those errors. See #841
@yimothy
Copy link

yimothy commented May 8, 2017

This error occurs almost 100% of the time in IE11 when there are adjacent browser.get() calls. See #4268.

It seems like the Javascript error does not get ignored in this case. A quick solution for this is to just use browser.driver.get() instead of the browser.get().

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants