continue
continue copied to clipboard
Empty config.json with valid config.yml breaks config load. Empty json file should be ignored and not parsed.
Before submitting your bug report
- [x] I believe this is a bug. I'll try to join the Continue Discord for questions
- [x] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
Example System 1
- OS: Windows 10.0.26100.4349
- Continue: 1.0.13
- IDE version: VScode 1.101.0
Example System 2
- OS: MacOS
- Continue: 1.0.13
- IDE version: Version: 1.101.0 (Universal)
Commit: dfaf44141ea9deb3b4096f7cd6d24e00c147a4b1
Date: 2025-06-11T15:00:50.123Z (5 days ago)
Electron: 35.5.1
ElectronBuildId: 11727614
Chromium: 134.0.6998.205
Node.js: 22.15.1
V8: 13.4.114.21-electron.0
OS: Darwin arm64 24.5.0
- Model: N/A
- config:
Description
I'm supporting a few hundred Continue users with a global config.yml that is deployed by our enterprise desktop services group. We have an issue that appeared after the transition to the YAML config from JSON. Some machines when "checking-in" to the network device management host, it sees the missing .continue/config.json and then creates an empty version. We are working on the fix for this, but it will be rolled out later and it appears to be a defect that the function to consume the config.json doesn't check to see if the file is empty. This config.json should be checked for size/length at minimum, before forcing the contents to be parsed, thus creating an error that results in the entire configuration load failing and blocking the Continue extension from ever starting fully (even with a working and valid config.yaml). This
To reproduce
- In the
.continuedirectory, ensure you have a valid and populatedconfig.ymlfile and aconfig.jsonthat is empty. - Launch VSCode and navigate to Continue to ensure Continue extension loads.
- Observe the error message:
Error: Migration: Failed to parse config.json: SyntaxError: Unexpected end of JSON input
at migrateJsonSharedConfig (/Users/nickb/.vscode/extensions/continue.continue-1.0.13-darwin-arm64/out/extension.js:645363:11)
at doLoadConfig (/Users/nickb/.vscode/extensions/continue.continue-1.0.13-darwin-arm64/out/extension.js:646132:5)
at async _LocalProfileLoader.doLoadConfig (/Users/nickb/.vscode/extensions/continue.continue-1.0.13-darwin-arm64/out/extension.js:646387:25)
at async /Users/nickb/.vscode/extensions/continue.continue-1.0.13-darwin-arm64/out/extension.js:646579:23
4. To resolve this crashed state during `migrateJsonSharedConfig`, the user simply can delete the config.json.
5. Then restart the extension and Continue loads successfully with the existing `config.yaml`
### Log output
```Shell
Extension Host
localProcessExtensionHost.ts:280 {"0":{"fatal":true,"message":"Migration: Failed to parse config.json: SyntaxError: Unexpected end of JSON input\nError: Migration: Failed to parse config.json: SyntaxError: Unexpected end of JSON input\n\tat migrateJsonSharedConfig (/Users/r627700/.vscode/extensions/continue.continue-1.0.13-darwin-arm64/out/extension.js:645363:11)\n\tat doLoadConfig (/Users/r627700/.vscode/extensions/continue.continue-1.0.13-darwin-arm64/out/extension.js:646132:5)\n\tat async _LocalProfileLoader.doLoadConfig (/Users/r627700/.vscode/extensions/continue.continue-1.0.13-darwin-arm64/out/extension.js:646387:25)\n\tat async /Users/r627700/.vscode/extensions/continue.continue-1.0.13-darwin-arm64/out/extension.js:646579:23"},"level":"warn","message":"Errors loading config: "}
console.ts:137 [Extension Host] {"0":{"fatal":true,"message":"Migration: Failed to parse config.json: SyntaxError: Unexpected end of JSON input\nError: Migration: Failed to parse config.json: SyntaxError: Unexpected end of JSON input\n\tat migrateJsonSharedConfig (/Users/r627700/.vscode/extensions/continue.continue-1.0.13-darwin-arm64/out/extension.js:645363:11)\n\tat doLoadConfig (/Users/r627700/.vscode/extensions/continue.continue-1.0.13-darwin-arm64/out/extension.js:646132:5)\n\tat async _LocalProfileLoader.doLoadConfig (/Users/r627700/.vscode/extensions/continue.continue-1.0.13-darwin-arm64/out/extension.js:646387:25)\n\tat async /Users/r627700/.vscode/extensions/continue.continue-1.0.13-darwin-arm64/out/extension.js:646579:23"},"level":"warn","message":"Errors loading config: "}