Common Issues
Quick solutions to the most frequent problems developers encounter.Invalid API Key
Invalid API Key
Error:
Invalid API key providedSolutions:- Verify your API key is correctly copied from Nevermined App
- Check environment variable is loaded:
console.log(process.env.NVM_API_KEY) - Ensure you’re using the right key for your environment (test vs production)
- Generate a new API key if the current one expired
Network Connection Issues
Network Connection Issues
Error:
Network request failed or ECONNREFUSEDSolutions:- Check your internet connection
- Verify Nevermined services are accessible
- Try a different environment (
testingvsproduction) - Check if you’re behind a corporate firewall
- Implement retry logic for transient failures
Insufficient Credits
Insufficient Credits
Error:
Insufficient credits for redemptionSolutions:- Check subscriber’s balance before processing
- Verify credit consumption amount is correct
- Ensure plan hasn’t expired (for time-based plans)
- Provide clear feedback about credit requirements
Invalid Request Signature
Invalid Request Signature
Error:
Invalid request signature or validation failsSolutions:- Ensure all required parameters are provided
- Check signature is in the correct header:
x-nvm-query-signature - Verify subscriber address matches the signer
- Make sure plan and agent IDs are correct
Agent Not Found
Agent Not Found
Error:
Agent not found or 404 errorsSolutions:- Verify agent ID is correct
- Check agent was successfully registered
- Ensure you’re using the right environment
- Try fetching agent details directly
Plan Expired
Plan Expired
Error:
Plan has expired for time-based subscriptionsSolutions:- Check plan expiration:
balance.expiresAt - Remind users to renew before expiration
- Implement grace periods if appropriate
- Provide easy renewal options
Debugging Techniques
Enable Debug Logging
Get detailed logs from the SDK:Test Individual Components
Break down complex operations to isolate issues:Use Testing Environment
Always test in the testing environment first:Environment-Specific Issues
Local Development
- CORS Issues
- SSL/HTTPS
- Environment Variables
Problem: Cross-Origin Resource Sharing errors in browserSolution:
Production Issues
Performance Problems
Performance Problems
Symptoms: Slow response times, timeoutsSolutions:
High Error Rates
High Error Rates
Symptoms: Increased 5xx errors, failed validationsSolutions:
- Check service health endpoints
- Verify API rate limits aren’t exceeded
- Review error logs for patterns
- Implement circuit breakers
- Scale infrastructure if needed
Payment Processing Failures
Payment Processing Failures
Symptoms: Transactions failing, credits not updatingSolutions:
- Verify wallet has sufficient gas
- Check token contract addresses
- Ensure builder address is correct
- Monitor blockchain congestion
- Implement payment retry logic
Validation Issues
Request Validation Checklist
Getting Help
Debug Information Template
When seeking help, provide this information:Support Resources
Discord Community
Get real-time help from developers
GitHub Issues
Report bugs and request features
Documentation
Comprehensive guides and API reference
Email Support
For critical issues and enterprise support
Health Check Endpoint
Implement a comprehensive health check:Prevention Tips
Most issues can be prevented with proper setup and testing. Follow these guidelines:
- Always test in the testing environment first
- Implement comprehensive error handling
- Add monitoring and alerting
- Keep the SDK updated
- Follow security best practices
- Document your integration thoroughly