Troubleshooting
Table of contents
Reading error messages
sn-sync error messages follow this format:
<prefix> (<ERROR_CODE>) <details>
Examples:
Pull failed: (SN_PULL_ALL_FILES_FAILED) network timeoutPush active failed: (SN_PUSH_CURRENT_FAILED) remote conflict against baseline
For more detail, open the VS Code output channel sn-sync diagnostics:
- Go to
View → Output - Select sn-sync diagnostics from the dropdown
The diagnostics channel logs structured entries with the error code, command, category, and timestamp. Sensitive values (passwords, tokens) are always redacted before logging.
Common issues
“No workspace folder found”
Cause: VS Code is open without a folder or workspace.
Fix: Open a folder (File → Open Folder) and retry the command.
Auth fails or credentials are rejected
Fix:
- Run
sn: auth→ validate auth to test current credentials - If validation fails, run
sn: auth→ configure auth and re-enter credentials - Confirm your instance URL is HTTPS and the host matches
*.service-now.com(or your configured allowed host)
Pull fails with a network error
Cause: Instance unreachable, VPN required, wrong instance name, or firewall blocking the connection.
Fix:
- Confirm you can reach
https://<instance>.service-now.comin your browser - Verify the instance name in
.snsyncrc - Connect to VPN if required by your organisation
- Run
sn: auth→ validate auth to confirm auth is working
Push is blocked by a conflict
Cause: The remote record changed since your last pull.
Fix: Run sn: push → all files. For each conflicting file, choose one of:
| Action | When to use |
|---|---|
| merge | Open VS Code’s merge editor and resolve manually |
| overwrite | You are confident your local version is correct |
| discard local | You want to accept the remote version and abandon local changes |
| skip | Come back to this file later |
Index is out of sync / push behaves unexpectedly
Cause: The sync index no longer reflects the actual state of local files.
Fix:
- Run
sn: reset→ reset index - Run
sn: pull→ all files to rebuild the index from the remote state
OAuth token expired / refresh fails
Fix:
- Run
sn: auth→ validate auth - If validation fails, run
sn: auth→ configure auth and complete the OAuth flow again
Error categories
When looking at the sn-sync diagnostics output, the category field helps you decide where to look first:
| Category | Typical cause | First step |
|---|---|---|
auth |
Invalid, expired, or missing credentials | Re-run sn: auth |
network |
Instance unreachable or timed out | Check connectivity and instance name |
conflict |
Remote record changed since last pull | Pull, resolve conflict, retry push |
validation |
Bad input (sys_id, table name, config value) | Check command inputs and .snsyncrc |
unknown |
Unexpected error | Check full diagnostics and open a bug report |
Filing a bug report
If the issue persists, open a bug report at github.com/AlexAlvarez092/sn-sync/issues.
Include:
- The full error message (with error code)
- The command that failed
- Extension version (visible in the Extensions panel)
- VS Code version and operating system
- The relevant sanitised line from the
sn-sync diagnosticsoutput channel