coinbase / coinbase-wallet-sdk

An open protocol that lets users connect their mobile wallets to your DApp
https://coinbase.github.io/coinbase-wallet-sdk/
MIT License
1.4k stars 521 forks source link

Bug: Arc browser. 401 cors to /rpc/v3/scw/getAccounts #1278

Closed Yuripetusko closed 1 month ago

Yuripetusko commented 2 months ago

Describe the bug

When launching smart wallet in Arc browser, it opens it in a new tab, but it never loads. I see bunch of polled /rpc/v3/scw/getAccounts requests with 401 status

Steps

  1. Using latest rainbowkit, wagmi, and @coinbase/wallet-sdk: "4.0.0-beta.12"
  2. Click a button to connect a wallet using coinbase connector
  3. Arc browser opens a new tab for https://keys.coinbase.com/sign/eth-request-accounts and loading start but never finishes
  4. console shows a bunch of polled requests to https://api.wallet.coinbase.com/rpc/v3/scw/getAccounts with status 401

Same code works in Brave browser

Expected behavior

Smart wallet popup/tab to load

Version

4.0.0-beta.12

Additional info

"@rainbow-me/rainbowkit": "^2.0.7",
"viem": "^2.10.1",
"wagmi": "^2.8.1"
"resolutions": {
    "@coinbase/wallet-sdk": "4.0.0-beta.12"
  }

Desktop

Smartphone

No response

Yuripetusko commented 2 months ago

Just tried this https://wagmi-scw.vercel.app/

And getting the same issue on Arc

Yuripetusko commented 2 months ago

I think it might be due to how Arc treats popup more like a new full tabs

technophile-04 commented 1 month ago

Yup :( It occurs in this too https://coinbase.github.io/coinbase-wallet-sdk/

Demo video : https://github.com/coinbase/coinbase-wallet-sdk/assets/80153681/a6f5c8db-6bd2-40bc-b296-e2efd66d98e5

I have also tried with latest dependencies :

"dependencies": {
  "@rainbow-me/rainbowkit": "2.1.0",
  "viem": "2.10.9",
  "wagmi": "2.9.2",
}

Since wagmi and raibowkit now directly support v4 but it still doesn't work

arjun-dureja commented 1 month ago

Is this still happening on version 4.0.2?

Yuripetusko commented 1 month ago

Looks like it's fixed now