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.91k stars 1.61k forks source link

Issue with "Continue" Extension When Using --user-data-dir Flag with VSCode #890

Open DLLDev opened 8 months ago

DLLDev commented 8 months ago

Before submitting your bug report

Relevant environment info

- OS: Windows 10 (10.0.19045.4046)
- Continue: 0.8.2 and v0.9.71 (pre-release)
- IDE: Visual Studio Code (1.86.2)

Description

When launching Visual Studio Code with the --user-data-dir argument specified, the "Continue" extension fails to initialize properly, displaying the following error message:

Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..

To reproduce

Steps to Reproduce

  1. Close all running instances of Visual Studio Code.
  2. Open a terminal or command prompt.
  3. Launch Visual Studio Code with the --user-data-dir argument by running a command similar to code --user-data-dir=.
  4. Observe that the "Continue" extension fails to initialize, displaying the error message mentioned above.

Log output

index.html?id=21739499-840c-4ca0-9b17-dd290193e6e5&origin=9387306c-1cb9-487f-a2b9-30b47e54f402&swVersion=4&extensionId=Continue.continue&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app&purpose=webviewView:913 Webview fatal error: Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..
(anonymous) @ index.html?id=21739499-840c-4ca0-9b17-dd290193e6e5&origin=9387306c-1cb9-487f-a2b9-30b47e54f402&swVersion=4&extensionId=Continue.continue&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app&purpose=webviewView:913
await in (anonymous) (async)
HostMessaging.channel.port1.onmessage @ index.html?id=21739499-840c-4ca0-9b17-dd290193e6e5&origin=9387306c-1cb9-487f-a2b9-30b47e54f402&swVersion=4&extensionId=Continue.continue&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app&purpose=webviewView:312

notificationsAlerts.ts:42 Error loading webview: Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..
c @ notificationsAlerts.ts:42
(anonymous) @ notificationsAlerts.ts:28
y @ event.ts:1127
z @ event.ts:1138
fire @ event.ts:1162
addNotification @ notifications.ts:228
error @ notificationService.ts:208
(anonymous) @ webviewElement.ts:263
(anonymous) @ webviewElement.ts:207
G.onmessage @ webviewElement.ts:207
index.html?id=21739499-840c-4ca0-9b17-dd290193e6e5&origin=9387306c-1cb9-487f-a2b9-30b47e54f402&swVersion=4&extensionId=Continue.continue&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app&purpose=webviewView:913 Webview fatal error: Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..
(anonymous) @ index.html?id=21739499-840c-4ca0-9b17-dd290193e6e5&origin=9387306c-1cb9-487f-a2b9-30b47e54f402&swVersion=4&extensionId=Continue.continue&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app&purpose=webviewView:913
await in (anonymous) (async)
HostMessaging.channel.port1.onmessage @ index.html?id=21739499-840c-4ca0-9b17-dd290193e6e5&origin=9387306c-1cb9-487f-a2b9-30b47e54f402&swVersion=4&extensionId=Continue.continue&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app&purpose=webviewView:312

notificationsAlerts.ts:42 Error loading webview: Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..
c @ notificationsAlerts.ts:42
(anonymous) @ notificationsAlerts.ts:28
y @ event.ts:1127
z @ event.ts:1138
fire @ event.ts:1162
addNotification @ notifications.ts:228
error @ notificationService.ts:208
(anonymous) @ webviewElement.ts:263
(anonymous) @ webviewElement.ts:207
G.onmessage @ webviewElement.ts:207
maxime1992 commented 6 months ago

Hi @DLLDev have you found a workaround by any chance?

eladamittai commented 2 months ago

I also got this issue. OS: windows 10 Continue: 09153 and 09130 Vscode: 1.90.0 I didn't start vscode with --user-data-dir

lv123123long commented 4 weeks ago

yes, I alse got this issue
Version: 1.94.1 (user setup) Commit: e10f2369d0d9614a452462f2e01cdc4aa9486296 Date: 2024-10-05T05:44:32.189Z Electron: 30.5.1 ElectronBuildId: 10262041 Chromium: 124.0.6367.243 Node.js: 20.16.0 V8: 12.4.254.20-electron.0 OS: Windows_NT x64 10.0.19044

lv123123long commented 3 weeks ago

Can someone fix this