Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Runtime issue: TypeError: Cannot read property '0' of undefined #1306

Closed
WilcoFiers opened this issue Jan 7, 2019 · 3 comments · Fixed by #1341
Closed

Runtime issue: TypeError: Cannot read property '0' of undefined #1306

WilcoFiers opened this issue Jan 7, 2019 · 3 comments · Fixed by #1341
Labels
core Issues in the core code (lib/core) fix Bug fixes

Comments

@WilcoFiers
Copy link
Contributor

I got the following error running axe on https://www.luckyscript.me/

TypeError: Cannot read property '0' of undefined
    at chrome-extension://lfmcehohgifnaodaogknapedjiaoebgo/adapter.bundle.js:68:165689
    at Array.every (<anonymous>)
    at chrome-extension://lfmcehohgifnaodaogknapedjiaoebgo/adapter.bundle.js:68:165657
    at Array.forEach (<anonymous>)
    at Object.i.filteredRectStack (chrome-extension://lfmcehohgifnaodaogknapedjiaoebgo/adapter.bundle.js:68:165601)
    at Object.i.getBackgroundStack (chrome-extension://lfmcehohgifnaodaogknapedjiaoebgo/adapter.bundle.js:68:165915)
    at Object.i.getBackgroundColor (chrome-extension://lfmcehohgifnaodaogknapedjiaoebgo/adapter.bundle.js:68:167120)
    at Object.evaluate (chrome-extension://lfmcehohgifnaodaogknapedjiaoebgo/adapter.bundle.js:68:96067)
    at v.run (chrome-extension://lfmcehohgifnaodaogknapedjiaoebgo/adapter.bundle.js:37:8511)
    at chrome-extension://lfmcehohgifnaodaogknapedjiaoebgo/adapter.bundle.js:37:12495
@WilcoFiers WilcoFiers added fix Bug fixes core Issues in the core code (lib/core) labels Jan 7, 2019
@stephenmathieson
Copy link
Member

Is this a bug with axe-core itself, or a problem in the extension? Looking at the provided stacktrace, it looks like it's coming from the extension.

@stephenmathieson
Copy link
Member

This is a bug in axe-core itself. Sometimes one of these rects are undefined.

I haven't figured out why yet.

stephenmathieson added a commit that referenced this issue Jan 16, 2019
This patch adds a safeguard to `color.filteredRectStack` which prevents a `TypeError: Cannot read property '0' of undefined` from being thrown.

This is not a perfect solution, but a stop-gap instead. It's still unclear why we're getting `undefined` here. More investigation is needed, but this can happen at a later date.

Closes #1306 and #1259.
stephenmathieson added a commit that referenced this issue Jan 17, 2019
This patch adds a safeguard to `color.filteredRectStack` which prevents a `TypeError: Cannot read property '0' of undefined` from being thrown.

This is not a perfect solution, but a stop-gap instead. It's still unclear why we're getting `undefined` here. More investigation is needed, but this can happen at a later date.

Closes #1306 and #1259.
@stephenmathieson
Copy link
Member

Reopening this to remind us to look into the root cause of this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Issues in the core code (lib/core) fix Bug fixes
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants