openship icon indicating copy to clipboard operation
openship copied to clipboard

[desktop] openresty install fails: ENOENT /$bunfs/root/lua/site_logger.lua (lua files not embedded in desktop app binary)

Open tizerluo opened this issue 4 months ago • 1 comments

Bug

On the macOS desktop app (v0.2.1, arm64), installing OpenResty on a server (server install -c openresty, or from the dashboard) fails at the analytics-script deploy step:

openresty failed: ENOENT: no such file or directory, open '/$bunfs/root/lua/site_logger.lua'

Root cause

Same class of packaging bug as #42 (fixed for the npm package in #47), but for the desktop app distribution: the Bun-compiled openship-api binary inside Openship.app/Contents/Resources/bin/ does not have the lua/ files embedded in its $bunfs virtual filesystem, so readLua('site_logger.lua') fails.

The npm CLI on the same machine (/opt/homebrew/lib/node_modules/openship/dist/server/lua/) does contain all 5 lua files — so the fix from #47 never reached the desktop build.

Repro

  1. Install Openship desktop app v0.2.1 on macOS (arm64)
  2. Add an SSH server (root user)
  3. openship server install -c openresty <id>
  4. Fails with the ENOENT above

Workaround (verified)

Quit the desktop app, then run the npm CLI's own server against the app's data dir and install through it:

openship up --foreground --port 4000 --no-ui --data-dir "$HOME/Library/Application Support/Openship/data"
openship ctx add tmp --api-url http://localhost:4000 --token <same PAT> --use
openship server install -c openresty <id>   # succeeds

The npm-bundled server has the lua files, so the install completes and server check then reports openresty healthy.

tizerluo avatar Jul 21 '26 23:07 tizerluo

fixed

Hydralerne avatar Jul 22 '26 19:07 Hydralerne