Frequently Asked Questions
Common questions and solutions for build issues, authentication, transactions, and debugging with the TypeScript SDK.Build & Environment
"Buffer is not defined" or "process is not defined"
"Buffer is not defined" or "process is not defined"
Modern bundlers don’t include Node.js polyfills by default.Vite:Next.js / Create React App:
"crypto is not defined"
"crypto is not defined"
Add global polyfill to your bundler config:
Module resolution issues or type errors
Module resolution issues or type errors
Ensure
tsconfig.json uses modern module resolution:Next.js: "Cannot find module" or ESM errors
Next.js: "Cannot find module" or ESM errors
Import from modular packages instead of the umbrella SDK:If you see elliptic package errors, add to
next.config.js:Bundle size is too large
Bundle size is too large
Import modular packages instead of the umbrella package:
Module resolution errors, dependency conflicts, or build failures
Module resolution errors, dependency conflicts, or build failures
Clear your cache and reinstall dependencies:For Vite projects:For Next.js projects:For framework-specific bundler configuration, see the Framework Setup tabs in the overview.
Regional Support
What regions are supported?
What regions are supported?
The Immutable Game SDK supports only the regions that Immutable Passport supports.Passport is a globally available product. However, our wallet infrastructure is subject to the regulation of the US Department of the Treasury’s Office of Foreign Assets Control (“OFAC”). OFAC administers and enforces comprehensive and targeted economic and trade sanctions programs on multiple countries and regions.Users attempting to access Passport in any of the regions under OFAC sanction will have their access blocked and will be unable to use our product. Additionally, components of Passport’s infrastructure also rely on technology provided by Magic, which maintains further details regarding unsupported regions on their website here.
Authentication
"Redirect URI mismatch" error
"Redirect URI mismatch" error
The
redirectUri in your code must exactly match what’s configured in Hub.Common mismatches:httpvshttps- Trailing slash (
/callbackvs/callback/) - Port number differences
- Different paths
"Invalid client_id" error
"Invalid client_id" error
Verify the following:
clientIdmatches your Hub configuration- You’re using the correct environment (Sandbox vs Production)
publishableKeyis set correctly
"Popup blocked" when logging in
"Popup blocked" when logging in
Browsers block popups that aren’t triggered by user interaction.
Callback page shows error or nothing happens
Callback page shows error or nothing happens
Ensure
loginCallback() is called on your redirect URI page:Transactions
"User rejected the request"
"User rejected the request"
User cancelled the transaction in the Passport popup. Handle this gracefully:
"Insufficient funds" error
"Insufficient funds" error
The user doesn’t have enough IMX for the transaction + gas fees.Direct users to fund their wallet via the Checkout widgets.
"Nonce too low" error
"Nonce too low" error
Usually caused by pending transactions. Wait for pending transactions to confirm:
Performance & Debugging
Slow SDK initialization
Slow SDK initialization
Initialize once and reuse the instance:
How do I enable SDK debug logs?
How do I enable SDK debug logs?
Enable debug logs in the browser console:Then refresh the page to see SDK debug output.
How do I inspect SDK network calls?
How do I inspect SDK network calls?
SDK calls go to:
- Sandbox:
api.sandbox.immutable.com - Production:
api.immutable.com
Common HTTP error codes
Common HTTP error codes
| Code | Meaning | Solution |
|---|---|---|
| 401 | Unauthorized | Check API key or access token |
| 403 | Forbidden | Check permissions in Hub |
| 429 | Rate limited | Implement exponential backoff |
| 500 | Server error | Retry with backoff, contact support if persistent |
Integration & Usage
How do I use the SDK with viem?
How do I use the SDK with viem?
viem has built-in Immutable Chain support:
How do I validate webhooks?
How do I validate webhooks?
Use
@imtbl/webhook to verify incoming webhooks from Immutable:Can I use the SDK via CDN?
Can I use the SDK via CDN?
For browser-only applications without a build step:
CDN deployment is useful for quick prototypes and static sites. For production applications, use npm packages with proper bundling.
How do I enable code splitting?
How do I enable code splitting?
Requires TypeScript 5.0+ with
moduleResolution: "bundler" in tsconfig.json.V2 SDK migration notes
V2 SDK migration notes