-
Notifications
You must be signed in to change notification settings - Fork 288
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
Cannot read property 'removeListener' of undefined #200
Comments
for jest 22~23 version, you can use |
Awesome, thanks @xiaoyuhen ! |
With a fresh cache in CircleCI and jest-puppeteer v4 this still breaks:
Although it works in my local environment, so it seems something fishy is going on in CI (never had any issue like this besides this case). Should I do something to my config? |
it's very weird. could you please give me a demo for check this? |
For me this happens only when headless false: otherwise it works.
Cheers edit: Actually it happens in debug. Only if |
@xiaoyuhen here is a repro based on the create-react-example: As you can see it fails in CircleCI: After updating to node v11, there actually seem to be two errors:
and
The docker image used in CircleCI is quite simple:
|
it's an instrumental demo. thank you for your information. I will find the problem as soon as possible. |
I am having a similar problem as well, I isolated it from your CRA example I am trying to launch a browser with "run test:launch" and then run test with connect() you can see what I tried in the commented out config file
I get:
$ npm run launch on the CRA example, here: |
Nice @fullstackwebdev , good to have another example - mine has only been failing in continuous integration (CircleCI) |
I did run into same issue. Tests fail in CircleCI. |
Same problem here, also using connect options, to connect to a chromium instance running inside a docker container. Its lifecycle is managed outside of jest. |
i have found the error. you are not allowed to pass both https://github.com/smooth-code/jest-puppeteer/blob/master/packages/jest-environment-puppeteer/src/PuppeteerEnvironment.js#L40 |
the |
Good! @backbone87 @xiaoyuhen could you submit a PR to fix this bug? |
@backbone87 Your PR solved my issue as well. Thank You a lot! |
🐛 Bug Report
Seems related to #192. Locally, the tests run fine, but when running our tests in CircleCI, we get the error:
I've tried clearing the CircleCI cache, but it doesn't help. I also tried adding a global teardown to no avail.
Previously everything was working with:
It fails after updating to:
Our
jest.config.js
:Our
jest-puppeteer.config.js
:The text was updated successfully, but these errors were encountered: