Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

391
Vistas
I got error on Metamask 'Unchecked runtime.lastError: Could not establish connection'

I use svelte to create Web3 app and got some error

1.I already added web3.js cdn on my index.html

<script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>

2.this is my script on .svelte file to connect the Metamask Wallet

function connectWallet(){
if(window.ethereum){
  window.web3 = new Web3(ethereum);
  window.ethereum.enable();
  metamaskConnected = window.ethereum.isConnected();
  web3.eth.getAccounts(function(error, accounts) {
    WalletAddress = accounts
    console.log(error)
  })
}

}

  1. And when i open my website on the broser (Brave) for the first time i got this error

    Unchecked runtime.lastError: Could not establish connection

and the script not working

  1. I have to refresh my page and then the error disappear so my code works normally

Could you give me some suggestion, Thank you very much

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I got the exact same issue on my dapp, I've to investigate more but it looks like it happpen on any Chromium browser and ONLY IF clicking the dapp url open the browser in the same time.

Pretty weird bug, probably a problem between the communication of Metamask and Chromium browsers

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda