Vanilla Boilerplate - works in Firefox, not Chrome or Brave

Out of the box, the vanilla boilerplate won’t work in Chrome. This is uploaded to my web server, so running on the web, not local.
As usual when I hit a wall (seems simple enough, couldn’t figure out what I was doing wrong) I tried another browser. Bingo, loads and works in Firefox first time, MM window opens and asks me to sign. But Chrome and Brave, the Metamask modal never shows up on button click. Button does nothing on those browsers.

What could be the reason for this?

It can’t be something like “do you have javascript active” because, yes I do, I use other web3 things on those browsers. And, as another comparison, the Ethereum Boilerplate (a much more complicated thing) runs fine in Chrome on Localhost.

60% of the world uses Chrome though, so it’s weird that it doesn’t work there.
Have no idea why this would be, looking for help in understanding this please.

Thanks

OK, so testing further, I can connect on Firefox (FF) but the disconnect button doesn’t function.

Can someone tell me what I am doing wrong? I’ve read through the fairly simple code on the GIT and on the docs page here: https://docs.moralis.io/moralis-server/getting-started/connect-the-sdk

(Note there are subtle differences in code for those 2 sources)

But it doesn’t function on Chrome or Brave at all, and while I can log in on FF I can’t log out with the button.

The logout button does send a 200 Post Request, I can see this in the console. But Metamask doesn’t disconnect.

What you mean by MetaMask doesn’t disconnect? Usually you logout from Moralis on logout.

By disconnect I mean logout, there’s a literal logout button in the boilerplate that’s supposed to prompt Metamask to disconnect from the site, right?
Either way, login isn’t working on Brave or Chrome still. I mean it’s a boilerplate it should work out of the box to do a simple thing like that, before getting into any adaptation or customisation at all?

this is the code that you use?

Yes, that is the one.
It’s also covered a little in this Moralis Course which I am re-watching now to try to figure out why it doesn’t function as expected
https://www.youtube.com/watch?v=MY4WYoZPr-U from 28mins onward I think

what is the exact error that you get? do you see anything in the browser console?

I see various things, not sure what I am looking for TBH
Either of these?

What should the behaviour be on “logout”? Metamask should completely disconnect from the site, right? Or Moralis just stops logging?

it looks like there are some settings/script there that disable console.log

maybe you have some browser add on that disables features?

Disabled all extensions, restarted Chrome and Firefox. As for extensions, all I really had was 2 different ad blockers.
Can log in and connect on FF and Chrome, not log out. On both, log out button does nothing, Metamask still reports site is connection.
Console still shows “MetaMask: The event ‘close’ is deprecated and may be removed in the future. Please use ‘disconnect’ instead.” Is this the cause?
What’s the expected behaviour when clicking logout?

on logout metamask will not disconnect, only current session to your Moralis server will end

in general you shouldn’t get error for console.log not working, that looks like it is a problem unrelated to Moralis SDK

OK thanks for clarifying, I think that should also be made clear in the docs - that “logout” is just for Moralis server recording info, not for log out of this website with metamask. That’s really quite confusing and we could have saved a lot of posts if that was made clear. “Logout from Moralis” vs “Disconnect Metamask from this site”. For a long time now here I was thinking this wasn’t working. Case closed.