Skip to content
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

[🐛 Bug]: Timeout 30000ms. while running cy.confirmMetamaskTransaction() method after latest update #1140

Open
3 of 4 tasks
ZenoviyShulba opened this issue Jun 4, 2024 · 1 comment
Labels
bug 🐛 Something isn't working needs triaging ⏳

Comments

@ZenoviyShulba
Copy link

🔎 Have you searched existing issues to avoid duplicates?

  • I have made sure that my issue is not a duplicate.

🧪 Have you tested your code using latest version of Synpress?

💡 Are you able to provide enough information to be able to reproduce your issue locally?

  • I can provide enough details to reproduce my issue on local environment.

Synpress version

3.7.3

Node.js version

16.16.0

Operating system

Windows 11

Run mode

Synpress (standalone)

CI platform (if applicable)

No response

Are you running your tests inside docker? (if applicable)

  • This issue could be related to docker.

What happened?

I used to have an automation test which used confirmMetamaskTransaction() from the library @synthetixio/synpress. Everything was fine, but after the last update 6 days ago, the test constantly fails despite the transaction being successful. Transaction last more than 40s. and Cypress stoping after 30000ms

"The reason is a CypressError: cy.task('confirmMetamaskTransaction') failed with the following error: page.waitForSelector: Timeout 30000ms exceeded.

I'm trying almost everything I know:

Setting up the timeout in synpress.config to 90000ms.
Adding a task with a timeout inside it: cy.task('confirmMetamaskTransaction', { timeout: 90000 }).than
Adding .should('not.exist') to the task.

I`m using Node v16.16.0, Chrome extension MetaMask 11.15.0, @synthetixio/synpress 3.7.3. Running in --headless mode as well as e2e browser mode and Docker environment, the result is the same.
image

What is your expected behavior?

I expect a successful transaction and the test to continue running, as it worked before.

How to reproduce the bug.

synpress run --noExit --configFile synpress.config.js --spec tests/e2e/specs/proposals.js

  1. login into MetaMask using cy.signInWithMetamask();
  2. init Metamask confirmation window: cy.confirmMetamaskTransaction()
  3. Popup shows the confirmation button (but nothing happened, need to manually click on it, it used to work automatically)
  4. After manually clicking it shows timeline 45s. countdown but after 30000ms. Synpress closed the test with a failure

Relevant log output

CypressError: `cy.task('confirmMetamaskTransaction')` failed with the following error:

> page.waitForSelector: Timeout 30000ms exceeded.
Call log:
  - waiting for locator('.notification .confirm-page-container-content .custom-nonce-input input') to be visible


https://on.cypress.io/api/task
      at <unknown> (https://staging.tally.xyz/__cypress/runner/cypress_runner.js:151171:78)
      at tryCatcher (https://staging.tally.xyz/__cypress/runner/cypress_runner.js:18744:23)
      at Promise._settlePromiseFromHandler (https://staging.tally.xyz/__cypress/runner/cypress_runner.js:16679:31)
      at Promise._settlePromise (https://staging.tally.xyz/__cypress/runner/cypress_runner.js:16736:18)
      at Promise._settlePromise0 (https://staging.tally.xyz/__cypress/runner/cypress_runner.js:16781:10)
      at Promise._settlePromises (https://staging.tally.xyz/__cypress/runner/cypress_runner.js:16857:18)
      at _drainQueueStep (https://staging.tally.xyz/__cypress/runner/cypress_runner.js:13451:12)
      at _drainQueue (https://staging.tally.xyz/__cypress/runner/cypress_runner.js:13444:9)
      at ../../node_modules/bluebird/js/release/async.js.Async._drainQueues (https://staging.tally.xyz/__cypress/runner/cypress_runner.js:13460:5)
      at Async.drainQueues (https://staging.tally.xyz/__cypress/runner/cypress_runner.js:13330:14)
  From Your Spec Code:
      at Context.eval (webpack:///./tests/e2e/specs/draft-proposal.js:261:9)

  From Node.js Internals:
    TimeoutError: page.waitForSelector: Timeout 30000ms exceeded.
    Call log:
      - waiting for locator('.notification .confirm-page-container-content .custom-nonce-input input') to be visible

    page.waitForSelector: Timeout 30000ms exceeded.
@ZenoviyShulba ZenoviyShulba added bug 🐛 Something isn't working needs triaging ⏳ labels Jun 4, 2024
@ZenoviyShulba ZenoviyShulba changed the title [🐛 Bug]: <title>Timeout 30000ms. while running cy.confirmMetamaskTransaction() method after latest update [🐛 Bug]: Timeout 30000ms. while running cy.confirmMetamaskTransaction() method after latest update Jun 4, 2024
@feraway
Copy link

feraway commented Aug 5, 2024

Bump: experiencing the same issue. Fixed by downgrading to 3.7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working needs triaging ⏳
Projects
None yet
Development

No branches or pull requests

2 participants