MetaMask / metamask-extension

:globe_with_meridians: :electric_plug: The MetaMask browser extension enables browsing Ethereum blockchain enabled websites
https://metamask.io
Other
11.84k stars 4.84k forks source link

Fix "Snap Account - Swap swaps ETH for DAI using a snap a..." flaky tests #26864

Closed hjetpoluru closed 3 days ago

hjetpoluru commented 1 week ago

https://app.circleci.com/pipelines/github/MetaMask/metamask-extension/98396/workflows/be9ffb55-3ba2-4b60-9a36-92a18a5f2511/jobs/3662206/tests

Test scenario - Snap Account - Swap swaps ETH for DAI using a snap account

TimeoutError: Waiting for element to be located By(css selector, [data-testid="exchange-rate-display-quote-rate"])
Wait timed out after 10063ms
  (Ran on CircleCI Node 3 of 24, Job test-e2e-firefox)
    at /home/circleci/project/node_modules/selenium-webdriver/lib/webdriver.js:929:17
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

image

hjetpoluru commented 1 week ago

I took a look at this flaky test, and it's due to the error message that appears when fetching the quote. Its not consistently reproduced but I am able to see the error.

Error fetching quotes
Hmmm... something went wrong. Try again, or if errors persist, contact customer support.

From the console.log below is the error that appears. I need to further investigate on this issue.

Error: PollingBlockTracker - encountered an error while attempting to update latest block:
ResultError@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/scripts/lockdown-install.js:1:104661
_fetchLatestBlock@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19573:19
async*_updateLatestBlock@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19556:40
_updateAndQueue@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19585:24
_updateAndQueue/timeoutRef<@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19604:18
sentryWrapped@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/scripts/sentry-install.js:21224:17
setTimeout handler*[79]</_wrapTimeFunction/<@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/scripts/sentry-install.js:21860:21
_updateAndQueue@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19601:38
async*_updateAndQueue/timeoutRef<@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19604:18
sentryWrapped@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/scripts/sentry-install.js:21224:17
setTimeout handler*[79]</_wrapTimeFunction/<@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/scripts/sentry-install.js:21860:21
_updateAndQueue@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19601:38
async*_updateAndQueue/timeoutRef<@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19604:18
sentryWrapped@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/scripts/sentry-install.js:21224:17
setTimeout handler*[79]</_wrapTimeFunction/<@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/scripts/sentry-install.js:21860:21
_updateAndQueue@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19601:38
async*_updateAndQueue/timeoutRef<@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19604:18
sentryWrapped@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/scripts/sentry-install.js:21224:17
setTimeout handler*[79]</_wrapTimeFunction/<@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/scripts/sentry-install.js:21860:21
_updateAndQueue@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19601:38
async*_updateAndQueue/timeoutRef<@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19604:18
sentryWrapped@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/scripts/sentry-install.js:21224:17
setTimeout handler*[79]</_wrapTimeFunction/<@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/scripts/sentry-install.js:21860:21
_updateAndQueue@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19601:38
async*_updateAndQueue/timeoutRef<@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19604:18
sentryWrapped@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/scripts/sentry-install.js:21224:17
setTimeout handler*[79]</_wrapTimeFunction/<@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/scripts/sentry-install.js:21860:21
_updateAndQueue@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19601:38
async*_updateAndQueue/timeoutRef<@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/common-2.js:19604:18
sentryWrapped@moz-extension://dd132385-e656-4a86-b942-fcf4dcfeb322/scripts/sentry-install.js:21224:17

image