This repository was archived by the owner on Mar 19, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Infinitely looping when injecting axe-core #63
Comments
stephenmathieson
added a commit
that referenced
this issue
Jun 20, 2018
This patch prevents `axe-webdriverjs` to infinitely recurse when injecting `axe-core` into `<iframe>`s. Instead of looping forever, we'll recurse 10 times before giving up. Closes #63.
stephenmathieson
added a commit
that referenced
this issue
Jun 21, 2018
This patch prevents `axe-webdriverjs` to infinitely recurse when injecting `axe-core` into `<iframe>`s. I've re-written the code we use for injecting which will only recurse as deep as the number of nested `<iframe>`s on the page. In order to keep the code "easy to read/write", I've used `async/await` rather than chaining `Promise`s together. Because we do not have a clear picture of what Node.js versions we need to support here, I've added Babel in order to ensure `async/await` works in older Nodes. It is currently setup use support Node v4. A test case has been added ensuring this solves the problem described in #63. Closes #63.
stephenmathieson
added a commit
that referenced
this issue
Jun 22, 2018
stephenmathieson
added a commit
that referenced
this issue
Jun 22, 2018
We shouldn't rely on the state of 3rd-party endpoints in our tests. Additionally, the client may not want us hitting their URLs this way.
stephenmathieson
added a commit
that referenced
this issue
Jun 22, 2018
This patch prevents `axe-webdriverjs` from infinitely recursing when injecting `axe-core` into `<iframe>`s. I've re-written the code we use for injecting which will only recurse as deep as the number of nested `<iframe>`s on the page. In order to keep the code "easy to read/write", I've used `async/await` rather than chaining `Promise`s together. Because we do not have a clear picture of what Node.js versions we need to support here, I've added Babel in order to ensure `async/await` works in older Nodes. It is currently setup use support Node v4. Closes #63.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Uh oh!
There was an error while loading. Please reload this page.
Attempting to get an analysis on https://buy.garmin.com/en-US/US/p/591046 causes
axe-webdriverjs
to hang forever. Based on selenium logs (and my own hackyconsole.log
debugging), it looks likeaxe-webdriverjs
is getting stuck infinitely recusing when attempting to injectaxe-core
into each frame.I'm not sure why it's stuck in a loop here, as it seems to work just fine elsewhere. If I manually remove the Facebook "like" widget from the page (and its
<iframe>
s), the issue seems to disappear. I will continue looking into the root cause.As a quick "band-aid", I suggest adding a maximum recursion depth of ~10. This
will prevent
axe-webdriverjs
from recursing too much and/or getting "stuck".Reproduction Steps
Here's the test script I've been using:
Logs
Logs from the Node script:
The outputted
selenium-logs
file is several MB, so I'm not sharing the entire thing. Instead, here's an excerpt of the loop:The text was updated successfully, but these errors were encountered: