Skip to content

Fix missing shared Vite chunk in recovered Linux bundle#6

Closed
meetpandya4715 wants to merge 1 commit intoam-will:mainfrom
meetpandya4715:codex/fix-missing-product-name-chunk
Closed

Fix missing shared Vite chunk in recovered Linux bundle#6
meetpandya4715 wants to merge 1 commit intoam-will:mainfrom
meetpandya4715:codex/fix-missing-product-name-chunk

Conversation

@meetpandya4715
Copy link
Copy Markdown

Summary

This fixes a Linux startup crash caused by an incomplete recovered desktop bundle.

The committed recovered bundle under:

desktop/recovered/app-asar-extracted/.vite/build

was missing the shared chunk:

product-name-BA584x_m.js

Both bootstrap.js and main-BnI_RVTn.js require that file, so the packaged Linux app dies during Electron main-process startup with:

Error: Cannot find module './product-name-BA584x_m.js'

Root Cause

The Linux port vendors a recovered upstream desktop payload, but the recovered .vite/build directory in git is incomplete for 26.415.20818.

The matching official upstream desktop payload contains the missing chunk, while this repo’s recovered bundle only included:

  • bootstrap.js
  • main-BnI_RVTn.js
  • preload.js
  • worker.js

That is enough to satisfy current tests, but not enough to satisfy runtime module resolution.

What This PR Changes

  • adds the missing recovered build file:
    • desktop/recovered/app-asar-extracted/.vite/build/product-name-BA584x_m.js
  • adds a regression test that verifies all local require("./*.js") dependencies in the recovered .vite/build directory actually exist
  • updates the local ignore rule so recovered .vite/build/*.js files can be intentionally vendored when the upstream runtime requires them

Why This Fix

This is the smallest change that makes the Linux package boot again without changing runtime behavior.

The file is already part of the matching upstream desktop payload for this version; it was just omitted from the vendored recovered bundle.

Verification

Before:

  • launching the Linux AppImage crashes immediately in the Electron main process
  • stack trace points to bootstrap.js requiring ./product-name-BA584x_m.js

After:

  • the app window opens successfully on Linux
  • startup proceeds past bootstrap and into normal renderer/app-server initialization

Test run:

node ./tests/linux/run-jest.cjs ./tests/linux/recovered-bundle.red.test.ts --runInBand

Result:

  • 14 passed

Notes

This PR intentionally does not change the port’s architecture or packaging strategy.
It restores the missing upstream runtime artifact and adds a guardrail so future recovered bundle refreshes catch the same class of issue earlier.

@am-will
Copy link
Copy Markdown
Owner

am-will commented Apr 23, 2026

i'll try to fix this for you. i already merged new versions so let me take a look thx

@am-will
Copy link
Copy Markdown
Owner

am-will commented Apr 23, 2026

fix should be in. let me know if its not, please reopen PR if you have an issues

@am-will am-will closed this Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants