[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/[email protected]/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.

@glad yes you right, it’s now worked locally too