Closed aarongoldenthal closed 2 years ago
@sangitamane Is there any chance of this being pushed out as a patch release? At a minimum async reporters using incognito are broken (or at least flaky) without it (especially when processing data in afterAll
, which hold the process open at the end of the run).
I can merge this in master, but I am afraid if I can release it! So @josebolos or @joeyciechanowicz may release it once they are back.
I'm on holiday without a laptop currently, but will release when I'm back on Monday. Great work!
On Fri, 17 Dec 2021, 15:45 Sangita Mane, @.***> wrote:
Merged #170 https://github.com/pa11y/pa11y-ci/pull/170 into master.
— Reply to this email directly, view it on GitHub https://github.com/pa11y/pa11y-ci/pull/170#event-5785424325, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAIYNXMUTRYL2OEWLMKX5Q3URNLITANCNFSM5JZ2K5KQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID: @.***>
Add missing
await
for closing incognito browser context. Errors have been seen running custom reporters with async functions, as noted in https://github.com/pa11y/pa11y-ci/issues/168#issuecomment-990562886, with the stack trace pointing to this line. ThebrowserContext.close
function is async, so without theawait
there appears to be timing issues between thebrowserContext.close
and parentbrowser.close
(which are likely masked in other cases by pa11y-ci completing and exiting the process).This change did resolve at least the reporter problem noted in https://github.com/pa11y/pa11y-ci/issues/168 (as did running with
"useIncognitoBrowserContext": false
as a workaround). The build-in reporters (cli
/html
) are only synchronous code and don't appear to cause it.I haven't seen this with other execution as noted in https://github.com/pa11y/pa11y-ci/issues/168, so not clear if it will resolve the other issues, but those errors do also point to this line of code.