walletconnect-monorepo: Cannot read properties of undefined (reading 'importKey')
I am running latest version of nextjs, @walletconnect/client and @walletconnect/qrcode-modal
When the button is pressed the modal shows but an error in developers tools shows
“Uncaught (in promise) TypeError: Cannot read properties of undefined (reading ‘importKey’)”
It works on development build but now production
const connector = new WalletConnect({
// Required
bridge: 'https://bridge.walletconnect.org',
qrcodeModal: QRCodeModal,
// Required
clientMeta: {
description: 'My website description ',
url: 'https://mywebsite.url',
icons: ['../assets/svg/icon.svg'],
name: 'My website name',
},
});
const connect = () => {
// Check if connection is already established
if (!connector.connected) {
// create new session
connector.createSession();
} else {
connector.sess;
}
};
// This is used to start login process with WalletConnect
<button onClick={connect}></button
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22
And you closed this???
You most likely are not using SSL on your domain. This error appears if you open your website via http vs https.
My Website uses HTTPS still, I am getting this error.
I’m facing the same error on mobile phones while invoking and eth_sign json rpc request to metamask app installed on mobile. Desktop with metamask browser extension works perfectly.
Same problem here.
It’s practically impossible to test a dApp without building it and serving through a trusted domain.
i also got same error in mobile phones, at laptop/desktop its working fine. Error is: cannot read properties of undefined ( reading importKey` )
nextjs13