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

395
Views
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 answers
Answer question

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 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!