Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

586
Views
Problema con el complemento Cypress y cypress-metamask (conectar ECONNREFUSED 127.0.0.1:9222)

Estoy tratando de integrar pruebas de ciprés en mi aplicación, pero para realizar pruebas e2e necesito interactuar con metamask. Estoy usando el complemento cypress-metamask ( https://www.npmjs.com/package/cypress-metamask ), pero no puedo hacerlo funcionar.

La ejecución de las pruebas devuelve el siguiente error:

cy.task('setupMetamask') falló con el siguiente error:

la solicitud a http://localhost:9222/json/version falló, motivo: conexión ECONNREFUSED 127.0.0.1:9222

Esta es la prueba:

 describe('NFTicket', () => { beforeEach(() => { cy.setupMetamask(); cy.changeMetamaskNetwork('localhost') cy.visit('/') }); it('is expected to display a sussess message', () => { cy.get('[data-cy=title]').should('contain.text', 'MetaMask Detected') }); });

Así es como está configurado mi cypress/plugins/index.js:

 module.exports = (on, config) => { require('cypress-metamask/plugins')(on); on('before:browser:launch', (browser = { isHeaded: true }, arguments_) => { if (browser.name === 'chrome') { arguments_.args.push('--remote-debugging-port=9222') arguments_.args.push('--disable-background-timer-throttling'); arguments_.args.push('--disable-backgrounding-occluded-windows'); arguments_.args.push('--disable-renderer-backgrounding'); } }) }
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

En nuestro proyecto, también encontramos un problema al usar esta biblioteca. No recuerdo exactamente qué era, pero en general no pudimos resolverlo y luego lo cambiamos a @synthetixio/synpress . En nuestro proyecto con esta biblioteca, las pruebas e2e funcionan perfectamente.

 npm i @synthetixio/synpress yarn add @synthetixio/synpress

Puede encontrar una lista de comandos útiles para trabajar con metamask aquí .

about 4 years ago · Juan Pablo Isaza Report

0

Asegúrese de que el servidor esté iniciado. Puede probar este 127.0.0.1 localhost en el archivo /etc/hosts.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!