Skip to content

xmtp.chat: getInboxIdForAddress queries V3 backend instead of D14N when gatewayHost is configured #1697

@api-Hypernova

Description

@api-Hypernova

Source

xmtp.chat

Describe the bug

When xmtp.chat is configured to use the D14N backend via XMTP_GATEWAY_HOST, the getInboxIdForAddress function in apps/xmtp.chat/src/helpers/names.ts calls getInboxIdForIdentifier from the browser SDK without passing gatewayHost. This causes the inbox ID lookup to create a V3 client that queries the old V3 node (api.dev.xmtp.network:5558) instead of the D14N backend.

Call chain:

useMemberId.ts:45 → getInboxIdForAddressQuery(address, environment) — no gatewayHost
names.ts:85 → getInboxIdForIdentifier(identifier, environment) — no gatewayHost
browser-sdk/inboxId.ts:40 → wasmGetInboxIdForIdentifier(host, null, ...) — gatewayHost is null
bindings_wasm/inbox_id.rs:15 → MessageBackendBuilder with gateway_host: None → creates V3 client
V1 GetInboxIds request goes to api.dev.xmtp.network:5558 instead of the D14N node

This creates a split-brain: identity resolution goes to V3, but all other operations (key package fetches, message queries, publishes) go through D14N. Group creation then fails because the target user's key packages don't exist on D14N:

mismatched number of results, key packages 0 != installation_keys 1

Steps to reproduce the bug

  1. Go to xmtp.chat (or run locally)
  2. Set XMTP_GATEWAY_HOST to https://payer.testnet-dev.xmtp.network:443 in localStorage
  3. Set environment to dev
  4. Connect a wallet and create an identity
  5. Enter another user's Ethereum address in the "Create group" member field
  6. Open browser DevTools → Network tab
  7. Observe the GetInboxIds request goes to api.dev.xmtp.network:5558 (V3) instead of grpc.testnet-dev.xmtp.network (D14N)
  8. Attempt to create the group → fails with mismatched number of results, key packages 0 != installation_keys 1

Code of conduct

  • I agree to follow the XMTP code of conduct

Metadata

Metadata

Assignees

Labels

StalebugSomething isn't working

Type

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions