This section covers common issues and their solutions when working with the Wallet Gateway.Documentation Index
Fetch the complete documentation index at: https://docs.canton.network/llms.txt
Use this file to discover all available pages before exploring further.
Common Issues
Database Connection Errors
Problem: The Gateway fails to start with database connection errors. Solutions:-
PostgreSQL:
- Verify the database exists:
psql -U postgres -l - Check connection credentials in your config file
- Ensure PostgreSQL is running:
pg_isready - Verify network connectivity and firewall rules
- Verify the database exists:
-
SQLite:
- Ensure the directory exists for the database file
- Check file permissions (read/write access required)
- Verify disk space is available
-
Memory Store:
- No configuration needed, but remember: data is lost on restart
Authentication Failures
Problem: API calls return 401 Unauthorized errors. Solutions:-
Invalid or Expired Token:
- Ensure you’re using a valid JWT token
- Check token expiration time
- Regenerate the token if necessary
-
Missing Authorization Header:
- Include the Authorization header:
Authorization: Bearer <token> - Verify the header format is correct
- Include the Authorization header:
-
Session Not Found:
- Create a session using
addSession()method first - Ensure the session hasn’t expired
- Check that you’re using the correct user context
- Create a session using
Network Connection Issues
Problem: Cannot connect to configured networks or ledger API. Solutions:-
Network Unreachable:
- Verify the ledger API URL is correct in your network configuration
- Test connectivity:
curl <ledger-api-url>/v2/version - Check firewall rules and network routing
-
Invalid Network Configuration:
- Verify the
synchronizerIdmatches the validator configuration - Ensure the identity provider ID matches between network and IDP configs
- Check that authentication credentials are correct
- Verify the
-
SSL/TLS Issues:
- For HTTPS endpoints, verify certificates are valid
- In development, you may need to use HTTP or configure certificate trust
Port Already in Use
Problem: Error:EADDRINUSE: address already in use :::3030
Solutions:
-
Find and stop the process using the port:
-
Use a different port:
-
Check if another Gateway instance is running:
Configuration Validation Errors
Problem: Gateway fails to start with configuration errors. Solutions:-
Validate your config against the schema:
-
Check for common mistakes:
- Missing required fields
- Invalid JSON syntax
- Type mismatches (strings vs numbers)
- Missing or incorrect IDP references in network configs
-
Use the example config as a template:
Signing Provider Issues
Problem: Transactions fail with signing errors. Solutions:-
Fireblocks:
- Verify environment variables are set correctly:
FIREBLOCKS_SECRETandFIREBLOCKS_API_KEY - Ensure API keys are valid and have proper permissions
- Verify Fireblocks API is accessible from your network
- Verify environment variables are set correctly:
-
Participant:
- Ensure the participant node is running and accessible
- Verify the party exists on the participant
- Check participant logs for signing errors
-
Blockdaemon:
- Verify environment variables are set:
BLOCKDAEMON_API_URLandBLOCKDAEMON_API_KEY - Test API connectivity
- Ensure API key has signing permissions
- Verify environment variables are set:
-
Dfns:
- Verify environment variables are set:
DFNS_ORG_ID,DFNS_BASE_URL,DFNS_CRED_ID,DFNS_PRIVATE_KEY, andDFNS_AUTH_TOKEN - Ensure the service account credentials are correct
- Confirm the service account has wallet creation and signing permissions
- Verify environment variables are set:
Debugging
Enable Debug Logging
Set log level to debug for more detailed information:Check Logs
Review the Gateway logs for error messages and stack traces. Common log locations:- Console output (when running directly)
- System logs (when running as a service)
- Container logs (when running in Docker/Kubernetes)
Verify API Endpoints
Test that the Gateway is responding:Getting Help
If you continue to experience issues:- Check the logs for detailed error messages
- Verify your configuration against the schema
- Review the API specifications for correct usage
- Check GitHub issues for similar problems
- Review the configuration documentation for your specific setup
Log Levels
The Gateway uses structured logging with the following levels:- ERROR: Critical errors that prevent operation
- WARN: Warning conditions that may cause issues
- INFO: Informational messages about normal operation
- DEBUG: Detailed diagnostic information