synpress
synpress copied to clipboard
Github CI Issue
Thanks so much for building and maintaining this library!
Everything is working great locally, but we can not get the metamask login flow to work in github CI. This is the configuration we were using based on this example: https://github.com/Synthetixio/synpress/blob/dev/.github/workflows/e2e_headful.yml
I know that we can use docker but were hoping there was a different solution and wanted to see if you all were aware of any workarounds.
Thanks!
@schultztimothy Thanks for reporting! Will investigate right away and try to reproduce.
@schultztimothy Hmm, I have forked your repository and can't seem to get CI working: https://github.com/drptbl/passport-scorer/actions/runs/4368211688/jobs/7640502118
Any ideas why it's failing in my case with unrelated error?
Error:
> Cannot destructure property 'DOMElement' of '_prettyFormat.default.plugins' as it is undefined.
Hey @schultztimothy,
Maybe I can help your remotely instead of debugging my failing CI on a fork. If my suggestions won't help, I will need to get it work to be able to debug myself.
What I have noticed on first look at your code:
- Update synpress to latest [email protected]
- I have noticed this code in your tests:
signInWithEthereum() {
...
if (Cypress.env("SKIP_METAMASK_CONNECT") != "1") {
cy.acceptMetamaskAccess().should("be.true");
}
cy.confirmMetamaskSignatureRequest().should("be.true");
}
instead of doing acceptMetamaskAccess + confirmMetamaskSignatureRequest for SIWE, you should use:
cy.acceptMetamaskAccess({signInSignature: true});
https://github.com/Synthetixio/synpress/blob/2255b177b7707da0f957c42d9ec2cc435dcc0d7a/support/index.d.ts#L248-L257
Can you make above changes and try again?
@schultztimothy Hmm, I have forked your repository and can't seem to get CI working: https://github.com/drptbl/passport-scorer/actions/runs/4368211688/jobs/7640502118
Any idea why it's failing in my case with an unrelated error?
Error:
> Cannot destructure property 'DOMElement' of '_prettyFormat.default.plugins' as it is undefined.
This might seem irrelevant, but this is the same error I am getting when I was migrating the project to TypeScript #180
Thanks so much for jumping right on this!
I made the changes you suggested and have them on this branch: https://github.com/gitcoinco/passport-scorer/tree/synpress-github-ci
When running the tests locally with yarn test:e2e:local, it can't seem to get passed the metamask login step. I also added back a test CI for that branch here: https://github.com/gitcoinco/passport-scorer/actions/runs/4377225986/jobs/7660416681
🙏
@schultztimothy @r3kt-eth is on it, should be fixed by tomorrow; we've identified this issue. Thanks for helping out!
Awesome thank you!
hi @schultztimothy,
official typescript support is under work, but we don't know ETA, so my advice it to switch to JS for now.
i have fixed your branch doing these changes:
- removing typescript dependency from test_syn (it breaks everything)
- changing file extensions from .ts to .js
- updating synpress to latest (3.5.0)
^ everything works locally after this changes were introduced on my local pc.
are you willing to do these changes?
thx and sorry for trouble.
@synthetixio/[email protected] is latest.
Thank you! I will check in with the team and see if they are willing to go the JS route for now