continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
18.54k stars 1.54k forks source link

Failed to config.json with every update, and stays non responsive until delete old config... #2295

Open nikhil-swamix opened 1 month ago

nikhil-swamix commented 1 month ago

Before submitting your bug report

Relevant environment info

its neglect to handle errors with config json. the system is curroupt.

Description

image

hi, whenever an update is detected by continue, the config system starts throwing this message, ive seen this happen 4 times, i mhave to make backup of conf file, start and wait for extension to create defaults, and replace with backup. this is ultimate inconvenience, where the extension was supposed to save time, is now requires hot fixes just to get it working... i appreciate the efforts being put, but without some basic checks, the fun reduced...

To reproduce

Random, but noticed update extension in store whenever this is getting toasted...

Log output

}

Error: No handler for message type "config/getSerializedProfileInfo"
2024-09-18 15:56:13.594 [error] [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "9fb42620-9fdc-4300-a076-fdd3f04145c4",
    "messageType": "config/getSerializedProfileInfo"
  }
}

Error: No handler for message type "config/getSerializedProfileInfo"
2024-09-18 15:56:15.603 [error] [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "982907aa-8465-4dfa-a63b-2106eddbb9db",
    "messageType": "config/getSerializedProfileInfo"
  }
}

Error: No handler for message type "config/getSerializedProfileInfo"
2024-09-18 15:56:17.595 [error] [Extension Host] Error handling webview message: {
  "msg": {
    "messageId": "f777e0e0-0f09-44de-885e-913961cadc2c",
    "messageType": "config/getSerializedProfileInfo"
  }
}

Error: No handler for message type "config/getSerializedProfileInfo"
sestinj commented 2 days ago

@nikhil-swamix Thank you for sharing this! Could you share exactly what your config.json was when this problem was happening? I want to make sure I can successfully reproduce to solve the problem.

Also notable is that I think our most recent pre-release may have solved the problem. In version 0.9.211 of the VS Code extension we are validating config.json prior to loading it, and will display UI to explain the cause of any errors

nikhil-swamix commented 2 days ago

no,, i delete the indexes, migrations, and diffs, except the config, in ~user folder, it autoupdate from store every now and then. thats the most reliable solution. i can 200% assure you it its independent of conf file, rather im more suspicious about, how I/O are handled on crashes and version updates. and its nearly impossible to reproduce, i tried doing... maybe some error handling raises, then file is kept open and corroupt... guessing..

sestinj commented 1 day ago

@nikhil-swamix Thanks for the extra info.

Even though it looks like not many users are experiencing this, it's critical for those who do, so I've made an attempt to catch errors from any possible JSON.parse call in our code that could be causing this. This new release is v0.9.222. Please let me know whether this addresses the problem.

But I'd still like to be able to understand the exact cause and there's unfortunately not quite enough information to reproduce this, as hard as I have tried. So far I have attempted:

Can you share more information about your environment?

cc'ing @sdudzin @scottopell as well in case you can share anything else about your setup.

nikhil-swamix commented 1 day ago

appreciate your efforts on this issue, even i had difficulty on replication. my biggest doubt is on the sqlite database or index db, and the fact, my D drive was failing randomly! its a nvme m2 ssd, and my github lies there. i have updated the BIOS firmware for the sake of this issue! afaik, no issue since last week, im monitoring behaviour and will report when failed. not sure what other users may facing error.

Regarding Env: Windows 10 , vscode 1.94.2 continue 0.8.53 - 2024-10-11 no containers, Config file is stable as hell, i just keep a backup between versions, using rollback command

$src = "C:\Users\User\.continue\config.json"
$dst = "C:\Users\User\.continue\config_backup_$(Get-Date -Format 'yyyyMMdd_HHmmss').json"
Copy-Item $src $dst

maybe if you can add full traceback in inspector... i can dump here. the message in debug is unclear, and some random build hash was returned which made difficult to go deeper...

  1. maybe if source map can added in final build?
  2. maybe a continue.debug.getEnvDetailsForGithubIssue() like fuinction implemented, so user may post directly, and it will copy to clipboard?

you know better you may implement whats right. regards

nikhil-swamix commented 1 day ago

@sestinj image

i updated version, not greeted with error, so this point "between uersion updates" may ruled out, a possibility is that, when i use ollama, continue starts to panic, i have "disable indexing on startup" setting for it. sometimes the usage of ollama and bge-m3 model is so severe that, i get Blue screen of death, and Kernel Inpage error... there is a chance that index DB may corroupt... cpu usage bumps 100%.

what i propose, is to limit the chunking being sent when indexing, via a prrameter. and allow it slowly. maybe a dropdown could added for most prefillable options, this setting seems a mega UX improvement image

hope you capitalize on this, 100 points awarded... 👍