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

Error: failed to find element matching selector inside CapturingBrowser.resetIfTouched() #806

Closed
stefanroeck opened this issue Aug 10, 2023 · 1 comment

Comments

@stefanroeck
Copy link

The problem as described in #712 still happens. Looking at the source code, the root cause seems to be that the story is re-rendered before the cleanup events are fired.
A fix locally working for me is to move down the line

this.setCurrentStory(story, { forceRerender: true })

after the cleanup events are fired.

If you agree I can prepare a PR.

Stacktrace of the error:

Error: Error: failed to find element matching selector "[data-testid='single-row-actions-button']"
    at ElementHandle.$eval (\visreg-test\node_modules\puppeteer-core\lib\cjs\puppeteer\common\JSHandle.js:649:19)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async CapturingBrowser.resetIfTouched (\visreg-test\node_modules\storycap\lib\node\capturing-browser.js:89:13)
    at async CapturingBrowser.screenshot (\visreg-test\node_modules\storycap\lib\node\capturing-browser.js:359:13)
    at async time (\visreg-test\node_modules\storycrawler\lib\timer.js:14:20)
    at async \visreg-test\node_modules\storycap\lib\node\screenshot-service.js:27:39
    at async \visreg-test\node_modules\storycrawler\lib\async-utils.js:153:28
stefanroeck pushed a commit to stefanroeck/storycap that referenced this issue Aug 10, 2023
- Rerender story after the cleanup events have been fired
- Remove workaround from reg-viz#712
Quramy added a commit that referenced this issue Aug 24, 2023
@stefanroeck
Copy link
Author

@Quramy thanks for merging, I'm closing this ticket now. Do you have an ETA for a release already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant