MultiboxLabs/flow-browser

bun install + start are not working on linux

Opened this issue · 4 comments

$ bun install
bun install v1.2.18 (0d4089ea)

$ electron-builder install-app-deps

/home/user/code/js/flow-browser/node_modules/app-builder-lib/node_modules/minimatch/dist/commonjs/index.js:7
const brace_expansion_1 = __importDefault(require("brace-expansion"));
                                          ^
Error [ERR_REQUIRE_ESM]: require() of ES Module /home/user/code/js/flow-browser/node_modules/app-builder-lib/node_modules/minimatch/node_modules/brace-expansion/index.js from /home/user/code/js/flow-browser/node_modules/app-builder-lib/node_modules/minimatch/dist/commonjs/index.js not supported.
Instead change the require of /home/user/code/js/flow-browser/node_modules/app-builder-lib/node_modules/minimatch/node_modules/brace-expansion/index.js in /home/user/code/js/flow-browser/node_modules/app-builder-lib/node_modules/minimatch/dist/commonjs/index.js to a dynamic import() which is available in all CommonJS modules.
    at Object.<anonymous> (/home/user/code/js/flow-browser/node_modules/app-builder-lib/node_modules/minimatch/dist/commonjs/index.js:7:43)
error: postinstall script from "flow-browser" exited with 1
$ bun start
$ electron-vite preview
vite v6.3.5 building SSR bundle for production...
✓ 126 modules transformed.
out/main/index.js  556.09 kB
✓ built in 549ms
vite v6.3.5 building SSR bundle for production...
✓ 2 modules transformed.
out/preload/index.js  28.37 kB
✓ built in 26ms
vite v6.3.5 building for production...
✓ 7411 modules transformed.
../../out/renderer/index.html                              0.44 kB
../../out/renderer/assets/pdf.worker.min-BFAMBS4k.mjs  1,031.81 kB
../../out/renderer/assets/index-BL6ZFSGe.css             364.76 kB
../../out/renderer/assets/index-DwysOnja.js            9,857.55 kB
✓ built in 7.82s

start electron app...

[3073477:0718/092936.731607:FATAL:content/browser/zygote_host/zygote_host_impl_linux.cc:225] Check failed: . : Invalid argument (22)

Ok, the first one was fixed by upgrading node from 20 to 22. The second issue (with bun start) still persists, though.

try npm run start

Same issue with npm run start.
However:

$ bun run electron-vite preview -- --no-sandbox
[..]
[3187494:0718/131050.761682:FATAL:content/browser/gpu/gpu_data_manager_impl_private.cc:415] GPU process isn't usable. Goodbye.

And with

$ bun run electron-vite preview -- --no-sandbox  --in-process-gpu
[..]
Failed to start worker for extension ddkjiahejlhfcafbddmgiahcphecmpfh
(node:3187812) ExtensionLoadWarning: Warnings loading extension at /home/user/.config/Flow/Profiles/main/Extensions/crx/cjpalhdlnbpafiamejdnhcphjbkeiagm/1.65.0_0:
  Manifest version 2 is deprecated, and support will be removed in 2025. See https://developer.chrome.com/docs/extensions/develop/migrate/mv2-deprecation-timeline for details.
  Permission 'contextMenus' is unknown or URL pattern is malformed.
  Permission 'privacy' is unknown or URL pattern is malformed.
  Permission 'webNavigation' is unknown or URL pattern is malformed.

(Use `electron --trace-warnings ...` to show where the warning was created)
Error sending from webFrameMain:  Error: Render frame was disposed before WebFrameMain could be accessed
    at s.send (node:electron/js2c/browser_init:2:95453)
    at b.send (node:electron/js2c/browser_init:2:79891)
    at processWindowTabsChangedQueue (/home/user/code/js/flow-browser/out/main/index.js:8366:20)
    at Timeout._onTimeout (/home/user/code/js/flow-browser/out/main/index.js:8377:5)
    at listOnTimeout (node:internal/timers:588:17)
    at process.processTimers (node:internal/timers:523:7)
Error sending from webFrameMain:  Error: Render frame was disposed before WebFrameMain could be accessed
    at s.send (node:electron/js2c/browser_init:2:95453)
    at b.send (node:electron/js2c/browser_init:2:79891)
    at processWindowTabsChangedQueue (/home/user/code/js/flow-browser/out/main/index.js:8366:20)
    at Timeout._onTimeout (/home/user/code/js/flow-browser/out/main/index.js:8377:5)
    at listOnTimeout (node:internal/timers:588:17)
    at process.processTimers (node:internal/timers:523:7)
(electron) 'session.getPreloads' is deprecated and will be removed. Please use 'session.getPreloadScripts' instead.
(electron) 'session.setPreloads' is deprecated and will be removed. Please use 'session.registerPreloadScript' instead.
[INITIALIZATION] Fallback window show

The window actually starts, but stays completely black. :|
However, the appimage is working fine (without any additional arguments). I wonder why there is a difference.

Edit:
After rm -rf /home/user/.config/Flow/:

$ bun run electron-vite preview -- --no-sandbox  --in-process-gpu
[...]
[3191547:0718/131944.543915:ERROR:content/browser/browser_main_loop.cc:278] GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[3191547:0718/131944.543919:ERROR:content/browser/browser_main_loop.cc:278] GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[3191547:0718/131944.543924:ERROR:content/browser/browser_main_loop.cc:278] GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[3191547:0718/131944.543929:ERROR:content/browser/browser_main_loop.cc:278] GLib-GObject: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
[3191547:0718/131944.543933:ERROR:content/browser/browser_main_loop.cc:278] GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[3191547:0718/131944.543937:ERROR:content/browser/browser_main_loop.cc:278] GLib-GObject: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
[3191547:0718/131944.543942:ERROR:content/browser/browser_main_loop.cc:278] GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
[3191547:0718/131944.592447:ERROR:content/browser/browser_main_loop.cc:278] GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Image

Update:

When I build it via bun build:linux, the appimage fails too:

$ ./dist/flow-browser-0.8.3-x86_64.AppImage 
[3194335:0718/132532.652625:FATAL:content/browser/zygote_host/zygote_host_impl_linux.cc:225] Check failed: . : Invalid argument (22)

thanks for all the help in debugging linux! i really appreciate it as i don't have a linux machine to test on.