webdriverio: [🐛 Bug]: element.scrollIntoView() throws "Request failed with status 500 due to move target out of bounds: move target out of bounds"
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
WebdriverIO Version
latest
Node.js Version
18.17.1
Mode
WDIO Testrunner
Which capabilities are you using?
N/A, not configured from initial wdio wizard.
What happened?
When using element.scrollIntoView() the error/ warning “Request failed with status 500 due to move target out of bounds: move target out of bounds” is thrown even if the scrollIntoView() is executed successfully
What is your expected behavior?
If a move target is in boundary (is currently on the screen and visible), scrolling to it shouldn’t throw an error that the target is out of bounds. In this example Sonos.com’s main “Shop” button on the top navigation-bar.
How to reproduce the bug.
Clone this repo, follow the readme, see the output.
Relevant log output
npm run wdio
> wdio
> wdio run ./wdio.conf.js
Execution of 1 workers started at 2023-12-13T23:48:54.651Z
[0-0] RUNNING in chrome - file:///test/specs/wdiobug.test.js
[0-0] Will trigger "Request failed with status 500"
[0-0] 2023-12-13T23:49:09.006Z ERROR webdriver: Request failed with status 500 due to move target out of bounds: move target out of bounds
[0-0] (Session info: chrome=120.0.6099.71)
[0-0] PASSED in chrome - file:///test/specs/wdiobug.test.js
"spec" Reporter:
------------------------------------------------------------------
[chrome 120.0.6099.71 mac #0-0] Running: chrome (v120.0.6099.71) on mac
[chrome 120.0.6099.71 mac #0-0] Session ID: 6a5c6510f6bd7785d1caf445b04e4656
[chrome 120.0.6099.71 mac #0-0]
[chrome 120.0.6099.71 mac #0-0] » file:///test/specs/wdiobug.test.js
[chrome 120.0.6099.71 mac #0-0] WDIO Bug
[chrome 120.0.6099.71 mac #0-0] ✓ element.scrollIntoView() still sending status 500
[chrome 120.0.6099.71 mac #0-0]
[chrome 120.0.6099.71 mac #0-0] 1 passing (14.7s)
Spec Files: 1 passed, 1 total (100% completed) in 00:00:17
### Code of Conduct
- [X] I agree to follow this project's Code of Conduct
### Is there an existing issue for this?
- [X] I have searched the existing issues
About this issue
- Original URL
- State: closed
- Created 7 months ago
- Reactions: 3
- Comments: 40 (28 by maintainers)
Commits related to this issue
- (webdriver): don't retry 'move target out of bounds' errors - fixes #11866 — committed to webdriverio/webdriverio by christian-bromann 4 months ago
- (webdriver): don't retry 'move target out of bounds' errors - fixes #11866 — committed to webdriverio/webdriverio by christian-bromann 4 months ago
- (webdriver): don't retry 'move target out of bounds' errors - fixes #11866 — committed to amaanbs/webdriverio by christian-bromann 4 months ago
I would think it should be suppressed as
logLevel: errorshould indicate it only logs actionable errors. In this case, there’s nothing actionable for the engineer working on tests that print out this message.I pushed another fix that removes the error message.
Something I suggest to add to the list is amend the error message to tell folks that this error message can be ignored as WebdriverIO attempts to recover from it. It might even make sense to change the logLevel here to
debug.@WillBrock I pushed a release yesterday which included https://github.com/webdriverio/webdriverio/pull/12383 that should resolve the issue. I think we can close the issue.
Confirmed still happening even when updating my test repro repo to latest wdio release @christian-bromann https://github.com/spencerlavallesonos/wdio-bug-scrollIntoView
It’s just the same thing what the original poster put in the description with the repo linked.
https://github.com/spencerlavallesonos/wdio-bug-scrollIntoView
@ivanovicuros can you make sure to update all your WebdriverIO dependencies (make sure you nuke your package-lock.json and reinstall everything)? As mentioned above this should be fixed now. If you still see this after updating, mind providing a reproducible example?
I can verify that I don’t have
outputDirin my config.I’m noticing this issue as well while I’m updating to v8.
I may take a look at some point after I fix some other things.