continue icon indicating copy to clipboard operation
continue copied to clipboard

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

Open DLLDev opened this issue 1 year ago • 1 comments

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=<path_to_custom_directory>.
  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

DLLDev avatar Feb 24 '24 11:02 DLLDev

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

maxime1992 avatar Apr 17 '24 11:04 maxime1992

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

eladamittai avatar Aug 19 '24 15:08 eladamittai