-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
"TypeError: global.context.isIncognito is not a function" after upgrading to puppeteer 23.0.1 #586
Comments
I managed to temporarily circumvent it by hacking the function in in a custom environment: import { TestEnvironment } from 'jest-environment-puppeteer';
class Env extends TestEnvironment {
async setup() {
await super.setup();
if (this.global.context.isIncognito === undefined) {
this.global.context.isIncognito = () => false;
}
}
}
export default Env; Proper solution very much appreciated |
FYI breaking change comes from here: |
Took a stab at a (two character) fix in #587 |
@gregberge Thank you for fixing this Greg |
ede73
added a commit
to ede73/diagrammer
that referenced
this issue
Jan 21, 2025
…ied to update to new puppeteer to overcome fatal error argos-ci/jest-puppeteer#586 (also 588 claims to fix it, but didnt), mitigated with local run env
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
🐛 Bug Report
After upgrading to puppeteer 23.0.1, tests fail with
I thought this might be related to #585 so I tested without
--runInBand
but the behaviour persists. I'm guessing this is a breaking change in puppeteer so I'm reporting this.To Reproduce
git clone https://github.com/replete/biscuitman
npm install
npm run test
- tests passnpx ncu -u
(update packages)npm install
npm run test
Expected behavior
Presumably this is a breaking change in puppeteer, which just released Firefox support.
Link to repl or repo (highly encouraged)
See above
Issues without a reproduction link are likely to stall.
Run
npx envinfo --system --binaries --npmPackages expect-puppeteer,jest-dev-server,jest-environment-puppeteer,jest-puppeteer,spawnd --markdown --clipboard
Paste the results here:
The text was updated successfully, but these errors were encountered: