hicommonwealth / commonwealth

A platform for decentralized communities
https://commonwealth.im
GNU General Public License v3.0
67 stars 42 forks source link

Metamask wallet login erroring out on Brave browser #5970

Closed jnaviask closed 9 months ago

jnaviask commented 9 months ago

Describe the bug

The login process via Metamask wallet and other connected wallets creates errors due to different reasons. The collection of bugs ultimately creates different issues for the login flow.

The ultimate issue is if there is a wallet already connected to our Dapp but there is an issue that comes up for every scenario in case the connecting wallet and creating account have any problem/interruption.

To Reproduce

1) Connect a wallet but does not finish the creation of the wallet causes the following error:

So the first issue is: When someone connects their wallet to our Dapp but does not fully create an account or connect it to an account as a secondary address, we receive this issue.

2) If the user clicks login and then clicks coin base wallet but waits more than around 30 seconds before signing the connection signature request, the wallet connects to our Dapp however our create a new user or add to existing account flows do not come up and ultimately causes the issue above.

Additional context

Supersedes #5629

egetekiner commented 9 months ago

in addition to that, the same issues come up with Chrome web browser. Probably during the error creation, the needed standards for recreating the error did not happen with the chrome browser so we thought it only happened with the brave browser. It is a general issue with out flow.

ianrowan commented 9 months ago

This issue will be fixed with the coinbase wallet option: #5982

Root cause is mismatched parameter for personal_sign similar to the #5845 1inch sign in issue. After breaking it out into its own controller this is fixed.

egetekiner commented 9 months ago

I just maded the needed checks for login processes for the following usecase scenarios:

1) Only Metamask enabled 2) Metamask + Coinbase wallet enabled 3) Metamask + Coinbase + Phantom enabled

As @ianrowan said, the issue has been resolved with #5982

I am closing this issue with this tests and upgrade.