Bug: Solana withdrawSubmit fails -- wallet extension uses rate-limited RPC (api.mainnet.solana.com 403) #102

Closed
opened 2026-04-09 04:39:04 +00:00 by Brouie · 9 comments
Brouie commented 2026-04-09 04:39:04 +00:00 (Migrated from gitlab.com)

Mainnet v0.1.82 (b9c6d54)

Current behavior: All Solana-destination transfers (Terra->Solana, BSC->Solana, opBNB->Solana) deposit successfully on source chain but withdrawSubmit on Solana crashes with 'Cannot destructure property err of r as undefined'. The wallet extension (Phantom/Backpack) broadcasts via its own RPC (api.mainnet.solana.com) which returns HTTP 403.

Affected transfers:

Error chain:

  1. Deposit succeeds on source chain
  2. Frontend attempts Solana withdrawSubmit
  3. Wallet extension hits api.mainnet.solana.com -> 403 Forbidden
  4. RPC returns undefined response
  5. JS crashes: Cannot destructure property err of r as it is undefined
  6. Signature expires: block height exceeded
  7. UI shows Hash Submission Failed

Root cause: The bridge frontend configures 8 Solana RPC endpoints but the wallet extension uses its own RPC (api.mainnet.solana.com) for broadcasting and confirming transactions. The bridge config does not override the wallet RPC.

Possible fixes:

  1. Force wallet to use bridge RPC endpoints for tx broadcast
  2. Have bridge broadcast the signed tx itself using its own RPC connection instead of relying on wallet
  3. Add try/catch around the destructure to show a meaningful error instead of crashing

Note: The Solana 403 errors from injected.js in console are from the wallet extension, not the bridge frontend.

Acceptance criteria:

  • Solana withdrawSubmit completes without crashing
  • Signed tx broadcasts via working RPC endpoint
  • Error handling shows meaningful message if RPC fails
**Mainnet v0.1.82 (b9c6d54)** **Current behavior:** All Solana-destination transfers (Terra->Solana, BSC->Solana, opBNB->Solana) deposit successfully on source chain but withdrawSubmit on Solana crashes with 'Cannot destructure property err of r as undefined'. The wallet extension (Phantom/Backpack) broadcasts via its own RPC (api.mainnet.solana.com) which returns HTTP 403. **Affected transfers:** - opBNB->Solana: https://opbnbscan.com/tx/0x8d57ec8d59138fe396e99b5c36424312792f729c1e97f47f4f301da5d93e2e34 - BSC->Solana: https://bscscan.com/tx/0xbadafb782d88dda756560c652078b61d6abadf7e9f72daa255226748b0482c3e - Terra->Solana: https://chainsco.pe/terra2/tx/CFFD4F0592B73B11994546C1F16BFFD69C76BA781D18337521A069FFD7E12BE0 **Error chain:** 1. Deposit succeeds on source chain 2. Frontend attempts Solana withdrawSubmit 3. Wallet extension hits api.mainnet.solana.com -> 403 Forbidden 4. RPC returns undefined response 5. JS crashes: Cannot destructure property err of r as it is undefined 6. Signature expires: block height exceeded 7. UI shows Hash Submission Failed **Root cause:** The bridge frontend configures 8 Solana RPC endpoints but the wallet extension uses its own RPC (api.mainnet.solana.com) for broadcasting and confirming transactions. The bridge config does not override the wallet RPC. **Possible fixes:** 1. Force wallet to use bridge RPC endpoints for tx broadcast 2. Have bridge broadcast the signed tx itself using its own RPC connection instead of relying on wallet 3. Add try/catch around the destructure to show a meaningful error instead of crashing **Note:** The Solana 403 errors from injected.js in console are from the wallet extension, not the bridge frontend. **Acceptance criteria:** - [ ] Solana withdrawSubmit completes without crashing - [ ] Signed tx broadcasts via working RPC endpoint - [ ] Error handling shows meaningful message if RPC fails
Brouie commented 2026-04-09 05:00:44 +00:00 (Migrated from gitlab.com)

Wallets tested: Backpack (Solana), MetaMask (BSC/opBNB), Terra Station (Terra Classic). The Solana 403 errors come from the Backpack wallet extension using api.mainnet.solana.com as its default RPC.

Wallets tested: Backpack (Solana), MetaMask (BSC/opBNB), Terra Station (Terra Classic). The Solana 403 errors come from the Backpack wallet extension using api.mainnet.solana.com as its default RPC.
PlasticDigits commented 2026-04-09 05:20:37 +00:00 (Migrated from gitlab.com)

QA review request (@Brouie)

A fix landed on main (commit 3803318) for the Solana withdraw / public-RPC 403 class of failures: merged backup RPC lists for all in-app Solana JSON-RPC usage, default tx path uses the bridge Connection (sign + sendRawTransaction) instead of the wallet’s default signAndSend to api.mainnet.solana.com, and HTTP 403-style failures surface a clearer in-UI message about switching to a wallet that supports custom RPC.

Please verify manually (mainnet-beta or the environment you use for production-like QA):

  1. Use several Solana wallets (e.g. Phantom, Backpack, Solflare — whichever you already support in the app). Run the same flow (e.g. Terra→Solana or EVM→Solana hash submit / full transfer) with each wallet, not only one.
  2. For each wallet, if anything fails, capture:
    • Exact wallet name and version (browser extension version if possible).
    • What the user sees in the app (exact wording of any error or toast).
    • What appears in the browser devtools console (full error lines / stack if any), and whether errors come from our bundle vs injected.js / extension code.
  3. Note whether failures happen on submit, confirm, or balance / read steps.

Paste findings here so we can tune messaging or env defaults if a wallet still bypasses our RPC path. Leaving this issue open until QA signs off.

**QA review request (@Brouie)** A fix landed on `main` (commit `3803318`) for the Solana withdraw / public-RPC 403 class of failures: merged backup RPC lists for all in-app Solana JSON-RPC usage, default tx path uses the bridge `Connection` (sign + `sendRawTransaction`) instead of the wallet’s default `signAndSend` to `api.mainnet.solana.com`, and HTTP 403-style failures surface a clearer in-UI message about switching to a wallet that supports custom RPC. **Please verify manually** (mainnet-beta or the environment you use for production-like QA): 1. **Use several Solana wallets** (e.g. Phantom, Backpack, Solflare — whichever you already support in the app). Run the same flow (e.g. Terra→Solana or EVM→Solana **hash submit** / full transfer) with **each wallet**, not only one. 2. For **each wallet**, if anything fails, capture: - **Exact wallet name and version** (browser extension version if possible). - **What the user sees** in the app (exact wording of any error or toast). - **What appears in the browser devtools console** (full error lines / stack if any), and whether errors come from **our bundle** vs **`injected.js`** / extension code. 3. Note whether failures happen on **submit**, **confirm**, or **balance / read** steps. Paste findings here so we can tune messaging or env defaults if a wallet still bypasses our RPC path. Leaving this issue **open** until QA signs off.
Brouie commented 2026-04-09 06:00:07 +00:00 (Migrated from gitlab.com)

Solana RPC fix confirmed working (build 3803318). withdrawSubmit now succeeds. Remaining issue is operator not executing on Solana -- moved to #103. Closing.

Solana RPC fix confirmed working (build 3803318). withdrawSubmit now succeeds. Remaining issue is operator not executing on Solana -- moved to #103. Closing.
Brouie commented 2026-04-10 02:39:36 +00:00 (Migrated from gitlab.com)

mentioned in issue #103

mentioned in issue #103
Brouie commented 2026-04-10 04:15:30 +00:00 (Migrated from gitlab.com)

mentioned in issue #106

mentioned in issue #106
Brouie commented 2026-04-10 04:19:18 +00:00 (Migrated from gitlab.com)

mentioned in issue #107

mentioned in issue #107
PlasticDigits commented 2026-04-13 03:58:03 +00:00 (Migrated from gitlab.com)

@brouie Triage (repo main): #102 is largely addressed in code — Solana txs default to bridge RPC (pickSolanaTxConnection / sendSolanaTransaction on app Connection), mainnet URL merge deprioritizes api.mainnet*.solana.com, and we added an explicit user message when wallets throw Cannot destructure… on bad RPC JSON (formatSolanaUserFacingError + SOLANA_WALLET_RPC_BAD_RESPONSE_USER_MESSAGE). Please re-test withdrawSubmit on mainnet with a current build; avoid legacy env VITE_SOLANA_TX_USE_WALLET_RPC=true unless intentional. If everything passes, please close this issue.

@brouie Triage (repo `main`): #102 is largely addressed in code — Solana txs default to bridge RPC (`pickSolanaTxConnection` / `sendSolanaTransaction` on app `Connection`), mainnet URL merge deprioritizes `api.mainnet*.solana.com`, and we added an explicit user message when wallets throw `Cannot destructure…` on bad RPC JSON (`formatSolanaUserFacingError` + `SOLANA_WALLET_RPC_BAD_RESPONSE_USER_MESSAGE`). Please re-test withdrawSubmit on mainnet with a current build; avoid legacy env `VITE_SOLANA_TX_USE_WALLET_RPC=true` unless intentional. If everything passes, please close this issue.
PlasticDigits commented 2026-04-13 04:04:21 +00:00 (Migrated from gitlab.com)

mentioned in commit 5fc9eb4b50

mentioned in commit 5fc9eb4b50e3f654e9d29576efa861e375c956a0
Brouie commented 2026-04-13 05:02:45 +00:00 (Migrated from gitlab.com)

Retested on new deploy (main-CHZ1ahQz, 4/13). Verify page now reads Solana destination data correctly for active transfers -- nonce 42 shows all fields, hash match, State: Approved, Execute button visible. RPC fallback working. This issue is fixed for active transfers. Note: completed transfers (nonce 41, PDA already closed) show no dest data -- tracked separately in #106.

Retested on new deploy (main-CHZ1ahQz, 4/13). Verify page now reads Solana destination data correctly for active transfers -- nonce 42 shows all fields, hash match, State: Approved, Execute button visible. RPC fallback working. This issue is fixed for active transfers. Note: completed transfers (nonce 41, PDA already closed) show no dest data -- tracked separately in #106.
Brouie (Migrated from gitlab.com) closed this issue 2026-04-13 05:03:20 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
code/cl8y-bridge-monorepo#102
No description provided.