Troubleshooting
Common issues, solutions, and frequently asked questions for NetFUNNEL Node.js Agent integration.
Installation Issues
Package Installation Failure
Symptoms:
npm installfails- Cannot find package
Solutions:
- Check package path: Verify that the dependency path in
package.jsonis correct - Check console: Check the exact URL in the Agent tab of the console
- Check network connection: Check internet connection status
- Clear npm cache: Run
npm cache clean --forceand retry
Initialization Failure
Symptoms:
- Error occurs when starting server
- NetFUNNEL is not initialized
Solutions:
- Check clientId: Verify that
clientIdis correctly set - Check secretKey: Verify that
secretKeyis correctly set - Check empty strings: Verify that
clientIdandsecretKeyare not empty strings - Check initialization location: For Express, verify initialization in
app.ts; for Nuxt, verify initialization in middleware
Middleware Issues
Express Middleware Not Working
Symptoms:
- Middleware is not called
- NetFUNNEL logic is not executed
Solutions:
- Check registration: Verify that
app.use(netfunnelMiddleware)is correctly called - Check order: Verify that it is registered before other middleware
- Check initialization: Verify that
Netfunnel.initialize()is called before middleware registration - Check path: To apply to specific paths only, use
app.use('/path', netfunnelMiddleware)
Nuxt Middleware Not Working
Symptoms:
- Middleware is not called
- NetFUNNEL logic is not executed
Solutions:
- Check file location: Verify that the file is correctly located in
server/middleware/netfunnelAgent.ts - Check filename: Verify that the filename is correct
- Check initialization: Verify that
Netfunnel.initialize()is called within the middleware
Trigger Rule Issues
Trigger Rules Not Matching
Symptoms:
- Queue is not applied
- Waiting room is not displayed even for URLs that match the rules
Solutions:
- Check rules: Verify that trigger rules are correctly set in the console
- Check URL: Verify that the accessed URL matches the rule's Value
- Check Match option: Verify that Match options (Equals, Contains, StartsWith, EndsWith) are correct
- Check case sensitivity: Verify the Aa option (case sensitivity) setting
- Use test feature: Use the console's trigger rule test feature to verify that URLs match the rules
Waiting Room Not Displayed
Symptoms:
- Waiting room is not displayed even for URLs that match the rules
- Users proceed directly
Solutions:
- Check segment activation: Verify that the segment is activated
- Check entry status: Verify that entry status is set to
Waiting - Check entry limit: Set entry limit to
0for testing - Check rule matching: Verify that trigger rules are correctly matched
Network and Connection Issues
Network Connection Error
Symptoms:
- Cannot connect to NetFUNNEL server
- Requests fail
Solutions:
- Check connection: Check internet connection status
- Check firewall: Verify that NetFUNNEL domain is not blocked
- Configure proxy: Configure proxy if necessary
- Check server URL: Verify that
serverUrlsetting is correct
Timeout Error
Symptoms:
- Requests timeout
- No response received
Solutions:
- Check network status: Check network connection status
- Check server status: Check NetFUNNEL server status
- Check settings: Verify that initialization settings are correct
Logging Issues
Logs Not Output
Symptoms:
- Logs are not output even though
printLog: trueis set
Solutions:
- Check settings: Verify that
printLog: trueis correctly set - Check initialization: Verify that
printLog: trueis set inNetfunnel.initialize() - Check console: Check logs in the server console
Key Management Issues
Key Not Returned
Symptoms:
- Next user waits indefinitely
- Queue does not progress
Solutions:
- Check returnKey setting: Verify that
returnKeysetting is correct - Check timeout: Check segment timeout settings
- Check server logs: Check server logs for key return related errors
Debugging Tips
Check Logs
You can check logs by setting printLog: true for debugging:
import { Netfunnel } from 'netfunnel-node-agent';
Netfunnel.initialize({
clientId: '{{CLIENT_ID}}',
secretKey: '{{SECRET_KEY}}',
printLog: true // Enable debugging logs
});
Check Version
You can check the agent version:
import { Netfunnel } from 'netfunnel-node-agent';
console.log('NetFUNNEL Version:', Netfunnel.getVersion());
Common Check Items
- Check initialization: Verify that
Netfunnel.initialize()is correctly called - Middleware registration: Verify that Express/Nuxt middleware is correctly registered
- Trigger rules: Verify that trigger rules are correctly set in the console
- Check dependencies: Verify that the
netfunnel-node-agentpackage is correctly installed
Related Documentation
- Installation and Initialization: Detailed configuration guide
- API Reference: Complete function specifications
- Initialization Settings: All initialization parameters
- FAQ: Frequently asked questions