Common Issues
This guide covers common problems you may encounter when using NapCat and their solutions.Login Issues
Cannot Login / Login Timeout
Symptoms:- Login process hangs or times out
- QR code doesn’t appear
- “Login failed” error message
-
Check NTQQ version compatibility
- Ensure you’re using a compatible NTQQ version
- Download the latest version from the Release page
-
Clear login cache
- Close NapCat and NTQQ completely
- Delete the login cache directory
- Restart and try logging in again
-
Check network connectivity
- Ensure you have a stable internet connection
- Try disabling VPN or proxy temporarily
- Check if QQ servers are accessible
-
Update NapCat
- Older versions may have login compatibility issues
- Always use the latest stable release
Account Frozen After Login
Symptoms:- Login succeeds but account gets frozen
- “Account at risk” warning
-
Use official QQ app for verification
- Login to the official QQ mobile app
- Complete any security verifications
- Try NapCat again after verification
-
Avoid frequent logins
- Don’t login/logout repeatedly in short time
- Wait at least 5-10 minutes between attempts
-
Use stable environment
- Login from the same IP address consistently
- Avoid using public or frequently changing IPs
Connection Issues
WebSocket Connection Refused
Symptoms:Error: connect ECONNREFUSED- WebSocket client cannot connect
-
Verify server is running
-
Check configuration
-
Check firewall settings
- Allow the port through firewall
- On Linux:
sudo ufw allow 3001 - On Windows: Add firewall rule for the port
-
Verify host binding
- Use
0.0.0.0to listen on all interfaces - Use
127.0.0.1for localhost only - Make sure client connects to the correct host
- Use
HTTP API Returns 403 Forbidden
Symptoms:- API calls return 403 status code
{"message": "token verify failed!"}
-
Check authentication token
-
Verify token in config
- Ensure token matches exactly (case-sensitive)
- Check for extra spaces or quotes
- If token is empty in config, don’t send token in request
-
Check WebSocket authentication
Reverse WebSocket Not Connecting
Symptoms:反向WebSocket连接错误在 5 秒后尝试重新连接
-
Verify target server is running
- Ensure your WebSocket server is running and listening
- Check server logs for connection attempts
-
Check URL format
-
Test with a simple WebSocket server
Event and Message Issues
Not Receiving Events
Symptoms:- WebSocket connected but no events received
- Messages sent but no notification
-
Check connection type
- Connect to
/for events (not/api) /apiendpoint is only for API calls
- Connect to
-
Verify bot is online
- Check WebUI or logs to confirm bot is logged in
- Look for lifecycle event after connection
-
Check event filters
- Verify
reportSelfMessagesetting if expecting self-messages - Check if events are filtered by your application
- Verify
-
Monitor debug logs
Messages Not Sending
Symptoms:- API returns success but message not delivered
- “Send message failed” error
-
Check API response
-
Verify message format
-
Check user/group ID
- Ensure user ID exists and bot has permission
- For groups, verify bot is a member
- For private messages, must be friend or in same group
-
Check message content
- Some message types may be restricted
- Try sending a simple text message first
- Check for invalid CQ codes
Webhook Not Receiving Events
Symptoms:- HTTP client configured but webhook server receives nothing
- No POST requests arriving
-
Verify HTTP client is enabled
-
Check webhook URL accessibility
-
Check server logs
- Look for
[Http Client]errors in NapCat logs - Check webhook server logs for incoming requests
- Look for
-
Verify network path
- If using
localhost, ensure both run on same machine - Check firewall rules
- Test with public IP or ngrok for debugging
- If using
Configuration Issues
Configuration Not Loading
Symptoms:- Changes to config file have no effect
- Bot uses default configuration
-
Check config file location
- Ensure config file is in the correct directory
- Verify file name is correct
-
Validate JSON syntax
- Use a JSON validator to check for syntax errors
- Check for missing commas, brackets, or quotes
- Use JSON5 validator if using JSON5 features
-
Restart NapCat
- Configuration changes require restart
- Close completely before restarting
-
Check file permissions
- Ensure NapCat can read the config file
- On Linux:
chmod 644 config.json
Invalid Configuration Error
Symptoms:- “Invalid configuration” error on startup
- NapCat fails to start
-
Check required fields
-
Verify data types
portmust be number, not stringenablemust be boolean, not string- Arrays must use
[], objects must use{}
-
Check for typos
- Field names are case-sensitive
- Use exact field names from documentation
Performance Issues
High Memory Usage
Symptoms:- NapCat uses excessive RAM
- System becomes slow
-
Limit message history
- Reduce message cache size if available
- Clear old logs periodically
-
Disable debug logging
-
Reduce concurrent connections
- Limit number of WebSocket connections
- Use fewer network adapters
-
Update to latest version
- Newer versions may have memory optimizations
High CPU Usage
Symptoms:- CPU usage constantly high
- System becomes unresponsive
-
Check heartbeat intervals
-
Reduce logging verbosity
- Disable debug mode
- Reduce log output
-
Check for message loops
- Ensure bot isn’t responding to its own messages
- Use
reportSelfMessage: false
Debugging Tips
Enable Debug Logging
Check Logs
Look for error messages in NapCat logs:[OneBot]- OneBot related logs[HTTP Server]- HTTP server logs[WebSocket]- WebSocket logs[Http Client]- Webhook logs
Test with Minimal Configuration
Start with a minimal config to isolate issues:Use API Testing Tools
- Postman or Insomnia for HTTP API testing
- wscat for WebSocket testing
Monitor Network Traffic
Getting Help
Before Asking for Help
- Search existing issues - Check GitHub issues for similar problems
- Read documentation - Review relevant documentation sections
- Check version - Ensure you’re using the latest version
- Gather information:
- NapCat version
- NTQQ version
- Operating system
- Configuration (remove sensitive tokens)
- Error messages and logs
- Steps to reproduce
Community Support
Join the NapCat community groups:- NapCat Family Group 1 (1090875633)
- NapCat Family Group 2 (1059714215)
- NapCat Family Group 3 (1085662710)
- NapCat Family Group 4 (1085359803)
Reporting Bugs
When reporting bugs on GitHub:- Use a clear, descriptive title
- Include steps to reproduce
- Provide expected vs actual behavior
- Include relevant logs and configuration
- Specify environment details
Next Steps
- Check the FAQ for frequently asked questions
- Review API documentation for API usage
- Join the community for support
