pianity / arsnap

Arweave Snap for Metamask
20 stars 3 forks source link

ArSnap does not work, RpcProvider gets unknown response id #14

Closed Sirgulator closed 2 years ago

Sirgulator commented 2 years ago

Tested on Chromium 103.0.5060.114 and Metamask Flask: 10.17.0-flask.0 Error direct on loading page.

inpage.js:1 MetaMask: Lost connection to "MetaMask RpcProvider".
Error: StreamMiddleware - Unknown response id "3128787891"
    at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:1:55198
    at d.write [as _write] (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:1:55316)
    at w (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:17:29867)
    at chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:17:33045
    at y.write (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:17:33072)
    at i.g (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:17:22073)
    at f (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:8:21088)
    at o.emit (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:8:24074)
    at _ (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:17:16876)
    at v (chrome-extension://nkbihfbeogaeaoehlefnkodbefgpgknn/inpage.js:17:16691)
_handleStreamDisconnect @ inpage.js:1
inpage.js:1 Error: StreamMiddleware - Unknown response id "3128787891"
    at l._handleDisconnect (inpage.js:1:38747)
    at l._handleDisconnect (inpage.js:1:42344)
    at l._handleStreamDisconnect (inpage.js:1:46473)
    at inpage.js:17:12354
    at t (inpage.js:17:8407)
    at d.<anonymous> (inpage.js:17:11676)
    at d.t (inpage.js:17:8407)
    at d.h (inpage.js:8:27815)
    at d (inpage.js:8:21053)
    at o.emit (inpage.js:8:24049)
_handleDisconnect @ inpage.js:1
inpage.js:1 MetaMask: Lost connection to "MetaMask RpcProvider".
Error: StreamMiddleware - Unknown response id "2088519189"
    at chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/inpage.js:1:55198
    at d.write [as _write] (chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/inpage.js:1:55316)
    at w (chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/inpage.js:17:29867)
    at chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/inpage.js:17:33045
    at y.write (chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/inpage.js:17:33072)
    at i.g (chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/inpage.js:17:22073)
    at f (chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/inpage.js:8:21088)
    at o.emit (chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/inpage.js:8:24074)
    at _ (chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/inpage.js:17:16876)
    at v (chrome-extension://ljfoeinjpaedjfecbmggjgodbgkmjkjk/inpage.js:17:16691)
_handleStreamDisconnect @ inpage.js:1
inpage.js:1 Error: StreamMiddleware - Unknown response id "2088519189"
    at l._handleDisconnect (inpage.js:1:38747)
    at l._handleDisconnect (inpage.js:1:42344)
    at l._handleStreamDisconnect (inpage.js:1:46473)
    at inpage.js:17:12354
    at t (inpage.js:17:8407)
    at d.<anonymous> (inpage.js:17:11676)
    at d.t (inpage.js:17:8407)
    at d.h (inpage.js:8:27815)
    at d (inpage.js:8:21053)
    at o.emit (inpage.js:8:24049)
noomly commented 2 years ago

Hey there, thanks for submitting an issue!

Can you give more detail about the version of Arsnap on which you're experiencing this issue? Did you build it from source or are you using the deployed Wallet at arsnap.org?

Also, can you check whether Arsnap is listed in the "Snaps" section of Metamask's settings?

Sirgulator commented 2 years ago

This was tested on arsnap.org, page was stuck on loading, full log was supplied. Arsnap has not connected to metamask, not in the settings

noomly commented 2 years ago

Thanks for the additional info. This sounds like it's an issue with Metamask, I'll forward it to their Snap team.

Just to be sure I understand how the issue manifests, when you say

Error direct on loading page

Do you mean that the page is stuck in the loading animation even before you press any of the two "Connect with Metamask" button? Do they even show up?

Also, did you grab the logs from the page's console or from Metamask's background script's console?

EDIT: By the way, could you please try to uninstall/reinstall Metamask on your browser? (making backups if anything important is in there!). Sorry for the trouble, I haven't been able to reproduce this error and I haven't seen the error you pasted so far so I can't really test anything on my end.

noomly commented 2 years ago

I got an answer from someone at Metamask and they suggested the error you see could come from having both Metamask and Metamask Flask installed on your browser. Is it the case for you?

If it is, then it's due to some implementation details on Metamask's end. The only workaround here is to temporarily disable Metamask while running Metamask Flask on your browser.

noomly commented 2 years ago

Without any answer from @Sirgulator I assume the issue was the one described in my previous comment (two Metamask versions being installed at the same time).

I implemented a mechanism that detects whether Metamask has been installed more than once or if it isn't installed at all in 1b5fcd3eba5b84f0ba161e4c7f05a1f282f537e7. It will now display a proper message with indications instead of an infinite loading animation. It should be included in the next wallet version (v0.0.8) coming next week.