Troubleshooting
Common issues and solutions when integrating the Reclaim JavaScript SDK
Common Issues
This guide covers the most common issues developers encounter when integrating the Reclaim JavaScript SDK and their solutions.
Installation Issues
Module Not Found Error
Problem: Cannot find module '@reclaimprotocol/js-sdk'
Solutions:
-
Verify the package is installed:
-
Reinstall the package:
-
Clear cache and reinstall:
-
Check your
package.jsonincludes the dependency:
TypeScript Type Errors
Problem: TypeScript can't find type definitions
Solutions:
-
Ensure TypeScript 4.0 or later:
-
Check
tsconfig.jsonsettings: -
Import types explicitly:
Initialization Issues
Invalid Credentials Error
Problem: Invalid credentials or 401 Unauthorized when initializing SDK
Solutions:
-
Verify your credentials are correct:
- Check
APP_IDmatches the one in Reclaim Developer Portal - Verify
APP_SECRETis correct (copy-paste to avoid typos) - Confirm
PROVIDER_IDis from the same application
- Check
-
Check environment variables are loaded:
-
Ensure
.envfile is in the correct location (project root for most frameworks) -
Restart your development server after changing
.envfiles
Provider Not Found Error
Problem: Provider not found or 404 error
Solutions:
-
Verify the provider is added to your application in the Reclaim Developer Portal
-
Check the
PROVIDER_IDmatches exactly (case-sensitive) -
Ensure the provider is active and not disabled
Frontend Issues
Modal Doesn't Appear
Problem: Calling triggerReclaimFlow() but nothing shows up
Solutions:
-
Ensure you're calling it from a user interaction (button click):
-
Check browser console for errors
-
Verify SDK initialization completed before triggering flow
-
Test in a different browser (some ad blockers may interfere)
QR Code Not Loading
Problem: QR code is blank or shows an error
Solutions:
-
Verify
getRequestUrl()returns a valid URL: -
Check QR code library is installed (if using custom QR):
-
Ensure request URL is not too long (if it is, provider config may be invalid)
Proofs Not Received (onSuccess Never Called)
Problem: User completes verification but onSuccess callback doesn't fire
Solutions:
-
Ensure
startSession()is called BEFORE user completes verification: -
Check network connection (proofs are delivered via WebSocket)
-
Look for WebSocket errors in browser console
-
Verify callback functions are defined:
Mobile Verification Fails
Problem: App Clip or Instant App doesn't launch on mobile
Solutions:
-
Test on an actual mobile device (simulators may not support App Clips/Instant Apps)
-
Ensure you're testing on supported platforms:
- iOS 14+ for App Clips
- Android 6.0+ (API 23+) for Instant Apps
-
Check that you're using a real mobile browser (not desktop browser in mobile mode)
-
Verify the request URL is accessible from the mobile device
Backend Issues
CORS Errors
Problem: Access to fetch blocked by CORS policy
Solutions:
-
Express.js: Install and configure CORS middleware:
-
Next.js API Routes: CORS is handled automatically for same-origin requests. For cross-origin:
-
FastAPI:
Callback Endpoint Not Reached
Problem: Backend callback URL is never called after verification
Solutions:
-
Verify callback URL is publicly accessible:
-
For local development, use ngrok:
-
Check ngrok is running and tunnel is active
-
Verify BASE_URL in environment variables:
-
Check for trailing slashes - ensure consistency:
-
Monitor server logs for incoming requests
Proof Parsing Fails
Problem: JSON.parse() fails when processing proof in callback
Solutions:
-
Express.js: Use
express.text()middleware: -
Next.js (Pages Router): Disable body parser:
-
Next.js (App Router): Read raw text:
-
FastAPI:
Environment Variables Not Loading
Problem: process.env.RECLAIM_APP_ID is undefined
Solutions:
-
Node.js: Install and use dotenv:
-
Next.js: Ensure file is named
.env.localand restart dev server -
Verify file location:
.envshould be in project root -
Check .env syntax:
-
Restart server after modifying
.envfiles
Verification Issues
Proof Verification Fails
Problem: verifyProof() returns false
Solutions:
-
Ensure proof structure is correct:
-
Check proof hasn't been tampered with during transmission
-
Verify proof is from the correct provider
-
Ensure SDK versions match between frontend and backend
Timeout Errors
Problem: Verification times out or takes too long
Solutions:
-
Check network connectivity on mobile device
-
Verify provider is responding:
- Some providers may be temporarily unavailable
- Try a different provider to test
-
Increase timeout if needed (though default should be sufficient)
-
Check user completed the flow - they may have abandoned it
Development Environment Issues
Hot Reload Issues
Problem: Changes to code aren't reflected after saving
Solutions:
-
Hard refresh browser: Ctrl+Shift+R (Windows/Linux) or Cmd+Shift+R (Mac)
-
Clear browser cache and reload
-
Restart development server
-
Check build tool console for errors
Build Errors
Problem: Build fails with SDK-related errors
Solutions:
-
Next.js: If encountering SSR issues, use dynamic imports:
-
Vite: Ensure SDK is not being pre-bundled incorrectly:
-
Webpack: Check module resolution settings
ngrok Issues
Problem: ngrok tunnel not working or disconnecting
Solutions:
-
Verify ngrok is running: Check terminal where ngrok was started
-
ngrok free tier limitations:
- URL changes on each restart
- Session timeout after inactivity
- Consider paid tier for persistent URL
-
Update BASE_URL after restarting ngrok
-
Alternative: Use other tunneling tools like:
- localtunnel:
npx localtunnel --port 3000 - CloudFlare Tunnel
- serveo.net
- localtunnel:
Production Issues
Vercel Deployment Issues
Problem: Works locally but fails on Vercel
Solutions:
-
Set environment variables in Vercel dashboard:
- Go to Project Settings → Environment Variables
- Add all required variables
-
Check BASE_URL is set correctly:
-
Verify API routes are in correct location for deployment
-
Check function logs in Vercel dashboard for errors
Heroku/Railway Deployment Issues
Problem: Callback not working on Heroku/Railway
Solutions:
-
Use dynamic PORT:
-
Set BASE_URL to your app URL:
-
Check dyno/service logs for errors
Security Issues
APP_SECRET Exposed
Problem: APP_SECRET was accidentally committed to git
Solutions:
-
Immediately rotate your credentials in Reclaim Developer Portal
-
Remove from git history:
-
Add to .gitignore:
-
Audit code to ensure no other secrets are exposed
Getting Help
If you've tried the solutions above and still experiencing issues:
Before Asking for Help
- Check browser console for error messages
- Check server logs for backend errors
- Verify all credentials are correct
- Test with a minimal example to isolate the issue
- Check SDK version is up to date:
Where to Get Help
- 💬 Community Discord - Fastest support from community
- 🐛 GitHub Issues - Report bugs
- 📧 Email Support - For sensitive issues
- 📚 Documentation - Review guides and examples
Providing Information
When asking for help, include:
- SDK version: Check
package.json - Framework and version: React 18, Next.js 14, etc.
- Error messages: Full error from console/logs
- Code snippet: Minimal reproducible example
- Environment: Browser, OS, Node.js version
- Steps to reproduce: What you did before the error
Debugging Tips
Enable Verbose Logging
Test in Isolation
Create a minimal test file to isolate the issue:
Next Steps
- API Reference → - Complete SDK documentation
- Installation → - Setup guide
- Recommended Setup → - Production patterns
- Community Discord → - Get live support