Warning in console: window.web3 is deprecated

Description of the issue:
I am getting the following warning on the console: “You are accessing the window.web3 shim. This object is deprecated, please use window.ethereum instead.”

How can this issue be reproduced?
It is an intermittent issue. It just happens now and then on different pages (I’ve seen it mainly on CodePen as I was testing some code).

Expected result:
No errors/warnings caused by browser’s scripts (if it’s a browser issue).

Brave Version( check About Brave):
Version 1.46.153 Chromium: 108.0.5359.128 (Official Build) (x86_64)

Additional Information:
Checking on the source, this warning is caused by a file that does not belong to the site or any extension:

warning-2

The file generating it is ethereum_provider.js. Is it a browser-injected script? (could it be related to this?) If yes, please fix it :sweat_smile:; If not, I guess I may need to explore how/what is executing on my Brave browser :sweat:.

Do you use rewards and wallet and all that?
if not, you can disable those script from running on every page by going to brave://settings/web3 and setting the wallets to none.

I use rewards and wallet.

So it is a Brave script that is “failing” then? That’s a slight relief (vs having some bug running on my computer). Is it a known issue?

I have no idea, I don’t use wallet or rewards, but I know, even if you don’t use them the script run because of those wallet default settings, but I disable them through flags.

All I could find in github was this https://github.com/brave/brave-browser/issues/20353 which they fixed in snowtrace.io and staking.trava.finance

As you can see by Brian Bondy’s tweet from the issue, https://twitter.com/brianbondy/status/1479124596456624144 and what I understood about it is that the websites having the deprecated stuff, and then Brave having to add it, causing the console to display the error because the website doesn’t have the window.ethereum support like they should.

But since I don’t know (care) about wallets and web3 and all that, then I can’t really know exactly what the problem is and the APIs or whatever involved on it.
So I would say that if a website should run these wallet web3 stuff, it should be reported, probably reported to the website people not even Brave (apparently), and if the website you are getting errors is just a random website that doesn’t matter if these scripts fail, then it doesn’t matter to report it.

At least you know the scripts are legit and it’s not like some weird stuff from a 3rd party being injected or anything.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.