Troubleshooting
Common issues, solutions, and frequently asked questions for NetFUNNEL React Native Agent integration.
Installation Issues
Package Installation Failure
Symptoms:
npm installfails- Package not found
Solutions:
- Check network connection: Verify internet connection status
- Check package path: Verify that the dependency path in
package.jsonis correct - Clear npm cache: Run
npm cache clean --forceand retry
Initialization Failure
Symptoms:
- Error occurs when app starts
- NetFUNNEL is not initialized
Solutions:
- Check clientId: Verify that
clientIdis set correctly - Check empty string: Verify that
clientIdis not an empty string - Initialization location: Verify that initialization is done at the start of
App.jsorApp.tsx
Function Call Errors
"nfStart is not a function" Error
Symptoms:
ReferenceError: nfStart is not defined- Function is undefined when called
Solutions:
- Check initialization: Verify that
Netfunnel.initialize()was called first - Check import: Verify that
import Netfunnel from 'netfunnel-rn-agent'is correct - Function usage: Verify that it is called in the format
Netfunnel.nfStart()
Callback Not Executing
Symptoms:
nfStartis called but callback is not executed- No response received
Solutions:
- Check network: Verify network requests to NetFUNNEL server
- Console logs: Set
printLog: trueto check debugging logs - Segment status: Verify that the segment is not in Block status
- Limited Inflow: Verify that Limited Inflow allows entry
Network and Connection Issues
Network Timeout Error
Symptoms:
NetworkErrorstatus code 1002- Request times out
Solutions:
- Increase timeout: Set
networkTimeoutto a higher value (max 10000ms) - Configure retry: Increase
retryCount - Network recovery: Enable
useNetworkRecoveryMode: true
Netfunnel.initialize({
clientId: 'your-client-id',
networkTimeout: 5000,
retryCount: 2,
useNetworkRecoveryMode: true
});
Network Connection Error
Symptoms:
NetworkErrorstatus code 1001- No internet connection
Solutions:
- Check connection: Verify internet connection status
- Firewall: Verify that NetFUNNEL domain is not blocked
- Proxy settings: Configure proxy if necessary
- Error handling: Implement appropriate NetworkError handling
function nfCallback(response) {
if (response.status === 'NetworkError') {
// Display user-friendly message
Alert.alert('Network Connection Issue', 'Please check your internet connection.');
// Optionally retry or continue
}
}
Waiting Room Issues
Waiting Room Not Displayed
Symptoms:
- Waiting room does not appear
- User proceeds directly
Solutions:
- Limited Inflow: Set to 0 for testing
- Segment activation: Verify that the segment is activated
- Template settings: Verify
useNetfunnelTemplate: true - WebView component: Verify that
<Netfunnel.WebViewComponent />is added correctly
Waiting Room Stuck (Does Not End)
Symptoms:
- Waiting room appears but entry is not allowed
- Infinite waiting
Solutions:
- Limited Inflow: Increase Limited Inflow value
- Segment status: Verify that the segment is in Block status
- Network issues: Verify network connection status
- Server status: Verify NetFUNNEL server status
Key Management Issues
Key Not Returned
Symptoms:
- Next user waits indefinitely
- Queue does not progress
Solutions:
- nfStop call: Always verify that
nfStop/nfStopSectionis called - Error handling: Return key even in error scenarios
- Check timeout: Verify segment timeout settings
try {
await performAction();
Netfunnel.nfStop(projectKey, segmentKey);
} catch (error) {
console.error('Operation failed:', error);
// Return key even on error
Netfunnel.nfStop(projectKey, segmentKey);
}
Debugging Tips
Check Logs
You can check logs by setting printLog: true for debugging:
Netfunnel.initialize({
clientId: 'your-client-id',
printLog: true // Enable debugging logs
});
Check logs with [NF4] prefix in the console.
Common Checkpoints
- Check initialization: Verify that
Netfunnel.initialize()is called correctly - WebView component: Verify that
<Netfunnel.WebViewComponent />is added in the correct location - Key matching: Verify that the same keys are used in start and stop functions
- Callback implementation: Verify that required statuses (Success, Error, NetworkError) are handled
Related Documentation
- Installation and Initialization: Detailed setup guide
- API Reference: Complete function specifications
- Initialization Options: All initialization parameters
- FAQ: Frequently asked questions