anza-xyz / wallet-adapter

Modular TypeScript wallet adapters and components for Solana applications.
https://anza-xyz.github.io/wallet-adapter/
Apache License 2.0
1.44k stars 906 forks source link

TypeError: off is not a function #954

Closed umaid56 closed 3 weeks ago

umaid56 commented 2 months ago

I get this error whenever I use the Solana wallet adapter package in my Next.js project. Every time I run the project, I encounter this error initially. However, after refreshing the page, the wallet connection works fine, and transitions through Phantom also work well. But whenever I stop and restart the server on localhost, I consistently encounter this error again.

Unhandled Runtime Error
TypeError: off is not a function

Call Stack
StandardWalletAdapter.destroy
webpack-internal:/node_modules/@solana/wallet-standard-wallet-adapter-react/node_modules/@solana/wallet-standard-wallet-adapter-base/lib/esm/adapter.js (102:1)
eval
webpack-internal:/node_modules/@solana/wallet-standard-wallet-adapter-react/lib/esm/useStandardWalletAdapters.js (24:14)
Array.forEach
<anonymous>
eval
webpack-internal:/node_modules/@solana/wallet-standard-wallet-adapter-react/lib/esm/useStandardWalletAdapters.js (24:14)
ronypk999 commented 2 months ago

This is also happening with me.. Screenshot from 2024-05-04 20-34-13

besides another error encounters often with object.setToggle when i click the pay button while phantom connecetd.

Screenshot from 2024-05-04 20-41-31

These bugs must be solved quickly

mcintyre94 commented 1 month ago

Can you provide source code or a link to a hosted example of this please? I don't see this on our hosted example project: https://anza-xyz.github.io/wallet-adapter/example/

jordaaash commented 3 weeks ago

Closing as no repro / stale. Please provide more details.