continue
continue copied to clipboard
Issue with "Continue" Extension When Using --user-data-dir Flag with VSCode
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
- 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
- Close all running instances of Visual Studio Code.
- Open a terminal or command prompt.
- Launch Visual Studio Code with the --user-data-dir argument by running a command similar to code --user-data-dir=<path_to_custom_directory>.
- 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
Hi @DLLDev have you found a workaround by any chance?
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