Skip to content

fix(playwright): Add missing await on page.evaluate#1063

Merged
straker merged 2 commits intodequelabs:developfrom
KuSh:patch-1
May 15, 2024
Merged

fix(playwright): Add missing await on page.evaluate#1063
straker merged 2 commits intodequelabs:developfrom
KuSh:patch-1

Conversation

@KuSh
Copy link
Copy Markdown
Contributor

@KuSh KuSh commented May 14, 2024

Hi,

This missing await causes us many, hard to debug problems, when page has been closed prematurely (popup or terminating analysis if too long)

Simple reproduction :

(async () => {
  const browser = await playwright.chromium.launch({ headless: true });
  const context = await browser.newContext();
  const page = await context.newPage();
  await page.close();
  try {
    const results = await new AxeBuilder({ page }).analyze();
    console.log(results);
  } catch (error) {
    console.error(error);
  }
  await browser.close();
})();
// node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^
 page.evaluate: Target page, context or browser has been closed

I haven't been able to write a simple test that reproduce the problem but I can reproduce it in my project and adding that await fixed all my problems

No QA needed

@KuSh KuSh requested a review from a team as a code owner May 14, 2024 15:45
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 14, 2024

CLA assistant check
All committers have signed the CLA.

@KuSh KuSh changed the title Add missing await on page.evaluate fix(playwright): Add missing await on page.evaluate May 14, 2024
@straker
Copy link
Copy Markdown
Contributor

straker commented May 14, 2024

Thanks for the pr! Before we can merge it you'll need to sign our CLA, but it's not working at the moment. Once we get that fixed I'll let you know, then we can work on getting this merged in.

@straker
Copy link
Copy Markdown
Contributor

straker commented May 15, 2024

Going to close / reopen this pr to retrigger the cla bot, which should be working now.

@straker straker closed this May 15, 2024
@straker straker reopened this May 15, 2024
@straker
Copy link
Copy Markdown
Contributor

straker commented May 15, 2024

Review for security

@straker straker merged commit 20b8bbf into dequelabs:develop May 15, 2024
@KuSh KuSh deleted the patch-1 branch May 15, 2024 21:18
@github-actions github-actions Bot mentioned this pull request Aug 5, 2024
michael-siek added a commit that referenced this pull request Aug 6, 2024
#
[4.10.0](v4.9.1...v4.10.0)
(2024-08-05)


### Bug Fixes

