Troubleshooting
Table of contents
- Reading error messages
- Common issues
- “No workspace folder found”
- Auth fails or credentials are rejected
- Pull fails with a network error
- Push is blocked by a conflict
- “another command is already running” warning appears unexpectedly
- Index is out of sync / push behaves unexpectedly
- Invalid
.snsyncrcsetting blocks pull commands - OAuth token expired / refresh fails
- Error categories
- Filing a bug report
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 |
|---|---|
| overwrite remote | You are confident your local version is correct |
| discard local | You want to accept the remote version and abandon local changes |
“another command is already running” warning appears unexpectedly
Cause: Only one sn-sync command can run at a time — this is intentional, to avoid concurrent reads/writes to the sync index and local files. If you see this warning, either:
- Another sn-sync command is genuinely still running (for example, an input box is still open and waiting for your response — it will not close on its own if you click away).
- You are running an old, cached build of the extension that predates a fix to this lock (see below).
Fix:
- Check for any pending sn-sync prompt (input box or quick pick) still open in VS Code and respond to it or press
Escapeto cancel it — the lock is only released once that prompt is answered. - If no prompt is open and the warning still appears, reload the VS Code window (
Cmd/Ctrl+Shift+P→ Developer: Reload Window) to rule out a stuck extension host state. - If the warning appears every time you use
sn: pullorsn: push(the scope-selector commands) even with nothing else running, confirm your installed sn-sync version is0.1.4or later, which fixes a self-blocking bug in these dispatcher commands.
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
Invalid .snsyncrc setting blocks pull commands
Cause: A settings entry in .snsyncrc is invalid — for example it is missing folder, table, or key, has no valid fields, or defines multiple fields that share the same extension (which would generate duplicate output file names for the same record).
sn-sync never silently rewrites or removes invalid entries from .snsyncrc. Instead, pull commands (pull all files, pull table, pull by sys_id, pull current) fail fast with an error identifying the problematic setting.
Example error:
Invalid sync setting in .snsyncrc for table "sys_dictionary": duplicate output file names would be generated for key "name" (extensions: txt, txt, txt). Give each field a unique "extension" so pulled files do not overwrite each other.
Fix:
- Open
.snsyncrcand find the setting identified in the error (byfolderand/ortable). - Fix the reported problem — for example give each
fieldsentry a uniqueextension, or add the missingfolder/table/keyvalue. - Save the file and re-run the pull command.
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