question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IE Stability issue - WebDriverError

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
AliZuhair-AIcommented, 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.

0reactions
EberhardSchneidercommented, Jan 11, 2019

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?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to open IE11 driver instance using Selenium ...
You cannot open IE browser instance if Protected Mode settings are not the same for all zones OR if the browser is zoomed....
Read more >
Top 10 Selenium Exceptions and How To Handle These ...
Handling Exceptions in Selenium WebDriver - In this tutorial we will learn about types of exceptions and how to handle top 10 most...
Read more >
Selenium WebDriver -- Fix for 3 common IE errors - YouTube
http://www.joecolantonio.comThis video shows you how to fix three of the most common Selenium WebDriver IE issues :-Protected Mode settings ...
Read more >
angular/protractor - Gitter
Just an update. Found some questions on Stackoverflow pointing to using $interval instead of $timeout resulting in protractor not waiting for the timeout....
Read more >
selenium-webdriver 0.1.3 → 0.1.4 - Diffend
+ * Improve IE driver stability, IE9 support ... + * Fix bug where Element#disabled? would alternate between true/false (r11438).
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found