Bug: MetaMask Chrome extension fails to connect to bridge UI #120
Labels
No labels
agent:implement
agent:ready
backend
bug
cannot-reproduce
confirmed
desktop
docs
documentation
duplicate
enhancement
feature
frontend
good first issue
help wanted
high-risk
in-review
invalid
mobile
needs-triage
P0-critical
P1-high
P2-medium
P3-low
qa
QA
question
ready
report
responsive
security
security-escalate
smart-contract
solana
tablet
test-pass
ux
wallet-issue
wallet:keplr
wallet:metamask
wallet:station
wallet:walletconnect
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
code/cl8y-bridge-monorepo#120
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
User report: MetaMask (browser extension) on Google Chrome does not connect to the bridge web app. Details from the reporter (environment, URL, error text, screenshots) were not attached to this ticket yet—please add them in a comment.
Request for @Brouie
Please try to reproduce this on Chrome + MetaMask extension against the environment the user meant (production
https://bridge.cl8y.com/unless stated otherwise).How to test (matrix)
Browser
chrome://version).MetaMask
MetaMask → Settings → About).Site
https://bridge.cl8y.com/Flow
DevTools
ethereum, CSP, CORS, or blocked popups).Extensions / OS
Possible causes (hypotheses—not confirmed)
multiInjectedProviderDiscovery; another extension could steal focus or confuse discovery (seeuseEvmWalletDiscoveryandEvmWalletModal).VITE_WC_PROJECT_IDon a given deploy (WalletConnect path broken; MetaMask extension should still work per.env.example—worth verifying which deploy they hit).detectInAppBrowser.ts).Information we still need from the reporter
Please ask the reporter (or add if known):
assigned to @Brouie
Cannot reproduce on stock setup. Closing per matrix instructions.
Environment
Other EVM-injecting extensions enabled at test time
This is a worst-case-style provider collision setup — 7 extensions all touching window.ethereum:
Plus several Cosmos/Terra wallets which don't fight over window.ethereum: Cosmostation, Keplr, Station.
Result
MetaMask connected successfully:
Console errors observed (NOT bridge-blocking on this machine, but flagging for dev)
The injected-provider collision IS observable in console even though it didn't break connection here:
Uncaught TypeError: Cannot redefine property: ethereum(evmAsk.js:15) — this is OKX's injected provider losing the raceUncaught TypeError: Cannot set property ethereum of #<Window> which has only a getter(requestProvider.js — Coinbase Wallet's likely culprit based on the line range)MetaMask encountered an error setting the global Ethereum provider - this is likely due to another Ethereum wallet extension also setting the global Ethereum providerBackpack couldn't override window.ethereum(injected.js)So per EIP-6963 / multiInjectedProviderDiscovery, MetaMask still won the race here and wagmi found it. But the race is real and order-dependent. On a machine where extensions load in a different order, OR where another extension wins the race definitively (e.g. Phantom or Rabby asserting earlier), MetaMask might not be discovered at all.
Recommendation for follow-up with the original reporter
Ask the reporter to:
Closing as cannot-reproduce on stock + worst-case-collision setup. Reopen if reporter provides specifics that change the picture.
cc @PlasticDigits