Skip to content

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

@DLLDev

Description

@DLLDev

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ide:vscodeRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behaviorstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions