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

IE Stability issue - WebDriverError #4325

Open
AliZuhair-AI opened this issue Jun 13, 2017 · 6 comments
Open

IE Stability issue - WebDriverError #4325

AliZuhair-AI opened this issue Jun 13, 2017 · 6 comments
Milestone

Comments

@AliZuhair-AI
Copy link

Node version: 7.4.0
Protractor version: 5.1.1
Operating system: Windows 7
Browser: Internet Explorer 11

I recently upgraded to Protractor 5.1.1 and started to seeing this error show up occasionally:

WebDriverError: JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 49 milliseconds

It seems to be coming from the following code under *\lib\browser.ts

return this.driver.wait(() => {
            return this.executeScriptWithDescription('return window.location.href;', msg('get url'))
                .then(
                    (url: any) => {
                      return url !== this.resetUrl;
                    },
                    (err: IError) => {
                      if (err.code == 13 || err.name === 'JavascriptError') {
                        // Ignore the error, and continue trying. This is
                        // because IE driver sometimes (~1%) will throw an
                        // unknown error from this execution. See
                        // https://github.com/angular/protractor/issues/841
                        // This shouldn't mask errors because it will fail
                        // with the timeout anyway.
                        return false;
                      } else {
                        throw err;
                      }
                    });

If I change the the line above from

if (err.code == 13 || err.name === 'JavascriptError')

to

if (err.code == 13 || err.name === 'JavascriptError' || err.name === WebDriverError)

then the problem goes away.

@AliZuhair-AI
Copy link
Author

AliZuhair-AI commented Jun 13, 2017

I reported this issue previously and it was closed with a reference to 4149. However, that reference is to a different issue.

@heathkit heathkit added this to the Upcoming milestone Jun 20, 2017
@modiho
Copy link

modiho commented Jun 30, 2017

I can confirm the findings of OP.

@thorn0
Copy link
Contributor

thorn0 commented Jul 7, 2017

@AliZuhair-AI Are you using Selenium Server? How does Protractor connect to IE?

@AliZuhair-AI
Copy link
Author

@thorn0 I am using BrowserStack, which uses InternetExplorerDriver

https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver

@abdulmoizeng
Copy link

@thorn0 You need do download and configure IE server file to connect it locally

For running IE locally we need to have following binary in the path

http://www.seleniumhq.org/download/

@EberhardSchneider
Copy link

I have the same issues as OP. The first IE test fails in approximately every second test run.
The changes proposed in the first post fix the issues for me locally.
Is somebody still on this?

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

No branches or pull requests

6 participants