Error When Authenticating with Metamask [SOLVED]

I’m following the YouTube tutorial for authenticating users with metamask but getting an error.


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


	<button onclick="login()">Login with Metamask</button>

		Moralis.initialize("hbLGi00XmJZOwrkmjGeYXLmPOxdgg4Bj2GyAA6Gx"); // Application id from
		Moralis.serverURL = ""; //Server url from
		async function login(){
			console.log("login clicked");
			var user = await Moralis.Web3.authenticate();


moralis.js:4497 Uncaught (in promise) Error: Non ethereum enabled browser
    at moralis.js:4497
    at tryCatch (moralis.js:24495)
    at Generator.invoke [as _invoke] (moralis.js:24725)
    at (moralis.js:24550)
    at asyncGeneratorStep (moralis.js:23942)
    at _next (moralis.js:23964)
    at moralis.js:23971
    at new Promise (<anonymous>)
    at new Wrapper (moralis.js:26960)
    at moralis.js:23960

Tutorial Video:

Did you install the MetaMask browser extension? I get the same error in my browsers that don’t have MetaMask installed (Non ethereum enabled browser).

1 Like

Try install metamask in your browser

1 Like

Another cause of this error is not serving the html on localhost. See the Troubleshooting docs here: