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

201
Views
i cant log into meta mask. im doing a moralis project

I'm having a really aggravating problem I’m on the the dex JavaScript tutorial on moralises academy and I'm getting the following error

Uncaught (in promise) Error: Cannot execute Moralis.enableWeb3(), as Moralis Moralis.enableWeb3() already has been called, but is not finished yet

this is my code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


        <!-- Moralis SDK code -->
        <script src="https://cdn.jsdelivr.net/npm/web3@latest/dist/web3.min.js"></script>
        <script src="https://unpkg.com/moralis/dist/moralis.js"></script>
    <title>Moralis Dex </title>

</head>


<body>
    
    
    <button id="btn-login">Moralis Login</button>
    <button id="btn-logout">Logout</button>


    <script src="./dex.js"></script>

</body>
</html>


      // connect to Moralis server
   
         const serverUrl = "******************";
         const appId = "**********";
         Moralis.start({ serverUrl, appId });
   
   
   
        // add from here down
        async function login() {
         let user = Moralis.User.current();
         if (!user) {
           user = await Moralis.authenticate();
         }
         console.log("logged in user:", user);
       }
   
       async function logOut() {
         await Moralis.User.logOut();
         console.log("logged out");
       }
   
       document.getElementById("btn-login").onclick = login;
       document.getElementById("btn-logout").onclick = logOut;
   
   
   async function getTop10tokens() {
       const response = await  fetch (' https://api.coinpaprika.com/v1/ ');
       const tokens  =  await response.json();
   
       return tokens.filter( token => token.rank <= 10).map(token => token.symbol);
   
   }
   
   async function gettickerdata() {
       const response  = await fetch ('https://api.1inch.exchange/v3.0/137/tokens');
       const tokens =  await response.json ();
       const tokenlist = object.values(tokens.tokens);
   
       return tokenlist. filter(token => tickerlist.includes(token.symbol));
   
   }
   
   getTop10tokens()
       .then(gettickerdata)
       .then(console.log);

what am I doing wrong? Metamask connects but its blank log in and doesnt connect too the app like its supposed too when i watch the video tutorial

about 4 years ago · Juan Pablo Isaza
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!