VSCode extension 52.10.1: Preview pane broken "TypeError: fetch failed"
Describe the bug
Regression in latest extension 52.10.1 (I'm running VSCodium, getting it via https://open-vsx.org/extension/antfu/slidev), preview pane never renders, says (TypeError: fetch failed):
With v52.1.0 server, whether started externally or from VSCodium. Note that same server loads in browser fine (whether started externally or from VSCodium)!
Going back to 51.4.0 extension works (with v52.1.0 server, whether started externally or from VSCodium).
Minimal reproduction
Steps to reproduce the behavior:
git clone https://gitlab.com/cben/ipywm-notes(probably any repo)cd ipywm-notes/reloading/yarn installcodium .(probablycode .too? didn't test)- Open Slidev pane
- Click ▹ Start slidev dev server => launches fine, opens in browser fine
- However, Preview pane doesn't render, clicking ↻ Refresh preview page doesn't help.
Environment
- extension version: 52.10.1
- Slidev version: 52.10.1
- Browser: works in Chromium 142.0.7444.162, Firefox 145.0 too.
- OS: Nobara 43 (a Fedora linux derivative), running
codium-1.106.37943-el8.x86_64rpm package from https://vscodium.com/
At first I suspected some kind of network sandboxing, but I'm not running VSCod[ium] under flatpak or similar container tech, I installed it as regular .rpm package.
And communication does work both ways:
- [x] server launched from VSCodium -> loads fine in Chrome/Firefox
- [x] previous extension version 51.4.0 loads fine <- server launched in external terminal
- [x] Ctrl+Shift+P "Simple browser" for http://localhost:3030 also loads fine <- server launched in external terminal
I guess the TypeError does point towards a code bug in latest extension?
I encountered the same error. Temporarily switched to the previous version 51.4.0, which works fine.
I have a similar issue.
Can confirm that this issue is only in the latest version. If you, like me, just need to get some work done, you can install the older version 51.4.0 in the VSCode Extension page.
I recently rewrote the extension in #2390. You can try it by installing the VSIX file inside this zip.
Latest extension v52.11.0, works again 🎉 Thanks! 🙏
- [x] Shows preview, both with server launched externally and launched by extension.
- [x] Preview<->cursor sync works, both ways.
For me, v52.11.0 and v52.10.1 do not work, whereas a past version v51.4.0 works well. Their previews do not show, although I can access it with a web browser.