-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
cy.task('setupMetamask') issue #414
Comments
what environemtn are you using it? github actions? |
I use the same as you. waitForTimeout is because the puppeeteer cannot open in time. What i did to overcome this was create a fake first test with wait(5000) to give time for pupeeteer to open up in time. P.S - i forked synpress to my repos and created also a npm package with the information need to work as a plugin. you can take a look in here - https://github.com/pcardosolei/cypress-metamask-plugin |
Did not test that. Totally forked from synpress. I want to have a stable plugin version and then pass the relevant information to this repo so people can use synpress on a more stable way. The reason why i added as a plugin is to be flexible with my tests. I'm passing via CYPRESS_VARIABLE in the CI CD and cypress.env.json for the variables i want to have in my local tests. |
https://www.npmjs.com/package/cypress-metamask-plugin I will be updating the readMe as I have time. |
on package json.
|
Is the issue resolved or did you come across any solution ? |
you tried on the local or github actions? |
When I run synpress natively on my host, it works fine. But when I run it headed via xhost in a docker container, I get the same errors as above. Same thing if I run it headless in the docker container, I get these undefined / waitForTimeout errors. Anyone have any luck tracking down what's actually going on ? |
But the timeout error is happening in the before hook, the tests don't get a chance to even run. |
Push them to before each instead of before.
…On Thu, 2 Jun 2022, 15:51 Marko Bilal, ***@***.***> wrote:
I use the same as you.
waitForTimeout is because the puppeeteer cannot open in time.
What i did to overcome this was create a fake first test with wait(5000)
to give time for pupeeteer to open up in time. Still trying to figure out
what is going on in here.
P.S - i forked synpress to my repos and created also a npm package with
the information need to work as a plugin.
you can take a look in here -
https://github.com/pcardosolei/cypress-metamask-plugin
But the timeout error is happening in the before hook, the tests don't get
a chance to even run.
—
Reply to this email directly, view it on GitHub
<#414 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACNFYLU7EGJIYXLKU6HYFSLVNDDABANCNFSM5WGRF65Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Ok I'll put it this way: Synpress run from docker container: no metamask popup, just fails with the above errors as others have also posted. |
I created a single test to give time to pupeeteer to run everything. im still trying to put it from the start. I'm not using synpress . just it as a plugin. |
Yes Github action does not work |
Is your localhost server running in the same container ? It might not be able to reach your web server |
Thank you for responding, @marko911 After tinkering quite a bit with environment settings and install dependencies, I was able to get to a point where Here is the latest repo: Recording of a passing spec: home.js.mp4 |
@ivelin Why are you trying to do synpress open ? |
Just as a usability convenience. It saves some time from starting the whole cypress stack each time via |
Hello!
|
Hey, I am still experiencing the same error. What dependencies did you install to fix it? |
@Super-Nim I am not sure where you are at with your setup but I actually dug into the synpres code while they still used puppeteer and found a lot of hacky code with arbitrary timeouts like wait(3000) where the page would wait 3s for example to show the metamask modal. This wasn't enough time in my local setup so the metamask setup would always fail. Since then the synpress team has updated their library and use playwright instead of puppeteer. I'd try the new version if I were you and see if you still experience same problems. |
I have tried both v1 and the latest versions of Synpress. The V1.2.0 loads the metamask setup tab - but then stops working after the first interaction. I have been trying to get the Metamask setup tab to load for Synpress V2.4.1 but it just errors out like above, and doesn't even get setup. Here is my synpress.config.js file: {
animationDistanceThreshold: 5,
arch: 'x64',
baseUrl: 'https://c3-my-test.myshopify.com',
blockHosts: null,
browsers: [
{
name: 'chrome',
family: 'chromium',
channel: 'stable',
displayName: 'Chrome',
version: '106.0.5249.103',
path: 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe',
minSupportedVersion: 64,
majorVersion: '106',
},
{
name: 'edge',
family: 'chromium',
channel: 'stable',
displayName: 'Edge',
version: '106.0.1370.37',
path: 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe',
minSupportedVersion: 79,
majorVersion: '106',
},
{
name: 'electron',
channel: 'stable',
family: 'chromium',
displayName: 'Electron',
version: '102.0.5005.148',
path: '',
majorVersion: 102,
},
],
chromeWebSecurity: true,
clientCertificates: [],
defaultCommandTimeout: 300000,
downloadsFolder: 'cypress/downloads',
env: {
coverage: false,
REMOTE_DEBUGGING_PORT: 9222,
},
excludeSpecPattern: '*.hot-update.js',
execTimeout: 60000,
experimentalFetchPolyfill: false,
experimentalInteractiveRunEvents: false,
experimentalModifyObstructiveThirdPartyCode: false,
experimentalSessionAndOrigin: false,
experimentalSingleTabRunMode: false,
experimentalSourceRewriting: false,
experimentalStudio: false,
experimentalWebKitSupport: false,
fileServerFolder: '',
fixturesFolder: 'cypress/fixtures',
hosts: null,
includeShadowDom: false,
isInteractive: true,
keystrokeDelay: 0,
modifyObstructiveCode: true,
nodeVersion: null,
numTestsKeptInMemory: 50,
pageLoadTimeout: 300000,
platform: 'win32',
port: null,
projectId: null,
redirectionLimit: 20,
reporter: 'spec',
reporterOptions: null,
requestTimeout: 300000,
resolvedNodePath: null,
resolvedNodeVersion: null,
responseTimeout: 30000,
retries: {
runMode: 0,
openMode: 0,
},
screenshotOnRunFailure: true,
screenshotsFolder: 'cypress/screenshots',
scrollBehavior: 'top',
slowTestThreshold: 10000,
specPattern: 'cypress/e2e/**/*.cy.{js,jsx,ts,tsx}',
supportFile: 'cypress/support/index.js',
supportFolder: false,
taskTimeout: 60000,
testIsolation: 'legacy',
trashAssetsBeforeRuns: true,
userAgent: 'synpress',
video: false,
videoCompression: 32,
videosFolder: 'videos',
videoUploadOnPasses: true,
viewportHeight: 850,
viewportWidth: 1366,
waitForAnimations: true,
watchForFileChanges: true,
} |
Hey there, When I use I think I'm using the latest version ( Using the Any clues on this ? Thanks :) |
|
I got the same issue when tried using synpress as cypress plugin with typescript, but work normally in Javascript |
@hadothanh could you clarify switching which files from JS to TS or vise versa breaks/heals things? |
Like for @doliG and for @ivelin, the same issue happens for me with @synthetixio/[email protected] and [email protected]: PS by the way, this problem is described at #417 PPS Another issue with
the |
is anybody able to get synpress to work in git actions |
Hi any news about this? |
I gave up ( ´_ゝ`) |
Hey guys, please take a look at the workaround I've mentioned here: if you are getting
(alternatively, if you want the Let me know if that removes PS For me, after commenting those bits out, for
which is an error that I know already, so I've made sure that my .env.synpress is passed to The good news is, my PR fixing this bit was merged, so this will be probably fixed in 3.7.2. |
Hi @YakovL I used to get the below error when using cypress: 12.7.3
But then i upgraded to cypress: ^13.7.0 and i keep getting this error when i try to run cypress:
Would appriciate any tip on how to fix this |
Hi @izuchukwu-eric , what file does the error come from? I haven't encountered this, but it looks like you have to configure your Webpack (to recognize ES modules correctly) |
While running the setupMetamask i got this issue? Is there someone having the same problem?
The text was updated successfully, but these errors were encountered: