web3modal icon indicating copy to clipboard operation
web3modal copied to clipboard

Error on demo site and code samples with WalletConnect

Open rrecuero opened this issue 5 years ago • 8 comments

Hi there

Head to web3modal.com and clicking on Connect and select Wallet Connect.

After approving it on my mobile wallet, I get this error on the dev console. 💥

wallet connect
index.js:491 wc:b81d0543-e361-4963-a854-bb5275bbde39@1?bridge=https%3A%2F%2Fbridge.walletconnect.org&key=0ac196e5b13b9cc291c86402cc453f414bd004f483afdd16a5cbc15f1e4fdb69
index.js:420 Uncaught (in promise) TypeError: this.send is not a function
    at index.js:420
    at _ (runtime.js:63)
    at Generator._invoke (runtime.js:282)
    at Generator.t.<computed> [as next] (runtime.js:116)
    at tslib.es6.js:115
    at new Promise (<anonymous>)
    at Module.f (tslib.es6.js:94)
    at value (index.js:415)
    at value (util.js:707)
    at t.c.send (index.js:162)

rrecuero avatar Oct 07 '20 03:10 rrecuero

Same problem

newsum avatar Oct 09 '20 19:10 newsum

Same here!

transmissions11 avatar Oct 11 '20 00:10 transmissions11

There was 1.3.0 release few days ago:

https://github.com/WalletConnect/walletconnect-monorepo/releases/tag/1.3.0

@pedrouid I do not see any updates to bump Web3modal to the latest version? I assume older versions should not break unless the bridge server changes somehow.

Also would this be related to web3.js issue that appeared some time ago:

https://github.com/ethereum/web3.js/pull/3649

miohtama avatar Oct 12 '20 08:10 miohtama

@miohtama Ah upgrading to 1.3.1 fixed this issue. Thank you!

transmissions11 avatar Oct 12 '20 15:10 transmissions11

@miohtama Ah upgrading to 1.3.1 fixed this issue. Thank you!

hi, I try to with upgrade walletconnect to 1.3.1, but this issues still same, do you have any more details about your solution? thanks!

sa1i avatar Oct 16 '20 17:10 sa1i

@sa1i Try downgrading to web3 version 1.2.11 as well!

transmissions11 avatar Oct 17 '20 00:10 transmissions11

The line of code causing this issue is

  request(payload) {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            return this.send(payload);
        });
    }

of index.js in @walletconnect/web3-provider/dist/cjs

No clue what's causing it, but it seems to consistently break

cinnabarhorse avatar Oct 22 '20 08:10 cinnabarhorse

Discovered the issue. My infura key had been rate limited :)

cinnabarhorse avatar Oct 22 '20 15:10 cinnabarhorse

With stable version 2.0.0 of Web3Modal now released, we are officially dropping support for version 1.x Due to this this issue/pr was marked for closing. It is highly recommended to upgrade as 2.x will be receiving further updates that will enable functionality for some of our newer sdks like auth and push as well as support for WalletConnect v2 (See this post about WalletConnect v1 being deprecated https://medium.com/walletconnect/walletconnect-v1-0-sunset-notice-and-migration-schedule-8af9d3720d2e)

If you need to continue using Web3Modal 1.x and require this feature/fix implemented, we suggest adding it via forking V1 branch.

xzilja avatar Jan 21 '23 14:01 xzilja