synpress
synpress copied to clipboard
`cy.task('setupMetamask')` failed with the following error: > Cannot read properties of undefined (reading 'waitForTimeout')
My test script is below.the issue is random so sometimes the tests are passed and sometimes it fails. I am running on ubuntu with latetst verion of synpress. I can share the synpress json file fi needed. Please advise anyone .A bit urgent.
describe('Metamask', () => { context('Test11 commands', () => {
it(`Try to connect to website`, () => {
cy.visit('/');
cy.contains('Welcome')
});
}); });
Below are the error logs:
- "before all" hook for "Try to connect to website"
0 passing (379ms) 1 failing
- Metamask
Test11 commands
"before all" hook for "Try to connect to website":
CypressError:
cy.task('setupMetamask')
failed with the following error:
Cannot read properties of undefined (reading 'waitForTimeout')
https://on.cypress.io/api/task
Because this error occurred during a before all
hook we are skipping all of the remaining tests.
at http://localhost/__cypress/runner/cypress_runner.js:161147:78
at tryCatcher (http://localhost/__cypress/runner/cypress_runner.js:13196:23)
at Promise._settlePromiseFromHandler (http://localhost/__cypress/runner/cypress_runner.js:11131:31)
at Promise._settlePromise (http://localhost/__cypress/runner/cypress_runner.js:11188:18)
at Promise._settlePromise0 (http://localhost/__cypress/runner/cypress_runner.js:11233:10)
at Promise._settlePromises (http://localhost/__cypress/runner/cypress_runner.js:11309:18)
at _drainQueueStep (http://localhost/__cypress/runner/cypress_runner.js:7903:12)
at _drainQueue (http://localhost/__cypress/runner/cypress_runner.js:7896:9)
at Async.../../node_modules/bluebird/js/release/async.js.Async._drainQueues (http://localhost/__cypress/runner/cypress_runner.js:7912:5)
at Async.drainQueues (http://localhost/__cypress/runner/cypress_runner.js:7782:14)
From Node.js Internals:
TypeError: Cannot read properties of undefined (reading 'waitForTimeout')
at Object.initialSetup (/main/node_modules/@synthetixio/synpress/commands/metamask.js:557:37)
at runMicrotasks (
We actually commented out the before all call in the support/index.js file. It seems to still go through the setup and unlocks.
what command are you running?
I have the same issue, using synpress open
command
I have the same issue as well, only when I use synpress open.