Codex VS Code extension 26.x fails to load webview (ServiceWorker error) on Windows
What version of the Codex App are you using (From “About Codex” dialog)?
26.311.21342
What subscription do you have?
ChatGPT Plus
What platform is your computer?
Windows 10 x64 Also reproducible on Windows Server 2016
What issue are you seeing?
The Codex extension webview fails to load.
Error message in VS Code:
Error loading webview:
Error: Could not register service worker
InvalidStateError: Failed to register a ServiceWorker
The document is in an invalid state.
The Codex UI does not load and the panel stays blank.
What steps can reproduce the bug?
- Install Codex extension version 26.311.21342 in VS Code.
- Restart VS Code.
- Open the Codex panel from the sidebar.
- The Codex UI does not load and the panel stays blank.
Error shown in VS Code:
Error loading webview:
Could not register service worker
InvalidStateError: Failed to register a ServiceWorker
The document is in an invalid state.
Downgrading the extension to version 0.4.79 fixes the issue immediately.
Tested on:
- Windows 10
- Windows Server 2016
Both systems reproduce the same problem with version 26.x.
What is the expected behavior?
- Install Codex extension version 26.311.21342
- Open the Codex panel in VS Code
- The webview fails to load
The issue happens every time.
Downgrading to version 0.4.79 fixes the issue immediately.
Versions tested:
Works:
0.4.79
Does NOT work:
26.304.20706
26.311.21342
This happens on two different systems:
- Windows 10
- Windows Server 2016
The extension worked yesterday but stopped working after updating.
Additional information
_No response_
12 Comments
I confirm the same error present with Fedora 43 after the update
I'm having the same with Cursor + Codex, Windows 11
<img width="603" height="972" alt="Image" src="https://github.com/user-attachments/assets/96289281-6da5-440c-9a83-7d48defac875" />
In my case it was the state.vscdb* files corrupted for some reason. I just deleted them.
In Windows, they're located at:
%APPDATA%\Cursor\User\globalStorageHappened to me on macOS, only after I deleted the vscode dmg file by mistake thinking it wasn't important (is it? I am only a linux user)
Me to:
Error loading webview: Error: Could not register service worker: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..
Sometimes it happens, sometimes it don't, so I just restart VS Code. Sometimes it doesn't start without such an error and I restart VS Code again.
Codex version: 26.707.31123
VS Code version: 1.128.0
OS: Fedora 44 Linux with all latest updates
Having the same kind of issue on Fedora 44, with releases from the last month. Sometimes it passes, but now it doesn't most of the time.
codex: 26.707.41301-linux-x64
VS Code: 1.128.0
OS: Ubuntu 26.04 LTS (Resolute Raccoon)
Same issue in Ubuntu
ubuntu22.04在最新版本上出现了同样的问题
同样的ubuntu22.04出现问题,有什么解决方法吗
same with 26.707.91948. it hangs VS Code. Clearing all the "state.vscdb" did nothing good.
<img width="547" height="1012" alt="Image" src="https://github.com/user-attachments/assets/1d1214d9-7507-45cb-bb66-9cb118a08e01" />
how can they release so many broken versions?
This is what I'm asking myself all the time since I made my Pro subscription.
the logs I get:
the extention only show a loader. if I refresh the window, vscode crashes
<img width="645" height="260" alt="Image" src="https://github.com/user-attachments/assets/968b6790-1b87-4f2c-bc3f-d049d6b7ef13" />
with
code --disable-gpu<img width="728" height="1050" alt="Image" src="https://github.com/user-attachments/assets/18fccd09-e768-43e7-8c41-902e161c7562" />