Skip to content

fix(ee): surface bridge load failures instead of silent fallback#39

Merged
ABB65 merged 1 commit intomainfrom
fix/ee-bridge-load-diagnostics
Apr 28, 2026
Merged

fix(ee): surface bridge load failures instead of silent fallback#39
ABB65 merged 1 commit intomainfrom
fix/ee-bridge-load-diagnostics

Conversation

@ABB65
Copy link
Copy Markdown
Member

@ABB65 ABB65 commented Apr 28, 2026

Why

PR #37 deployed cleanly to staging, but the Railway logs show:

[deployment] NUXT_DEPLOYMENT_PROFILE="managed" requires the
Enterprise Edition (ee/) but the enterprise bridge did not load;
falling back to 'community'.

The local production build clearly bundles ee/ (the
.output/server/chunks/_/index.mjs chunk exports
createEnterpriseBridge), so the failure is at runtime — most
likely a native dependency (sharp / blurhash) failing to load
for linux/amd64, or an import-side effect throwing during chunk
instantiation on Railway.

loadEnterpriseBridge was swallowing every error with
.catch(() => null), so the actual cause never reached the deploy
logs. Without it, we can't tell whether ee/ is missing, the
bundle path is wrong, or a top-level import is throwing.

What

  • Replace the silent catch with explicit console.error, including
    the error name + message + stack.
  • Add a single console.info line on the success path so an
    operator confirms the bridge loaded by reading the boot logs.
  • Add a console.warn for the missing-export branch (factory
    function not present in the loaded module).

This is purely diagnostic — no functional change, no test impact.
Once we have the real cause from the next Railway deploy, the
follow-up PR will either pin a platform binary in the Dockerfile
or add a runtime guard around the failing native import.

Test plan

  • pnpm typecheck — clean
  • pnpm lint — 0 errors
  • Railway redeploy: deploy log should now show either
    [ee] Enterprise bridge loaded successfully. (problem went
    away) or [ee] Failed to import ee/enterprise: <real error>
    / [ee] createEnterpriseBridge() threw at construction time: <real error> (real cause exposed).

Production deploy on Railway logs:

  [deployment] NUXT_DEPLOYMENT_PROFILE="managed" requires the
  Enterprise Edition (ee/) but the enterprise bridge did not load;
  falling back to 'community'.

The local production build clearly bundles ee/ (chunks/_/index.mjs
exports createEnterpriseBridge), so the failure is at runtime — most
likely a native dependency (sharp / blurhash) failing to load for
linux/amd64, or an import-side effect throwing during chunk
instantiation.

`loadEnterpriseBridge` was swallowing every error with
`.catch(() => null)`, so the actual cause never reached the deploy
logs. Replace the silent catch with explicit `console.error` (and a
`console.info` on success + a `console.warn` for the missing-export
branch). This is diagnostic output by design — if the bridge load is
healthy, it's a single info line at boot; on failure, the operator
sees the real error name, message, and stack.

Once we have the real cause from the next Railway deploy, we'll
either pin the platform binary in the Dockerfile or add a runtime
guard around the failing native import. This commit is purely
diagnostic — no functional change, no test impact.
@ABB65 ABB65 merged commit 6256209 into main Apr 28, 2026
1 check passed
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.

1 participant