synpress: acceptMetamaskAccess doesn't work in CI

Hello,

I wrote synpress test and everything works on localhost (mac M1 - yarn test:e2e:local). But it doesn’t work on mac intel and github actions. The error appears after cy.acceptMetamaskAccess():

message: "Request of type 'wallet_requestPermissions' already pending for origin xyz./ Please wait.",

There was already an issue like that: https://github.com/Synthetixio/synpress/issues/498 but nothing helps.

I have two github actions workflows:

  1. github-actions-docker
  2. github-actions-local and both throw the same error. I have already used docker-compose and docker-compose.ci.

There is a minimal reproduction: https://github.com/Cianekjr/e2e

Could you take a look, please? Thanks 😉

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

@Cianekjr thanks for report, will take a look until end of next week.

@alexo382 Totally understood, will keep investigating.

Keep in mind that first docker run is way slower than subsequent until everything is cached (docker layers). Also all of this time is added for docker setup and not by making tests slower or affecting them in any way.

Thanks, Jakub.

yeah, I get that, I’m going to play around with it some more later today and see what happens. 🙏 thanks a lot for your help and please keep us updated if you manage to fix it!

@alexo382 thanks for reporting, any way I can reproduce this or see the code?

also full error would be helpful, screenshots or video recording.

I created a sample repo where I reproduced the issue I posted above, please see the following links: https://github.com/alexo382/synpress-ci https://github.com/alexo382/synpress-ci/blob/main/.github/workflows/main.yml https://github.com/alexo382/synpress-ci/actions/runs/4167336059/jobs/7212800741

here’s the stack trace from the CI failure:

  locator resolved to hidden <div class="app os-linux">…</div>
      locator resolved to hidden <div class="app os-linux">…</div>
    ============================================================
        at Object.waitFor (/home/runner/work/synpress-ci/synpress-ci/node_modules/@synthetixio/synpress/commands/playwright.js:143:16)
        at Object.switchToMetamaskNotification (/home/runner/work/synpress-ci/synpress-ci/node_modules/@synthetixio/synpress/commands/playwright.js:123:9)
        at Object.acceptAccess (/home/runner/work/synpress-ci/synpress-ci/node_modules/@synthetixio/synpress/commands/metamask.js:815:30)
        at acceptMetamaskAccess (/home/runner/work/synpress-ci/synpress-ci/node_modules/@synthetixio/synpress/plugins/index.js:229:24)

you can run it locally but it will work fine, if you fork it to run it in CI mode note that you have to add a PRIVATE_KEY in the repo’s github secrets. let me know how it goes!

Hey @Cianekjr @fionnachan @alexo382 @Sgoldik,

Sorry for inconvenience.

Can you try again with @synthetixio/synpress@3.1.0 and report back?

This issue should be fixed now.

Also, if you’re using docker-e2e, I suggest to update to one of these:

- synthetixio/docker-e2e:14.21-debian
- synthetixio/docker-e2e:16.19-debian
- synthetixio/docker-e2e:18.13-debian

or…

- synthetixio/docker-e2e:14.21-ubuntu
- synthetixio/docker-e2e:16.19-ubuntu
- synthetixio/docker-e2e:18.13-ubuntu

Thanks, Jakub.

hey Jakub, thanks for the update! I still seem to be getting locator resolved to hidden <div class="app os-linux">…</div> on acceptMetamaskAccess in CI, any idea how to solve?