-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp4-importantViolate documented behavior or significantly improves performance (priority)Violate documented behavior or significantly improves performance (priority)
Description
Describe the bug
While waiting for expect.element to resolve, prettyDOM will be called on every attempt and its going to send the whole body as dom parameter. This makes memory usage go wild and at some point it goes OOM. Can confirm removing prettyDom usage in following line fixes the issue:
| const error = new Error(`Cannot find element with locator: ${asLocator('javascript', selector)}\n\n${prettyDOM(container)}`) |
IDK how Im the first person to notice this bug... I wonder if Im missing a config param or something.
Reproduction
Had to reproduce it on private codebase so I cant really share code here.
After removing the prettyDOM call, all tests pass successfully:
System Info
System:
OS: macOS 15.1.1
CPU: (14) arm64 Apple M3 Max
Memory: 8.26 GB / 36.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.12.2 - ~/.nvm/versions/node/v20.12.2/bin/node
Yarn: 4.5.1 - ~/.nvm/versions/node/v20.12.2/bin/yarn
npm: 10.5.0 - ~/.nvm/versions/node/v20.12.2/bin/npm
Browsers:
Chrome: 131.0.6778.205
Safari: 18.1.1Used Package Manager
yarn
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp4-importantViolate documented behavior or significantly improves performance (priority)Violate documented behavior or significantly improves performance (priority)
Type
Projects
Status
Approved