Troubleshooting¶
Common issues and solutions for the f5xc-auth library.
Authentication Issues¶
Problem: Not authenticated error
const credentialManager = new CredentialManager();
await credentialManager.initialize();
if (!credentialManager.isAuthenticated()) {
console.error('Not authenticated');
}
Solutions:
-
Check if profile exists:
-
Verify active profile:
-
Set environment variables:
Profile Not Found¶
Problem: Profile doesn't exist or can't be loaded
const profile = await profileManager.load('production');
if (!profile) {
console.error('Profile not found');
}
Solutions:
-
List available profiles:
-
Create the profile:
HTTP Client Not Available¶
Problem: httpClient.isAvailable() returns false
Solutions:
-
Check authentication:
-
Verify credentials:
-
Check network connectivity:
TLS Certificate Errors¶
Problem: UNABLE_TO_VERIFY_LEAF_SIGNATURE or similar TLS errors
Solutions:
-
For staging/development only:
-
For enterprise with custom CA:
-
Update Node.js certificates:
Permission Errors¶
Problem: EACCES: permission denied when accessing profiles
Solutions:
-
Check directory permissions:
-
Fix permissions:
-
Check ownership:
API Request Failures¶
Problem: API requests fail with 401 or 403
Solutions:
-
Verify token is valid:
-
Check token hasn't expired:
-
Verify namespace access:
Debug Mode¶
Enable debug logging to troubleshoot issues:
const credentialManager = new CredentialManager({ debug: true });
await credentialManager.initialize();
const httpClient = createHttpClient(credentialManager, { debug: true });
Debug output includes:
- Credential resolution process
- Profile loading steps
- HTTP request/response details
- Authentication header information (tokens masked)
See Also¶
- Authentication - Configure credentials properly
- CredentialManager API - API documentation
- ProfileManager API - Profile management API
- Environment Variables - Environment configuration