Failed to execute 'scrollTo' on 'Window': No function was found that matched the signature provided.
See original GitHub issueIt seems like the combo of Cypress/Electron doesn’t like:
window.scrollTo({
behavior: 'smooth',
top: 0,
})
as I get this error:
Failed to execute 'scrollTo' on 'Window': No function was found that matched the signature provided.
To get around this, I’m currently doing:
try {
window.scroll({
behavior: 'smooth',
top: 0,
})
} catch(err) {
if (err instanceof TypeError) {
window.scroll(0, 0)
} else {
throw err
}
}
Current behavior:
Failed to execute 'scrollTo' on 'Window': No function was found that matched the signature provided.
This error originated from your application code, not from Cypress.
When Cypress detects uncaught errors originating from your application it will automatically fail the current test.
This behavior is configurable, and you can choose to turn this off by listening to the 'uncaught:exception' event.
https://on.cypress.io/uncaught-exception-from-application
This error originated from your application code, not from Cypress.
When Cypress detects uncaught errors originating from your application it will automatically fail the current test.
This behavior is configurable, and you can choose to turn this off by listening to the 'uncaught:exception' event.
https://on.cypress.io/uncaught-exception-from-application
Uncaught TypeError: Failed to execute 'scrollTo' on 'Window': No function was found that matched the signature provided.
This error originated from your application code, not from Cypress.
When Cypress detects uncaught errors originating from your application it will automatically fail the current test.
This behavior is configurable, and you can choose to turn this off by listening to the 'uncaught:exception' event.
Desired behavior:
Similar behavior to Chrome—work without error.
Steps to reproduce:
Run a headless test on code that has the following:
window.scrollTo({
behavior: 'smooth',
top: 0,
})
Versions
"cypress": "^3.1.1",
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Failed to execute 'scroll' on 'Window': No function was found ...
Chrome only error: Failed to execute 'scroll' on 'Window': No function was found that matched the signature provided · javascript · cross-browser.
Read more >Failed to execute "scrollTo" on "Window" - GSAP - GreenSock
The ScrollTo plugin has been working perfectly with exactly the same code for the last 4 or 5 months as I developed this...
Read more >Chrome only error: Failed to execute 'scroll' on 'Window': No ...
Failed to execute 'scroll' on 'Window': No function was found that matched the signature provided. The code is inside an inline event:
Read more >Window.scrollTo() - Web APIs | MDN
Window.scrollTo() scrolls to a particular set of coordinates in the document.
Read more >Failed to execute 'scrollTo' on 'Window': No function was found ...
Failed to execute 'scrollTo' on 'Window': No function was found that matched the signature provided. vue项目在本地使用scrollTo这个方法的时候没有 ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

The issue was closed by the original person who opened this. We can reopen until newer version of Electron is released.
Electron was updated to Chrome 61 in Cypress version 3.3.0 and this issue should be fixed.