BSC Intro Tutorial

Hello guys
Currently following the " Learn BSC Programming (Binance Smart Chain) FULL COURSE" on Youtube and for some reason dApp isn’t connecting to the Moralis Server.

Console.log throws the following message

i looked for potential issues like changing the source from “latest” to @0.0.37 etc but this resulted in more issues.

<script src="[email protected]/dist/web3.min.js"></script>

Thank you for your help,

index.html file

<!DOCTYPE html>
<html lang ="en">
        <title> BSC Dapp </title>
        <!--ref link to skip CSS-->
        <link href="[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">
            <div class="container">
                <div class="mt-2 mb-2">
                <h1> BSC Tracker</h1>
                <div class="mt-2 mb-2">
                    <input id="username" type = "text" class="form-control" placeholder="Username">
                    <input id="email" type = "text" class="form-control" placeholder="E-Mail">
                <div class="mt-2 mb-2">
                    <button id="login" class = "btn btn-dark" onclick="login();">Connect Metamask</button>

        <script src="[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-U1DAWAznBHeqEIlVSCgzq+c9gqGAJn5c/t99JyeKa9xxaYpSvHU5awsuZVVFIhvj" crossorigin="anonymous"></script>
        <script src="[email protected]/dist/web3.min.js"></script>
        <script src=""></script>
        <script src="static/logic.js"></script>


logic.js file


var user; 
async function login() { 

    Moralis.Web3.authenticate().then(function (user){
        user.set("name", document.getElementById("username").value);
        user.set("email", document.getElementById("email").value);;
        console.log("login clicked");
    function deactivateControls() {
        document.getElementById("login").setAttribute("disabled", null);    
        document.getElementById("username").setAttribute("disabled", null);    
        document.getElementById("email").setAttribute("disabled", null);


Hey @dexda

There is a mistake in initialization. You need to use:

Moralis.initialize("vxvxvxvxvxvxvx"); // Application id from
Moralis.serverURL = ""; //Server url from

Hope this will help you :man_mechanic:

1 Like

dude… thank you so much for your quick help. Next time i know what to wach out for

enjoy your weekend!

1 Like