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

Range Error : Maximum call stack size exceeded #14

Open
rameshrc opened this issue Jul 15, 2020 · 6 comments
Open

Range Error : Maximum call stack size exceeded #14

rameshrc opened this issue Jul 15, 2020 · 6 comments
Labels
bug Something isn't working

Comments

@rameshrc
Copy link

rameshrc commented Jul 15, 2020

I have application with lit-html web component. When button is clicked on a test bed html, dialog (lit-html web component) appears with ok button. I am trying to hover over it. Since no solutions of hover work for me, i tried out "cypress-nhover": "1.0.0",

cy.get('dialog').get('.ok-button', { includeShadowDom: true }).nhover()
It creates an error
get .ok-button
scrollIntoView {log: false}
RangeError
Maximum call stack size exceeded

View stack trace
Print to console
at Sizzle (http://localhost:8002/__cypress/runner/cypress_runner.js:85876:27)
at Function.Sizzle.matches (http://localhost:8002/__cypress/runner/cypress_runner.js:86505:10)
at Function.jQuery.filter (http://localhost:8002/__cypress/runner/cypress_runner.js:87883:22)
at winnow (http://localhost:8002/__cypress/runner/cypress_runner.js:87866:22)
at jQuery.fn.init.is (http://localhost:8002/__cypress/runner/cypress_runner.js:87919:13)
at findScrollableParent (http://localhost:8002/__cypress/runner/cypress_runner.js:151206:16)
at findScrollableParent (http://localhost:8002/__cypress/runner/cypress_runner.js:151214:11)
at findScrollableParent (http://localhost:8002/__cypress/runner/cypress_runner.js:151214:11)
at findScrollableParent (http://localhost:8002/__cypress/runner/cypress_runner.js:151214:11)
at findScrollableParent (http://localhost:8002/__cypress/runner/cypress_runner.js:151214:11)
at findScrollableParent (http://localhost:8002/__cypress/runner/cypress_runner.js:151214:11)
at findScrollableParent (http://localhost:8002/__cypress/runner/cypress_runner.js:151214:11)
at findScrollableParent (http://localhost:8002/__cypress/runner/cypress_runner.js:151214:11)
at findScrollableParent (http://localhost:8002/__cypress/runner/cypress_runner.js:151214:11)
at findScrollableParent (http://localhost:8002/__cypress/runner/cypress_runner.js:151214:11)

Chrome 75
"dependencies": {
"lit-element": "^2.3.1"
},
"devDependencies": {
"@open-wc/testing": "^2.0.0",
"@open-wc/testing-karma": "^3.0.0",
"@types/node": "13.11.1",
"chrome-remote-interface": "0.28.2",
"concurrently": "^5.1.0",
"cypress": "^4.10.0",
"cypress-nhover": "1.0.0",
"deepmerge": "^3.2.0",
"es-dev-server": "^1.54.1",
"start-server-and-test": "^1.11.0",
"tslib": "^2.0.0",
"typescript": "^3.9.5"
}

@avallete
Copy link
Owner

Hi,

cypress-nhover doesn't do any special thing to handle shadowDOM, that is probably the cause of the error.

If you can provide a MWE either into another repo or some third party public environment (like stackblitz.com) it may be a good start for me to investigate what is the root of the crash.

@avallete avallete added the question Further information is requested label Jul 15, 2020
@rameshrc
Copy link
Author

Hi,

cypress-nhover doesn't do any special thing to handle shadowDOM, that is probably the cause of the error.

If you can provide a MWE either into another repo or some third party public environment (like stackblitz.com) it may be a good start for me to investigate what is the root of the crash.

Please find test repo in here lithtml

@rameshrc
Copy link
Author

Sorry forgot to add test files. Added them now

@avallete
Copy link
Owner

Thank's for your help @rameshrc. I know it sounds like a ping-pong game, but the issue doesn't seem to come from the plugin itself. (see my comment here cypress-io/cypress#7986).

I'll be trying to find a way to fix the root of this issue into cypress. I may also try to look for a quick and dirty fix who would make the call to scrollIntoView optional to avoid this error.

@avallete
Copy link
Owner

After trying some tests, the issue isn't only due to scrollIntoView(even if it's the first part). Because when I remove the call from the command, then the command fails to retrieve the component into the shadowDom via CDP.

Right now I don't have any clue about how to deal with that, it will require more digging and a bunch of time. To understand how to make it work.

@avallete avallete added bug Something isn't working and removed question Further information is requested labels Jul 18, 2020
@avallete
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants