Troubleshooting
Having trouble with SnapBack? This guide covers common issues and their solutions.
Common Issues
Extension Not Installing
Problem: The SnapBack extension fails to install in VS Code.
Solutions:
- Ensure youâre using VS Code version 1.70 or later
- Check your internet connection
- Try restarting VS Code and installing again
- Clear VS Codeâs extension cache:
# Close VS Code # Navigate to your VS Code user data directory # Delete the "extensions" folder # Restart VS Code and try again
Snapshots Not Being Created
Problem: SnapBack isnât creating snapshots when you save files.
Solutions:
- Check that the SnapBack extension is enabled
- Verify that you have permission to write to the snapshot storage location
- Check the SnapBack output panel for error messages:
# In VS Code, go to View â Output # Select "SnapBack" from the dropdown - Ensure your file isnât in an ignored pattern (check .snapbackignore)
AI Detection False Positives
Problem: Guardian AI is flagging code that isnât actually a risk.
Solutions:
- Add the file or pattern to your .snapbackignore file:
// .snapbackignore { "aiDetection": { "ignorePatterns": [ "**/mock-data/**", "**/*.example.js" ] } } - Adjust sensitivity levels in your configuration:
// .snapbackconfig { "aiDetection": { "sensitivity": "medium" // or "low" } } - Provide feedback through the VS Code extension
Performance Issues
Problem: SnapBack is slowing down VS Code or taking too long to create snapshots.
Solutions:
- Check if you have an excessive number of snapshots:
snapback stats - Clean up old snapshots:
snapback cleanup --keep 30d - Exclude large files or directories:
// .snapbackignore { "snapshots": { "ignorePatterns": [ "**/node_modules/**", "**/dist/**", "*.log" ] } }
Error Codes
ERR_001: Storage Permission Denied
Cause: SnapBack doesnât have permission to write to the snapshot storage location.
Solution:
- Check that the storage directory exists and is writable
- Run VS Code with appropriate permissions
- Change the storage location in settings:
// VS Code settings.json { "snapback.storagePath": "/path/to/writable/directory" }
ERR_002: Invalid Configuration
Cause: Thereâs a syntax error in one of your SnapBack configuration files.
Solution:
- Validate your JSON syntax in .snapbackconfig and .snapbackignore
- Use a JSON validator tool to check for errors
- Refer to the configuration documentation for correct format
ERR_003: Network Error (CLI)
Cause: The CLI tool canât connect to required services.
Solution:
- Check your internet connection
- Verify that required ports are not blocked by firewall
- Try using the CLI tool in offline mode if available
Platform-Specific Issues
macOS
Issue: SnapBack extension not working on macOS.
Solutions:
- Ensure youâre using the official VS Code build (not VS Code - Insiders unless specified)
- Check that youâve granted VS Code access to your files in System Preferences
- Try reinstalling the extension
Windows
Issue: Path length issues on Windows.
Solutions:
- Enable long path support in Windows:
# Run as Administrator reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 - Use a shorter project path
- Configure SnapBack to use a different storage location
Linux
Issue: Permission issues with snapshot storage.
Solutions:
- Ensure the user running VS Code has write permissions to the storage directory
- Check that the file system supports the required operations
- Consider using a different storage location
Debugging Steps
Enable Debug Logging
To get more detailed information about what SnapBack is doing:
- In VS Code, open Settings (Ctrl+, or Cmd+,)
- Search for âsnapback debugâ
- Enable debug logging
- Check the Output panel for detailed logs
Check System Requirements
Ensure your system meets the minimum requirements:
- VS Code: Version 1.70 or later
- Node.js: Version 14 or later (for CLI)
- Operating System: Windows 10+, macOS 10.14+, or Linux with glibc 2.17+
Verify Installation
To verify that SnapBack is properly installed:
# Check VS Code extension
code --list-extensions | grep snapback
# Check CLI tool
snapback --version
# Check configuration
snapback config validate
Getting Help
If youâre still having issues after trying these solutions:
-
Check the Community:
-
Contact Support:
- Email: support@snapback.dev
- Include:
- SnapBack version
- VS Code version
- Operating system
- Error messages
- Steps to reproduce the issue
-
Provide Debug Information:
# Generate a debug report snapback debug report --output debug-report.json
Related Documentation
- Quick Start Guide - Get up and running quickly
- Protection Levels - Configure file protection
- AI Detection - Understand risk analysis
- Session Time-Travel - Navigate your coding history
đĄ Pro Tip: Before reporting an issue, try restarting VS Code and checking the Output panel for any error messages. Many issues can be resolved with a simple restart.