Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error loading webview: Error: Could not register service worker: InvalidStateError: #1434

Closed
Xachman opened this issue Feb 26, 2024 · 1 comment

Comments

@Xachman
Copy link

Xachman commented Feb 26, 2024

please complete the following information:

  • OS version: [e.g. Win 10, Mac Catalina]
    MacOS Ventura
  • Editor version [e.g. 1.45.0-insider]:
    1.86.2 (Universal)
  • Programming language: [e.g. js, ts, c++]
    -PHP
  • TabNine extension version:
    3.72.0

If the issue is related to TabNine failure, please provide log files:

Type TabNine::config in your editor, the logs are located at the bottom of the page

Editor console logs:

Help -> Toggle Developer Tools

webviewElement.ts:512 An iframe which has both allow-scripts and allow-same-origin for its sandbox attribute can escape its sandboxing.
mountTo @ webviewElement.ts:512
M @ overlayWebview.ts:218
claim @ overlayWebview.ts:120
kb @ webviewEditor.ts:178
setInput @ webviewEditor.ts:169
await in setInput (async)
S @ editorPanes.ts:445
L @ editorPanes.ts:270
openEditor @ editorPanes.ts:146
(anonymous) @ editorGroupView.ts:1124
Eb @ editorGroupView.ts:1148
Db @ editorGroupView.ts:1106
openEditor @ editorGroupView.ts:1012
openEditor @ editorService.ts:556
openWebview @ webviewWorkbenchService.ts:285
$createWebviewPanel @ mainThreadWebviewPanels.ts:167
S @ rpcProtocol.ts:458
Q @ rpcProtocol.ts:443
M @ rpcProtocol.ts:373
L @ rpcProtocol.ts:299
(anonymous) @ rpcProtocol.ts:161
y @ event.ts:1127
fire @ event.ts:1158
fire @ ipc.net.ts:650
z @ ipc.net.ts:1015
(anonymous) @ ipc.net.ts:875
y @ event.ts:1127
fire @ event.ts:1158
acceptChunk @ ipc.net.ts:394
(anonymous) @ ipc.net.ts:350
(anonymous) @ browserSocketFactory.ts:231
y @ event.ts:1127
fire @ event.ts:1158
j.onload @ browserSocketFactory.ts:92
index.html?id=4264d857-6ae3-44f1-aaa1-3ecf8692e0a0&origin=4354c190-2ccd-475d-8ee9-13909406d821&swVersion=4&extensionId=TabNine.tabnine-vscode&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app&remoteAuthority=ssh-remote%2Bdev-v2: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=4264d857-6ae3-44f1-aaa1-3ecf8692e0a0&origin=4354c190-2ccd-475d-8ee9-13909406d821&swVersion=4&extensionId=TabNine.tabnine-vscode&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app&remoteAuthority=ssh-remote%2Bdev-v2:913
await in (anonymous) (async)
HostMessaging.channel.port1.onmessage @ index.html?id=4264d857-6ae3-44f1-aaa1-3ecf8692e0a0&origin=4354c190-2ccd-475d-8ee9-13909406d821&swVersion=4&extensionId=TabNine.tabnine-vscode&platform=electron&vscode-resource-base-authority=vscode-resource.vscode-cdn.net&parentOrigin=vscode-file%3A%2F%2Fvscode-app&remoteAuthority=ssh-remote%2Bdev-v2: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..

Issue Details:

I keep running into this issue on MacOS for some reason. It should be noted that I am using this with remote ssh. I also have this working fine on windows.

gz#29919

(related to Zendesk ticket #29919)

@Xachman
Copy link
Author

Xachman commented Feb 26, 2024

Seems to be related to full disk access on vscode. After turning that on for vscode it seems to be working.

@Xachman Xachman closed this as completed Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant