Troubleshooting
Common issues and solutions when integrating the VECU IDV Web SDK.
Common Issues
SDK failed to initialize
Cause: Invalid configuration or missing dependencies
Solutions:
- Check that
deploymentStageis set correctly ('sandbox'or'production') - Verify
bearerTokenis provided and valid (required for all API calls) - Check browser console for specific error messages
- Ensure you're using a supported browser version
// Verify configuration
const sdk = createVecuIDVSDK({
deploymentStage: 'sandbox', // Must be 'sandbox' or 'production'
bearerToken: 'your-token', // Required - check it's not undefined
debug: true, // Enable for detailed logging
});
Network request failed
Cause: Connection issues or CORS problems
Solutions:
- Check internet connection stability
- Verify
bearerTokenis provided (missing token causes 401 errors) - Verify your domain is allowlisted for CORS
- Try increasing the
timeoutconfiguration - Check if firewall/proxy is blocking requests
const sdk = createVecuIDVSDK({
deploymentStage: 'sandbox',
bearerToken: 'your-token',
timeout: 60000, // Increase timeout to 60 seconds
maxRetries: 5, // Increase retry attempts
});
Verification UI not loading
Cause: Container issues or styling conflicts
Solutions:
- Ensure container element exists and is visible
- Set container
min-heightto at least 600px - Check for CSS conflicts affecting the container
- Try clearing the container before initialization
<!-- Ensure proper container setup -->
<div id="verification-container" style="min-height: 600px; width: 100%;"></div>
// Clear container before starting
const container = document.getElementById('verification-container');
container.innerHTML = '';
await sdk.startVerificationWithCustomer(container, {
/* ... */
});
TOKEN_EXCHANGE_FAILED error
Cause: Bearer token is invalid or expired
Solutions:
- Verify the bearer token is current and valid
- Check that the token hasn't expired
- Refresh the token and call
updateConfig
// Handle token refresh
sdk.on(SdkEvent.AUTHENTICATION_TOKEN_FAILURE, async () => {
const newToken = await refreshBearerToken();
await sdk.updateConfig({ bearerToken: newToken });
});
Webhooks not being received
Cause: Webhook configuration or endpoint issues
Solutions:
- Verify webhook URL is publicly accessible
- Ensure endpoint returns 200 status code
- Check webhook authentication configuration
- Test endpoint with tools like ngrok for local development
See the Webhooks Guide for complete setup instructions.
Verification stuck at loading
Cause: Provider SDK failed to load or initialize
Solutions:
- Check for ad blockers or script blockers
- Verify network connectivity
- Check browser console for blocked scripts
- Try a different browser
sdk.on(SdkEvent.PROVIDER_ERROR, event => {
console.error('Provider failed to load:', event.data);
});
Provider-Specific Issues
Verification timeout (VERIFICATION_FAILED)
Cause: The verification session exceeded its maximum duration.
Solutions:
- User may have abandoned the flow — restart verification
- Check if user's session expired
- Verify network connectivity
sdk.on(SdkEvent.VERIFICATION_FAILED, event => {
if (event.data.error?.code === 'VERIFICATION_TIMEOUT') {
console.log('Verification timed out — user may have abandoned the flow');
}
});
Verification UI not loading in iframe
Cause: Network issues or browser permissions
Solutions:
- Check camera and microphone permissions in browser
- Verify network connectivity
- Check Content Security Policy allows the verification iframe source
- Clear browser cache and retry
sdk.on(SdkEvent.UI_READY, () => {
console.log('Verification UI loaded successfully');
});
Camera/microphone access denied
Cause: User denied permissions or permissions not requested
Solutions:
- The verification process may require camera access for biometric verification
- Prompt user to allow camera access in browser settings
- Check browser permissions API for status
Error Code Reference
Validation Errors
| Code | Description | Solution |
|---|---|---|
VALIDATION_ERROR | Invalid customer data format | Check data types and required fields |
MISSING_REQUIRED_FIELD | Required field missing | Ensure firstName, lastName, and referenceId are provided |
INVALID_USER_DATA | User data validation failed | Verify email/phone formats |
User Action Errors
| Code | Description | Solution |
|---|---|---|
CONSENT_DECLINED | User declined consent | Expected behavior - don't show error |
USER_CANCELLED | User cancelled verification | Expected behavior - navigate back |
UPLOAD_FAILED | Document upload failed | Retry or check file size/format |
Authentication Errors
| Code | Description | Solution |
|---|---|---|
TOKEN_EXCHANGE_FAILED | Bearer token exchange failed | Refresh token or redirect to login |
INVALID_API_KEY | API key is invalid | Check credentials |
System Errors
| Code | Description | Solution |
|---|---|---|
SDK_INIT_FAILED | SDK initialization failed | Check configuration |
PROVIDER_LOAD_FAILED | Provider SDK failed to load | Check network/blockers |
NETWORK_ERROR | Network request failed | Check connectivity |
TIMEOUT_ERROR | Request timed out | Increase timeout or retry |
VERIFICATION_TIMEOUT | Verification session timed out | User abandoned flow; restart verification |
IFRAME_LOAD_FAILED | Verification iframe failed | Check CSP, network, browser permissions |
PERMISSION_DENIED | Camera/microphone access denied | User must grant browser permissions |
Debug Mode
Enable debug mode for detailed logging:
const sdk = createVecuIDVSDK({
deploymentStage: 'sandbox',
bearerToken: 'your-bearer-token',
debug: true,
logLevel: 'debug', // Show all log messages
});
// Debug information will appear in browser console
// Look for messages prefixed with [VECU-SDK]
Debug mode provides:
- Detailed logging of SDK operations
- API request/response logging
- User interaction events
- Provider event forwarding
Production Warning
Always disable debug mode in production to avoid exposing sensitive information in console logs.
Browser Developer Tools
Network Tab
Check for failed requests:
- Open Developer Tools (F12)
- Go to Network tab
- Filter by "XHR" or "Fetch"
- Look for red (failed) requests
- Check request/response details
Console Tab
Look for SDK errors:
- Open Developer Tools (F12)
- Go to Console tab
- Filter by "Error" or search for "VECU"
- Note any error messages
Application Tab
Check stored data:
- Open Developer Tools (F12)
- Go to Application tab
- Check Local Storage and Session Storage
- Look for SDK-related keys
Framework-Specific Issues
React: Memory Leaks
Issue: Component re-renders cause multiple SDK instances
Solution: Store SDK in a ref and cleanup properly:
const sdkRef = useRef<VecuIDVSDK | null>(null);
useEffect(() => {
sdkRef.current = createVecuIDVSDK({
/* ... */
});
return () => {
sdkRef.current?.destroy();
};
}, []); // Empty deps - only create once
Vue: Reactivity Issues
Issue: SDK instance becomes reactive causing issues
Solution: Use shallowRef or keep SDK outside reactive system:
// Don't make SDK reactive
let sdk: VecuIDVSDK | null = null;
onMounted(() => {
sdk = createVecuIDVSDK({
/* ... */
});
});
Next.js: SSR Errors
Issue: SDK fails during server-side rendering
Solution: Use dynamic imports with ssr: false:
const VerificationComponent = dynamic(() => import('./VerificationComponent'), {
ssr: false,
});
Performance Optimization
Lazy Loading
Load the SDK only when needed:
const loadSDK = async () => {
const { createVecuIDVSDK } = await import('vec-idp-web-sdk');
return createVecuIDVSDK({
deploymentStage: 'sandbox',
bearerToken: process.env.BEARER_TOKEN,
debug: process.env.NODE_ENV === 'development',
});
};
// Only load when verification starts
const handleStartVerification = async () => {
const sdk = await loadSDK();
// ... use sdk
};
Instance Reuse
Reuse SDK instance across verifications:
// Create once
const sdk = createVecuIDVSDK({
/* ... */
});
// Reuse for multiple verifications
await sdk.startVerificationWithCustomer(container1, {
/* ... */
});
// Later...
await sdk.startVerificationWithCustomer(container2, {
/* ... */
});
Browser Support
Supported Browsers
| Browser | Minimum Version |
|---|---|
| Chrome | 88+ |
| Edge | 88+ |
| Firefox | 78+ |
| Safari | 14+ |
| iOS Safari | 14+ |
| Chrome for Android | Latest |
Not Supported
- Internet Explorer (all versions)
- Safari < 14
- Chrome < 88
- Firefox < 78
The SDK automatically detects browser compatibility and displays appropriate error messages for unsupported browsers.
Getting Help
If you're still experiencing issues:
- Check the changelog - Your issue may be fixed in a newer version
- Search existing issues - Someone may have encountered the same problem
- Enable debug mode - Gather detailed logs before reporting
- Contact support - Provide logs, browser info, and reproduction steps
Next Steps
- API Reference - Complete method reference
- Events - Handle SDK events
- Testing - Test your integration