-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Instantiating web3 unavoidably prints console warnings regardless of relevance #3898
Comments
Interesting, so web3 auto-imports bzz and shh by default (its in the main web3 export). how bad does this look in the logs? cc: @frankiebee any thoughts? |
yarn remove web3-util gets rid of the console warnings... |
Simply re-installing the 1.3.3 version of web3 and web3-utils will eradicate these warnings. Hope that helps |
The warnings can also be avoided by instantiating only the subpackages you need, not the whole Web3 metapackage. In other words, instead of
something like
|
I'm aware of that, but to make that change throughout our entire codebase -- which would also require changing |
agree |
Should not update until web3/web3.js#3898 fixed.
Hi, what with Berlin coming up I wanted to check on this. I'm assuming that you're planning to implement support for access lists in an upcoming version, right? (I don't see an issue for it, but I have to assume this is planned.) When this happens we'll want to upgrade Truffle to the new version so that our users can use access lists, but, again, we cannot upgrade until this bug is fixed. Btw, one possible way to deal with this, if you insist on having some sort of console warnings for |
Oh, it looks like #3917 addresses this. It wasn't linked so I didn't know that was going on. OK, whew! So we should be finally able to upgrade to 1.3.5, then. :) |
Switching the version to |
I mean, yes, but I'm waiting for 1.3.5 to actually be released before upgrading! (I'm hoping that's soon? The candidate has been out nearly two weeks...) |
This fixed the issue for me thanks |
This can be closed now, right? This was fixed in 1.3.5, right? |
Well I guess so, but it works for me. |
OK, I'm going to go ahead and close this, I don't know why this is still open given that this was fixed in 1.3.5 -- thanks again for that, btw! |
Expected behavior
Instantiating web 3 should not print warnings to the console; or at the least, it should not print warnings about parts of web3 that the user may not be using.
Actual behavior
Instantiating web3 -- with or without a provider -- prints the following warnings:
This occurs regardless of whether any actual use of
web3-shh
orweb3-bzz
is made.Relevance / context
I'm commenting here from the Truffle project; we'd been using web3 1.2.9 due to #3748, but with 1.3.4 this bug is finally fixed and so we were finally able to upgrade to 1.3. However, it turns out we've had to revert that upgrade, as using 1.3.4 means our CLI output is interrupted by large numbers of irrelevant warnings. Truffle uses neither
web3-shh
norweb3-bzz
, but our users get warned about it anyway, and the volume of these warnings overwhelms useful output.So, I would like this to be fixed so that we at Truffle can finally upgrade to web3 1.3, as people have been asking us to do.
Thank you!
Steps to reproduce the behavior
Environment
web3.js: 1.3.4
node.js: v10.22.1
The text was updated successfully, but these errors were encountered: