Docs Help

Troubleshooting

Symptoms, likely causes and fixes for common integration problems.

Start with the health check; it names the most common problems and says how to fix them:

import { checkBridgeHealth } from '@hydraone-sdk/core';

const report = await checkBridgeHealth(client);
console.log(report.summary);

Setup and connection

SymptomLikely causeFix
init() rejects with ERR_NOT_IN_IFRAMEThe page is a normal tab, so there is no host shell.Open the app inside the HydraOne web client (an iframe).
init() rejects with ERR_TIMEOUT ("Handshake ... timed out")The host did not answer CLIENT_READY within handshakeTimeoutMs (3 s).Check you are embedded in the right host, the hostOrigin is exact, and the host is running. Raise handshakeTimeoutMs on slow networks.
ERR_BRIDGE_NOT_CONNECTED on a wallet callinit() has not finished, failed, or the client was destroyed.await client.init() first, and create a new client after destroy().
ERR_INVALID_OPTIONS from the constructorNeither transport nor hostOrigin was passed.Pass hostOrigin, or a transport.
ERR_INVALID_RESPONSE from signTx with mergeWitnesses: trueThe wallet's witness set could not be merged into the transaction.The user already signed: merge details.witnessSet with applyWitnessSet, or check the host's SIGN_TX answer.

Origins and the iframe

SymptomLikely causeFix
Handshake times out although the host is runninghostOrigin does not match the sender's origin, or the message did not come from window.parent. Such messages are dropped silently.Use the exact origin (scheme, host, port). Set checkIframeSource: false only for tests.
Constructor throws "Wildcard origin ... not allowed in production" (ERR_UNTRUSTED_ORIGIN)hostOrigin: '*' outside a known development or test environment.Use the real origin.
Diagnostics: "Iframe sandbox is missing allow-same-origin"The host iframe lacks the sandbox flag.Add allow-scripts allow-same-origin to the iframe sandbox attribute.

Wallet and signing

SymptomLikely causeFix
ERR_USER_REJECTEDThe user cancelled the wallet prompt.Not an error condition; let the user try again.
ERR_TIMEOUT on signTxThe user did not respond within signingTimeoutMs (2 min), or the host hung.Raise it with { timeoutMs } per call or in the options.
ERR_UNSUPPORTED_METHODThe host does not implement the request (for example an older host without GET_REWARD_ADDRESSES).Update the host, or handle the error and fall back.
Addresses are addr1... where hex was expectedAddress queries return bech32 by default since 0.2.0.Pass { format: 'hex' }, or convert with addressToHex.

Storage

SymptomLikely causeFix
Stored data is lost after reload on SafariStorage was partitioned or wiped.Use HostStorageRelayAdapter. See the Safari ITP guide.
ERR_STORAGE_UNAVAILABLEThe host relay is unreachable or storage is blocked.Verify the transport is connected, the host handles HOST_STORAGE_* messages, and the iframe sandbox.

Frameworks and types

SymptomLikely causeFix
Hydration mismatch in Next.js or NuxtWallet data renders on the server as empty and on the client as filled.Render a neutral state until isConnected is true, or use <ClientOnly>.
Types not found under moduleResolution: nodeOld resolution mode ignores exports.Use bundler, node16 or nodenext.

Still stuck?

Turn on debug: true with a logger, run the health check, and open an issue with the report (remove addresses and tokens first). See SUPPORT.md.