Troubleshooting
Common issues and solutions for the Reclaim Browser Extension SDK
Quick Diagnostic Checklist
Before diving into specific issues, run through this checklist:
Extension Integration
- ✅ Manifest configuration is complete with all required fields
- ✅ CSP includes
'wasm-unsafe-eval'directive - ✅ All SDK resources are listed in
web_accessible_resources - ✅ Content script is registered (static or dynamic)
- ✅ Background script initializes the SDK
- ✅ Extension is loaded and active in
chrome://extensions - ✅ No errors in service worker console
Web Integration
- ✅ SDK is installed in your web project
- ✅ Extension ID is correct for your environment
- ✅ Extension is installed and active
- ✅ HTTPS is used (if in production)
- ✅ Backend API endpoints are accessible (if using server config)
- ✅ CORS is configured correctly (if using server config)
Common Issues
Installation Issues
Asset Setup Script Fails
Symptoms: Running npm run reclaim-extension-setup produces errors
Possible Causes:
- Incorrect
--public-dirpath - Missing
publicdirectory - File permission issues
Solutions:
SDK Assets Not Copied
Symptoms: Build fails because SDK files are missing
Solutions:
- Verify the setup script ran successfully:
- Check for build tool configuration issues:
- Manually verify file existence before build:
Manifest Configuration Issues
CSP Violations
Symptoms: Console errors like:
Solution: Update your CSP in manifest.json:
Important: The 'wasm-unsafe-eval' directive is required for WebAssembly. Don't remove it.
Permission Denied Errors
Symptoms: Extension can't create offscreen documents or access cookies
Solution: Add required permissions to manifest.json:
Resources Not Accessible
Symptoms: Console errors:
Solution: Add all SDK resources to web_accessible_resources:
Background Script Issues
Service Worker Not Starting
Symptoms: Background initialization doesn't run, no console logs
Debugging Steps:
-
Check service worker console:
- Go to
chrome://extensions - Click "service worker" link under your extension
- Look for errors
- Go to
-
Verify syntax in background script:
- Add error handling:
Service Worker Repeatedly Restarting
Symptoms: Initialization logs appear multiple times
This is normal behavior: Chrome terminates inactive service workers. Ensure you reinitialize on restart:
Content Script Issues
Content Script Not Injecting
Symptoms: Verification doesn't work on web pages
Debugging:
- Check if content script is loaded:
- Verify manifest registration:
- For dynamic registration, check if registered:
Common Mistakes:
- ❌ Using
run_at: "document_end"- won't work - ❌ Missing from
matchesarray - ❌ Wrong file path in
jsarray
Content Script Loading But Not Working
Symptoms: Script loads but verification fails
Solutions:
- Ensure
host_permissionsincludes the target domain:
- Check for conflicts with page scripts:
Verification Issues
Verification Never Starts
Symptoms: startVerification() called but nothing happens
Debugging:
-
Check console for errors in both:
- Extension popup/page
- Background service worker
- Web page (for web integration)
-
Verify API credentials:
- Check initialization:
Verification Starts But Never Completes
Symptoms: Provider window opens but completed event never fires
Possible Causes:
- User didn't complete provider authentication
- Network interception failed
- Offscreen document error
Debugging:
- Check offscreen document console:
- Monitor all events:
- Check provider tab:
- Did it open correctly?
- Did user complete authentication?
- Are there errors in provider tab console?
Proofs Are Empty or Invalid
Symptoms: completed event fires but proofs are empty or malformed
Solutions:
- Verify provider configuration:
-
Check API credentials are correct:
- Wrong credentials may produce empty proofs
- Verify on Reclaim Developer Portal
-
Validate proofs structure:
Web Integration Issues
Extension Not Detected
Symptoms: isExtensionInstalled() returns false despite extension being installed
Solutions:
- Verify extension ID:
-
Check extension ID matches:
- Development vs production IDs are different
- Get ID from
chrome://extensions(enable Developer mode)
-
Ensure extension has proper permissions:
Communication Fails Between Page and Extension
Symptoms: Initialization succeeds but verification doesn't start
Debugging:
- Check content script is loaded on the page:
- Verify CORS for server config:
- Check for CSP blocking communication:
Build Tool Issues
Vite Re-bundling SDK Assets
Symptoms: Build errors related to SDK bundles
Solution: Ensure assets are in public directory and not imported:
Create React App (CRA) Issues
Symptoms: Build fails or SDK doesn't work after build
Solutions:
- Verify public folder structure:
- Use correct paths in manifest:
Environment Variable Issues
Variables Not Loading
Symptoms: undefined values for environment variables
Solutions:
- Check variable prefix:
- Restart dev server after changing
.env:
- Verify
.envfile location:
Debugging Tools
Enable Debug Mode
Create a debug utility:
Log All SDK Events
Check Extension State
Performance Issues
Slow Proof Generation
Symptoms: Verification takes a long time
Possible Causes:
- WebAssembly not loading properly
- Offscreen document not created
- Network issues
Solutions:
- Verify WASM loading:
- Monitor offscreen document:
Extension Slowing Down Browser
Symptoms: Browser becomes sluggish
Solution: Check for memory leaks:
Getting Help
If you've tried everything and still have issues:
-
Check Console Logs:
- Extension popup console
- Background service worker console
- Web page console (for web integration)
- Provider tab console
-
Gather Information:
- Extension version
- Browser version
- SDK version
- Error messages
- Steps to reproduce
-
Test in Isolation:
- Create a minimal reproduction
- Test with basic credentials
- Try different providers
-
Community Support:
- GitHub Issues
- Discord Community (if available)
- Documentation
Prevention Checklist
Before deploying:
- ✅ Tested in both development and production builds
- ✅ Verified all environment variables are set
- ✅ Tested extension installation flow
- ✅ Implemented proper error handling
- ✅ Added user-friendly error messages
- ✅ Tested with multiple providers
- ✅ Verified proof validation on backend
- ✅ Tested edge cases (cancellation, timeout, etc.)
- ✅ Checked for memory leaks
- ✅ Reviewed console for warnings