opencode icon indicating copy to clipboard operation
opencode copied to clipboard

opencode web mode broken: empty page - multiple versions and multiple os

Open sciabarracom opened this issue 1 month ago • 3 comments

Description

I installed opencode using web ui with opencode web, I get a blank page with this error in console:

:49956/assets/index-BRXIaEVp.js:1 Failed to load module script: Expected a JavaScript-or-Wasm module script but the server responded with a MIME type of "text/html". Strict MIME type checking is enforced for module scripts per HTML spec.

executing curl http://localhost::49956/assets/index-BRXIaEVp.js returns the index.html not the javascript

OpenCode version

1.0.134 1.0.133 1.0.132 1.0.131

Steps to reproduce

I installed opencode on both linux and mac various versions - same problem everywhere - the crazy thing this yesterday worked file.

I am puzzled.

Screenshot and/or share link

Image Image

Operating System

mac os 15.16.1, ubuntu 24.04

Terminal

iterm, gnome-terminal

sciabarracom avatar Dec 08 '25 13:12 sciabarracom

I'm facing the exact same problem

thetaungg avatar Dec 08 '25 14:12 thetaungg

I found the reason. It's because https://desktop.dev.opencode.ai is down. Every opencode version is pointing to that server to get the static assets for the website and the server and index-BRXIaEVp.js file doesn't exist there anymore.

I'm not sure why opencode is doing that instead of locally building desktop with each version.

If you update the proxy to desktop.opencode.ai in this file and rebuild the binary, it should work

packages/opencode/src/server/server.ts

 .all("/*", async (c) => {
        return proxy(`https://desktop.opencode.ai${c.req.path}`, {
          ...c.req,
          headers: {
            host: "desktop.opencode.ai",
          },
        })

I haven't tried to build the desktop locally and including it in the binary. But we should be able to do that as well

thetaungg avatar Dec 08 '25 15:12 thetaungg

this should be fixed now, lmk if you see it again

adamdotdevin avatar Dec 08 '25 17:12 adamdotdevin

Closing, the issue here was that the server was sometimes cached and not using latest version.

adamdotdevin avatar Dec 16 '25 12:12 adamdotdevin