[SOLVED] Connect Wallet have Non Ethereum Enable browser error

Iā€™m having error like this

the code is like this

async function login() {
    let user = Moralis.User.current();
    if (!user) {
      user = await Moralis.authenticate();  
      ethAddress =  user.get("ethAddress");
...

what i do wrong here? months ago this have no problemā€¦

anyone can help, thanks.

You have to use Moralis v1 sdk try to change from moralis to motalis-v1 in the header where is imported

this is my header

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

and still having same error

Do you actually have a wallet extension like MetaMask installed in the browser youā€™re using? Thatā€™s the main reason for getting that ā€œNon ethereum enabled browserā€ error.

yes i have metamask installed

Can you screenshot your full site page showing MetaMask and the console open with the error.

Also make sure youā€™re running your app/site from a local webserver (something like http://localhost:3000), not just opening the index.html file directly.

ok i solved the problem, somehow i need to put my site on host, i put my site on netlify, and itā€™s worked.

as i know this worked locally beforeā€¦ :thinking:

If youā€™re using VS Code, you can use this extension.

Or use something like serve.

@alex yes you right, itā€™s now worked locally too