Closed Chocopieca closed 1 year ago
Hey @Chocopieca the Resolution is not a constructor
error might be the problem here. Could you try turning it off via the init options to onboard to confirm that is the case or not:
const onboard = web3Onboard({
// .... other options
connect: {
disableUDResolution: true
}
})
Also which bundler are you using with Vue? If you are using Vite, check out our docs for Vite build environments as this is likely an issue with module resolution.
I set disableUDResolution to true but it doesn't resolve my problem. I steel catch MaxListenersExceededWarning.
I use vite build evironments from your doc and catch "node_modules/crypto-js/core.js:53:30: ERROR: Could not read from C:/path-for-project/crypto-browserify". After I set alias "crypto: 'crypto-browserify'" build script try to require crypto in this path which doesn't exist. Am I doing something wrong? My problem still happens.
For Goerli test I use a common usdt contract from google search.
@Adamj1232 Yes, I tried this example and still catch Listeners warning and tab freeze. When I connect to Metamask, everyone is going well, but when I initiate usdt contract I catch this problem.
I tried to use vite expended example from doc and I tried to use vite code from react project. I rework my code with example from vue3 project. Now I use sepolia chain, it works fine, but I want to use goerli in the future.
@Chocopieca Might try a look at #1645 for possible resolution. Looks like you are missing dep. Also, the contract should have no affect on web3-onboard as we do not alter or perform any actions on contract calls.
@Adamj1232 Thank you for the reference. No, problems happen with all contracts on Gorile.
@Chocopieca If you are able to send a stackblitz or way to reproduce this issue that would be helpful as I am unable to reproduce this locally. We don't do any contract interaction manipulation so I dont think this is an issue within onboard. Can you confirm all dev-deps have been added?
Working well on my side - if I can help tell me @Adamj1232 using also Vite and Vue3
Closing this issue - thanks all
Current Behavior
I init web3 instance by using web3-onboard/core with Goerli chain in options. After that I try to init my smart contract by this instance.
When I push my connect button, I get MaxListenersExceededWarning in my console. MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 101 "message" listeners added. Use emitter.setMaxListeners() to increase limit. And I get error TypeError: Resolution is not a constructor:
After that tab freezes, my vue dev tools don't updates and somtimes dev tools enables debug mode.
My logs: localhost-1680776884854.log
Expected Behavior
No response
Steps To Reproduce
{ wallets: [injected, fortmatic], chains:{ id: "0x5", token: "ETH", label: "Goerli", rpcUrl: "https://eth-goerli.public.blastapi.io", }, appMetadata: { name: "MyProject", icon: logo, logo: logo, description: "Project using Onboard", recommendedInjectedWallets: [ { name: "Coinbase", url: "https://wallet.coinbase.com/" }, { name: "MetaMask", url: "https://metamask.io" }, ], }, }
What package is effected by this issue?
@web3-onboard/core
Is this a build or a runtime issue?
Runtime
Package Version
9.4.0
Node Version
v16.17.1
What browsers are you seeing the problem on?
No response
Relevant log output
No response
Anything else?
It happans on all browsers. I tried to increase the listeners limit but unfortunately, it is not working. If I use another chain, this problem does not occur.
Sanity Check