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

IEDriver - Page reload detected during async script #240

Closed
penfold opened this issue Nov 8, 2013 · 9 comments
Closed

IEDriver - Page reload detected during async script #240

penfold opened this issue Nov 8, 2013 · 9 comments

Comments

@penfold
Copy link
Contributor

penfold commented Nov 8, 2013

The same config and scripts work okay with Chrome & Firefox but when using IE, I get the following failure...

Selenium output:

19:34:12.396 INFO - Executing: [new session: {browserName=ie}] at URL: /session)

19:34:12.398 INFO - Creating a new session for Capabilities [{browserName=ie}]
Started InternetExplorerDriver server (32-bit)
2.37.0.0
Listening on port 23442
19:34:15.099 INFO - I/O exception (java.net.SocketException) caught when processing request: Software caused connection abort: recv failed
19:34:15.100 INFO - Retrying request
19:34:15.112 INFO - Done: /session
19:34:15.133 INFO - Executing: [set script timeoutt: 11000] at URL: /session/95af03d8-7d33-459f-9a8d-2042dab2550d/timeouts/async_script)
19:34:15.148 INFO - Done: /session/95af03d8-7d33-459f-9a8d-2042dab2550d/timeouts
/async_script
19:34:15.236 INFO - Executing: [get: about:blank] at URL: /session/95af03d8-7d33-459f-9a8d-2042dab2550d/url)
19:34:15.467 INFO - Done: /session/95af03d8-7d33-459f-9a8d-2042dab2550d/url
19:34:15.486 INFO - Executing: [execute script: window.name = "NG_DEFER_BOOTSTRAP!" + window.name;window.location.href = "http://mywebsite.com/#/login", []] at URL: /session/95af03d8-7d33-459f-9a8d-2042dab2550d/execute)
19:34:15.580 INFO - Done: /session/95af03d8-7d33-459f-9a8d-2042dab2550d/execute
19:34:15.599 INFO - Executing: [execute async script: return (function () {
var attempts = arguments[0];
var callback = arguments[arguments.length - 1];
var check = function(n) {
if (window.angular && window.angular.resumeBootstrap) {
callback(true);
} else if (n < 1) {
callback(false);
} else {
window.setTimeout(function() {check(n - 1)}, 1000);
}
};
check(attempts);
}).apply(null, arguments);, [10]] at URL: /session/95af03d8-7d33-459f-9a8d-2042d
ab2550d/execute_async)
19:34:17.225 WARN - Exception thrown
org.openqa.selenium.WebDriverException: Page reload detected during async script
(WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.08 seconds
Build info: version: '2.37.0', revision: 'a7c61cb', time: '2013-10-18 17:14:00'
System info: host: '##########', ip: '#########', os.name: 'Windows 7', os
.arch: 'x86', os.version: '6.1', java.version: '1.7.0_45'


Do you have any suggestions where I can start looking for a solution?

I'm using Protractor 0.12.0. The latest Selenium and IEDriver.

Thanks,
P

@penfold
Copy link
Contributor Author

penfold commented Nov 8, 2013

A recent commit has various workarounds for this error but now I'm getting....

'Error: Error while running testForAngular: Unable to get browser'

@juliemr
Copy link
Member

juliemr commented Nov 12, 2013

Should be fixed with 81501c5, which will be pushed out in 0.12.1 shortly.

@juliemr juliemr closed this as completed Nov 12, 2013
@penfold
Copy link
Contributor Author

penfold commented Nov 12, 2013

@juliemr Please can you re-open this issue?

I had already tried your latest commits, which were giving the message...

'Error: Error while running testForAngular: Unable to get browser'

I did also try 0.12.1 (and the latest files from master) but I'm still getting the same issue.

Could it caused by routing? On navigation to the root url of my app, if the user is not logged in an authentication directive will redirect to the login url. Is protractor trying to run an async script that then gets interrupted by a route change?

@penfold
Copy link
Contributor Author

penfold commented Nov 13, 2013

Snippet of config...

baseUrl: 'http://csdev.cascaid.co.uk'

Example test:

describe('Simple tests', function () {
    it(' should navigate to home page', function () {
        browser.get('/');
    });
});

@tracycummins
Copy link

I run into this problem as well and wrote up issue #251 .

@juliemr juliemr reopened this Nov 13, 2013
@juliemr
Copy link
Member

juliemr commented Nov 13, 2013

Looks like this issue: http://stackoverflow.com/questions/12694001/selenium-server-error-unable-to-get-browser

Can you try the solutions listed there?

@penfold
Copy link
Contributor Author

penfold commented Nov 14, 2013

You are spot on - our corporate GP was disabling Protected Mode on Intranet Zone.

The issue that I've now got is #132. So, I'll try the workaround and see how I get on.

Thanks.

@juliemr juliemr closed this as completed Nov 14, 2013
@bbaia
Copy link

bbaia commented Nov 17, 2013

You can also configure IEDriver to ignore protected mode settings:
Set "ignoreProtectedModeSettings" desired capabilities to "true"

@RajEtamsetti
Copy link

@penfold , What is that you exactly did to get rid of this issue? IEDriver - Page reload detected during async script

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

5 participants