synpress: Broken metamask.confirmTransaction on Synpress + Playwright
Describe the bug
As it says in the title — in particular, playwright will timeout on await metamask.confirmaTransaction()
even though the metamask transaction confirmation window is open & visible.
The particular failing instance is here: https://github.com/norswap/0xFable/blob/master/packages/e2e/tests/specs/create.spec.ts#L84-L89
When running in headed mode, you can see the MetaMask confirmation window open but nothing happens.
Adding a page.pause()
then resuming in the playwright console allows it to move past that, only to fail on a further confirmTransaction
.
To Reproduce
- pull repo
make dev
at top level (fourth subshell (circuits) may fail, doesn’t matter)- once contracts have deployed (third subshell has finished), go to
packages/e2e
and runmake chrome
orHEADLESS=false make chrome
- I left the
page.pause()
in the code, so you might want to remove that to see the bug
- I left the
Expected behavior
metamask.confirmTransaction()
should work, as it did before.
Desktop (please complete the following information):
- macOS Venture 13.4
- running locally
- playwright 1.35.1
- synpress 3.7.1
About this issue
- Original URL
- State: open
- Created a year ago
- Reactions: 5
- Comments: 16 (1 by maintainers)
@spacesailor24 I believe your problem is not related to this issue. However, I’ve just released a fix for that bug under the
3.7.2-beta.6
tag. Thanks for the catch! ❤️@norswap thanks for report, will investigate today
I’m using the MetaMask test dApp and
metamask.confirmTransaction()
hangs if I try to send a transaction where the recipient and sender addresses are the same@ayushrungta8 All that info (including link) is literally in my last message (here)
The bug in wagmi only caused issues in my own repo and are seemingly unrelated to the playwright/synpress issue. Updating those probably fixed the issue (unless it was some other package, I linked the commit where I updated, so you can look yourself for what changed).
The workaround code doesn’t work for me either
@ayushrungta8 Thanks for your response I tried the workaround and it didn’t work unfortunately … in my case if I resize the metamask notification it’s working (see the video for more context) …
https://github.com/Synthetixio/synpress/assets/11523791/b147d41d-80a9-48da-9eae-8bc00b3ce29e
e context) … The notification popup “Add nickname” modal I guess.
Do you have any ideas about what’s going on … pinging @norswap @r3kt-eth
Thank you
I was also facing the same issue while trying to reject the tx. It seems its getting stuck at
await page.waitForLoadState('networkidle');
here on adding a custom sleep for 10 sec its passing