* **playwright:** Add missing await on page.evaluate
([#1063](#1063))
([20b8bbf](20b8bbf))


### Features

* Update axe-core to v4.10.0
([#1088](#1088))
([bb94776](bb94776))
This was referenced Aug 13, 2024
michael-siek added a commit that referenced this pull request Aug 16, 2024
#
[4.10.0](v4.9.1...v4.10.0)
(2024-08-16)


### Bug Fixes

* **cli:** include `dotenv` dep
([#1103](#1103))
([5d34355](5d34355)),
closes [#1102](#1102)
* **playwright:** Add missing await on page.evaluate
([#1063](#1063))
([20b8bbf](20b8bbf))


### Features

* Update axe-core to v4.10.0
([#1088](#1088))
([bb94776](bb94776))
@dequejenn dequejenn mentioned this pull request Aug 19, 2024
github-merge-queue Bot referenced this pull request in camunda/camunda Aug 19, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [@axe-core/playwright](https://togithub.com/dequelabs/axe-core-npm) |
[`4.9.1` ->
`4.10.0`](https://renovatebot.com/diffs/npm/@axe-core%2fplaywright/4.9.1/4.10.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@axe-core%2fplaywright/4.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@axe-core%2fplaywright/4.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@axe-core%2fplaywright/4.9.1/4.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@axe-core%2fplaywright/4.9.1/4.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>dequelabs/axe-core-npm (@&#8203;axe-core/playwright)</summary>

###
[`v4.10.0`](https://togithub.com/dequelabs/axe-core-npm/releases/tag/v4.10.0):
Release 4.10.0

[Compare
Source](https://togithub.com/dequelabs/axe-core-npm/compare/v4.9.1...v4.10.0)

#### What's Changed

- fix(playwright): Add missing await on page.evaluate by
[@&#8203;KuSh](https://togithub.com/KuSh) in
[https://github.com/dequelabs/axe-core-npm/pull/1063](https://togithub.com/dequelabs/axe-core-npm/pull/1063)
- chore: update to support eslint 9 flat config by
[@&#8203;michael-siek](https://togithub.com/michael-siek) in
[https://github.com/dequelabs/axe-core-npm/pull/1064](https://togithub.com/dequelabs/axe-core-npm/pull/1064)
- chore: merge master into develop by
[@&#8203;attest-team-ci](https://togithub.com/attest-team-ci) in
[https://github.com/dequelabs/axe-core-npm/pull/1071](https://togithub.com/dequelabs/axe-core-npm/pull/1071)
- chore: bump puppeteer from 21.7.0 to 22.10.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/dequelabs/axe-core-npm/pull/1073](https://togithub.com/dequelabs/axe-core-npm/pull/1073)
- chore: bump sinon from 17.0.1 to 18.0.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/dequelabs/axe-core-npm/pull/1076](https://togithub.com/dequelabs/axe-core-npm/pull/1076)
- chore: bump chromedriver from 121.0.0 to 125.0.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/dequelabs/axe-core-npm/pull/1075](https://togithub.com/dequelabs/axe-core-npm/pull/1075)
- chore: fix eslint errors and warnings by
[@&#8203;straker](https://togithub.com/straker) in
[https://github.com/dequelabs/axe-core-npm/pull/1079](https://togithub.com/dequelabs/axe-core-npm/pull/1079)
- chore: bump typescript-eslint from 8.0.0-alpha.12 to 8.0.0-alpha.26 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/dequelabs/axe-core-npm/pull/1078](https://togithub.com/dequelabs/axe-core-npm/pull/1078)
- chore: bump the npm-low-risk group across 1 directory with 22 updates
by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/dequelabs/axe-core-npm/pull/1077](https://togithub.com/dequelabs/axe-core-npm/pull/1077)
- chore: use updated browser-driver-manager by
[@&#8203;scottmries](https://togithub.com/scottmries) in
[https://github.com/dequelabs/axe-core-npm/pull/1080](https://togithub.com/dequelabs/axe-core-npm/pull/1080)
- chore: bump the npm-low-risk group with 27 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/dequelabs/axe-core-npm/pull/1081](https://togithub.com/dequelabs/axe-core-npm/pull/1081)
- chore: bump chromedriver from 125.0.3 to 126.0.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/dequelabs/axe-core-npm/pull/1082](https://togithub.com/dequelabs/axe-core-npm/pull/1082)
- feat: Update axe-core to v4.10.0 by
[@&#8203;attest-team-ci](https://togithub.com/attest-team-ci) in
[https://github.com/dequelabs/axe-core-npm/pull/1088](https://togithub.com/dequelabs/axe-core-npm/pull/1088)
- chore: downgrade lerna to resolve ESM requirement by
[@&#8203;michael-siek](https://togithub.com/michael-siek) in
[https://github.com/dequelabs/axe-core-npm/pull/1098](https://togithub.com/dequelabs/axe-core-npm/pull/1098)
- fix(cli): include `dotenv` dep by
[@&#8203;michael-siek](https://togithub.com/michael-siek) in
[https://github.com/dequelabs/axe-core-npm/pull/1103](https://togithub.com/dequelabs/axe-core-npm/pull/1103)
- chore: RC v4.10.0 by
[@&#8203;github-actions](https://togithub.com/github-actions) in
[https://github.com/dequelabs/axe-core-npm/pull/1108](https://togithub.com/dequelabs/axe-core-npm/pull/1108)
- Release 4.10.0 by [@&#8203;dequejenn](https://togithub.com/dequejenn)
in
[https://github.com/dequelabs/axe-core-npm/pull/1110](https://togithub.com/dequelabs/axe-core-npm/pull/1110)

#### New Contributors

- [@&#8203;KuSh](https://togithub.com/KuSh) made their first
contribution in
[https://github.com/dequelabs/axe-core-npm/pull/1063](https://togithub.com/dequelabs/axe-core-npm/pull/1063)

**Full Changelog**:
dequelabs/axe-core-npm@v4.9.1...v4.10.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View the
[repository job log](https://developer.mend.io/github/camunda/camunda).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4yNi4xIiwidXBkYXRlZEluVmVyIjoiMzguMjYuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIl19-->
github-merge-queue Bot referenced this pull request in ionic-team/ionic-framework Aug 30, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence | Type |
Update |
|---|---|---|---|---|---|---|---|
| [@axe-core/playwright](https://togithub.com/dequelabs/axe-core-npm) |
[`^4.9.1` ->
`^4.10.0`](https://renovatebot.com/diffs/npm/@axe-core%2fplaywright/4.9.1/4.10.0)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@axe-core%2fplaywright/4.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@axe-core%2fplaywright/4.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@axe-core%2fplaywright/4.9.1/4.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@axe-core%2fplaywright/4.9.1/4.10.0?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | minor |
| [@playwright/test](https://playwright.dev)
([source](https://togithub.com/microsoft/playwright)) | [`^1.46.0` ->
`^1.46.1`](https://renovatebot.com/diffs/npm/@playwright%2ftest/1.46.0/1.46.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@playwright%2ftest/1.46.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@playwright%2ftest/1.46.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@playwright%2ftest/1.46.0/1.46.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@playwright%2ftest/1.46.0/1.46.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| devDependencies | patch |
| mcr.microsoft.com/playwright | `v1.46.0` -> `v1.46.1` |
[![age](https://developer.mend.io/api/mc/badges/age/docker/mcr.microsoft.com%2fplaywright/v1.46.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/docker/mcr.microsoft.com%2fplaywright/v1.46.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/docker/mcr.microsoft.com%2fplaywright/v1.46.0/v1.46.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/docker/mcr.microsoft.com%2fplaywright/v1.46.0/v1.46.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
| final | patch |

---

### Release Notes

<details>
<summary>dequelabs/axe-core-npm (@&#8203;axe-core/playwright)</summary>

###
[`v4.10.0`](https://togithub.com/dequelabs/axe-core-npm/releases/tag/v4.10.0):
Release 4.10.0

[Compare
Source](https://togithub.com/dequelabs/axe-core-npm/compare/v4.9.1...v4.10.0)

#### What's Changed

- fix(playwright): Add missing await on page.evaluate by
[@&#8203;KuSh](https://togithub.com/KuSh) in
[https://github.com/dequelabs/axe-core-npm/pull/1063](https://togithub.com/dequelabs/axe-core-npm/pull/1063)
- chore: update to support eslint 9 flat config by
[@&#8203;michael-siek](https://togithub.com/michael-siek) in
[https://github.com/dequelabs/axe-core-npm/pull/1064](https://togithub.com/dequelabs/axe-core-npm/pull/1064)
- chore: merge master into develop by
[@&#8203;attest-team-ci](https://togithub.com/attest-team-ci) in
[https://github.com/dequelabs/axe-core-npm/pull/1071](https://togithub.com/dequelabs/axe-core-npm/pull/1071)
- chore: bump puppeteer from 21.7.0 to 22.10.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/dequelabs/axe-core-npm/pull/1073](https://togithub.com/dequelabs/axe-core-npm/pull/1073)
- chore: bump sinon from 17.0.1 to 18.0.0 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/dequelabs/axe-core-npm/pull/1076](https://togithub.com/dequelabs/axe-core-npm/pull/1076)
- chore: bump chromedriver from 121.0.0 to 125.0.3 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/dequelabs/axe-core-npm/pull/1075](https://togithub.com/dequelabs/axe-core-npm/pull/1075)
- chore: fix eslint errors and warnings by
[@&#8203;straker](https://togithub.com/straker) in
[https://github.com/dequelabs/axe-core-npm/pull/1079](https://togithub.com/dequelabs/axe-core-npm/pull/1079)
- chore: bump typescript-eslint from 8.0.0-alpha.12 to 8.0.0-alpha.26 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/dequelabs/axe-core-npm/pull/1078](https://togithub.com/dequelabs/axe-core-npm/pull/1078)
- chore: bump the npm-low-risk group across 1 directory with 22 updates
by [@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/dequelabs/axe-core-npm/pull/1077](https://togithub.com/dequelabs/axe-core-npm/pull/1077)
- chore: use updated browser-driver-manager by
[@&#8203;scottmries](https://togithub.com/scottmries) in
[https://github.com/dequelabs/axe-core-npm/pull/1080](https://togithub.com/dequelabs/axe-core-npm/pull/1080)
- chore: bump the npm-low-risk group with 27 updates by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/dequelabs/axe-core-npm/pull/1081](https://togithub.com/dequelabs/axe-core-npm/pull/1081)
- chore: bump chromedriver from 125.0.3 to 126.0.4 by
[@&#8203;dependabot](https://togithub.com/dependabot) in
[https://github.com/dequelabs/axe-core-npm/pull/1082](https://togithub.com/dequelabs/axe-core-npm/pull/1082)
- feat: Update axe-core to v4.10.0 by
[@&#8203;attest-team-ci](https://togithub.com/attest-team-ci) in
[https://github.com/dequelabs/axe-core-npm/pull/1088](https://togithub.com/dequelabs/axe-core-npm/pull/1088)
- chore: downgrade lerna to resolve ESM requirement by
[@&#8203;michael-siek](https://togithub.com/michael-siek) in
[https://github.com/dequelabs/axe-core-npm/pull/1098](https://togithub.com/dequelabs/axe-core-npm/pull/1098)
- fix(cli): include `dotenv` dep by
[@&#8203;michael-siek](https://togithub.com/michael-siek) in
[https://github.com/dequelabs/axe-core-npm/pull/1103](https://togithub.com/dequelabs/axe-core-npm/pull/1103)
- chore: RC v4.10.0 by
[@&#8203;github-actions](https://togithub.com/github-actions) in
[https://github.com/dequelabs/axe-core-npm/pull/1108](https://togithub.com/dequelabs/axe-core-npm/pull/1108)
- Release 4.10.0 by [@&#8203;dequejenn](https://togithub.com/dequejenn)
in
[https://github.com/dequelabs/axe-core-npm/pull/1110](https://togithub.com/dequelabs/axe-core-npm/pull/1110)

#### New Contributors

- [@&#8203;KuSh](https://togithub.com/KuSh) made their first
contribution in
[https://github.com/dequelabs/axe-core-npm/pull/1063](https://togithub.com/dequelabs/axe-core-npm/pull/1063)

**Full Changelog**:
dequelabs/axe-core-npm@v4.9.1...v4.10.0

</details>

<details>
<summary>microsoft/playwright (@&#8203;playwright/test)</summary>

###
[`v1.46.1`](https://togithub.com/microsoft/playwright/compare/v1.46.0...e1c861cfa7a6caf3c5b798786b1e6298c4f3cf31)

[Compare
Source](https://togithub.com/microsoft/playwright/compare/v1.46.0...v1.46.1)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday before 11am" (UTC),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/ionic-team/ionic-framework).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC41Ni4wIiwidXBkYXRlZEluVmVyIjoiMzguNTYuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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

Successfully merging this pull request may close these issues.

3 participants