troubleshooting
This guide helps you identify and resolve common issues that may arise when working with the Instinct API. Use this as a reference when you encounter problems with API requests, data processing, or hardware interaction.
general api issues
connection issues
Problem: Unable to connect to the API
Possible causes:
- API service is not running
- Network connectivity issues
- Incorrect base URL
Solutions:
-
Verify that the service is running:
# Check API health
curl http://localhost:42069/system/healthz -
Check network connectivity:
ping localhost
-
Verify you're using the correct port (42069) and protocol (http)
authentication issues
Problem: Authentication failures
Possible causes:
- Headset not authenticated through companion app
Solutions:
- Ensure the headset has been authenticated using the Nexstem companion app
- IMPORTANT: The Nexstem companion app is the only authentication method available for Nexstem headsets. API Keys, Session-Based Authentication, and OAuth are not applicable.
- If you have access to a display and keyboard, plug them through the USB Type C Port, and open the
Authenticator
application. - Check if the services are running.
request format issues
Problem: API returns 400 Bad Request
Possible causes:
- Invalid JSON format
- Missing required fields
- Invalid parameter values
Solutions:
- Validate your JSON with a JSON linter
- Check the API documentation for required fields
- Ensure parameter values are within expected ranges
Example of proper request formatting:
curl -X POST http://localhost:42069/stream/streams \
-H "Content-Type: application/json" \
-d '{
"nodes": [
{
"id": "source",
"executable": "data-generator",
"config": {
"frequency": 1
}
}
],
"pipes": []
}'
data processing issues
stream creation issues
Problem: Cannot create stream
Possible causes:
- Invalid stream configuration
- Duplicate node or pipe IDs
- Invalid executable references
- Cycle detected in the DAG
Solutions:
- Verify that all node and pipe IDs are unique
- Check that all referenced executables exist
- Ensure the DAG structure has no cycles
- Validate the configuration against the schema
stream execution issues
Problem: Stream stops unexpectedly
Possible causes:
- Node executables crashing
- Memory or resource limitations
- Unhandled exceptions in processing logic
Solutions:
- Check node logs for error messages
- Monitor system resources during execution
- Ensure nodes handle errors properly
- Add proper error handling in your node configurations
data flow issues
Problem: Data not flowing through the pipeline
Possible causes:
- Disconnected pipes
- Misconfigured nodes
- Data format mismatches between nodes
Solutions:
- Verify that pipes connect nodes correctly
- Check node configurations match expected input/output formats
- Add logging nodes to debug data flow
- Ensure source nodes are generating data
hardware issues
headset connection issues
Problem: Cannot connect to the EEG headset
Possible causes:
- Headset is powered off
- Headset is not connected to the same wifi network as your PC/Laptop.
Solutions:
- Ensure the headset is powered on
- Use the companion app to connect the headset to the same network as your are in.
eeg streaming issues
Problem: Cannot start EEG streaming
Possible causes:
- Impedance check is active
- Previous stream not properly terminated
Solutions:
- Stop any active impedance checks
- Verify stream configuration is valid
- Check hardware status
signal quality issues
Problem: Noisy EEG signal
- High impedance on one or more electrodes
- Environmental electrical interference
- Subject movement or muscle artifacts
- Loose electrode connections
Solution:
- Check impedance values for all electrodes
- Ensure proper electrode placement and contact
- Reduce environmental electrical interference
- Ask the subject to remain still and relaxed
- Apply appropriate filtering to the signal
Problem: Signal drift
- Electrode polarization
- Temperature changes
- Subject sweating
- Poor electrode contact
Solution:
- Use higher quality electrodes or add fresh gel
- Apply a high-pass filter (typically > 0.1 Hz)
- Maintain consistent room temperature
- Check and improve electrode-scalp contact
battery and power issues
Problem: Headset battery drains quickly
- High sampling rate configuration
- All electrodes active when not needed
- Wireless streaming at maximum data rate
- Old or degraded battery
Solution:
- Lower sampling rate if appropriate for your application
- Disable unused electrodes
- Consider using wired connection when possible
- Check battery health and replace if necessary
connectivity issues
Problem: Cannot connect to websocket stream
- API server not running
- Incorrect websocket URL
- Firewall blocking connection
- Network configuration issues
Solution:
- Ensure the API server is running (
GET /system/healthz
) - Verify the websocket URL format
- Check for firewall or network restrictions
- Try connecting from the same machine first
Problem: Connection drops frequently
- Unstable network
- High data rate overwhelming connection
- Server resource limitations
- Distance from wireless access point
Solution:
- Improve network stability
- Reduce data rate (lower sampling rate or fewer channels)
- Ensure server has sufficient resources
- Move closer to wireless access point
file and storage issues
Problem: Insufficient storage space
- Disk space nearly full
- Long recording sessions
- High sampling rate generating large files
- Old temporary files not cleaned up
Solution:
- Check available disk space
- Archive or remove old files
- Adjust recording parameters if appropriate
- Clean up temporary files
performance issues
stream processing performance
Problem: High latency in data processing
Possible causes:
- Inefficient node implementations
- Insufficient hardware resources
- Buffer overflows
- Complex processing logic
Solutions:
- Optimize node configurations
- Adjust buffer sizes
- Simplify processing logic
- Monitor CPU and memory usage
- Consider distributing processing across multiple streams
memory leaks
Problem: Increasing memory usage over time
Possible causes:
- Memory leaks in node executables
- Unbounded buffers
- Resources not being released
Solutions:
- Implement proper resource cleanup
- Set reasonable buffer limits
- Restart services periodically
- Monitor memory usage trends
advanced troubleshooting
logging and diagnostics
Enhance logging for better diagnostics:
-
Enable debug logging:
curl -X POST http://localhost:42069/system/config \
-H "Content-Type: application/json" \
-d '{
"logging": {
"level": "debug",
"includeTimestamp": true
}
}' -
Use the debug command endpoint for advanced diagnostics:
curl -X POST http://localhost:42069/system/debug/command \
-H "Content-Type: application/json" \
-d '{
"command": "diagnostics",
"level": "full"
}'
recovery procedures
If the API becomes unresponsive:
-
Restart the service:
# For systemd-based systems
sudo systemctl restart instinct-api-service -
Clear temporary data if necessary:
# Location depends on your installation
sudo rm -rf /var/lib/instinct/tmp/* -
Verify services are running:
systemctl status instinct*
getting help
If you're unable to resolve an issue using this guide:
- Check the product documentation for updated information here
- Contact support with the following information:
- Detailed description of the issue
- Steps to reproduce
- API responses including error codes
- System information
- Logs if available
for additional help
If you continue to experience issues:
- Check our API Reference for detailed endpoint documentation
- Review the Basic Pipeline tutorial
- Contact our support team for assistance