Skip to content

fix(apps): surface autoconfigApps configure failures instead of swallowing#338

Open
hugo-ccabral wants to merge 1 commit into
mainfrom
fix/autoconfig-surface-errors
Open

fix(apps): surface autoconfigApps configure failures instead of swallowing#338
hugo-ccabral wants to merge 1 commit into
mainfrom
fix/autoconfig-surface-errors

Conversation

@hugo-ccabral

@hugo-ccabral hugo-ccabral commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Problem

configureAllApps (autoconfigApps) wrapped each app's configure in an empty catch {}. When an app is present in the decofile but fails to configure, it's skipped silently — its loaders/actions never register, and its sections resolve to null at runtime with no log.

The insidious case (hit on storefront-tanstack): a registry entry's module: () => import("./mod") dynamic import resolves under vite dev but not in the production vite/workerd bundle. Result: Shopify skipped in prod only → PDP renders "Page not found" in prod, works in dev, no error anywhere. It took a full prod-build + headless-browser investigation to find; this console.error would have surfaced it immediately.

Change

Log the caught error (app blockKey + the error), still skip the app so one broken app can't take down setup. No behavior change beyond the log.

Follow-up (not in this PR)

The underlying cause — apps-* registry entries using a dynamic import("./mod") that doesn't survive production bundling — is worth fixing at the source (static/eager module reference in each app's registry.ts). Sites can work around it today with { ...APP_REGISTRY_ENTRY, module: async () => staticMod }.

🤖 Generated with Claude Code


Summary by cubic

Log configuration failures in autoconfigApps instead of swallowing them, so misconfigured apps don’t fail silently and cause null sections in production. Failing apps are still skipped to keep setup stable.

  • Bug Fixes
    • Log errors with the app’s blockKey when configure/module load fails; continue skipping the app.
    • Surfaces cases where module: () => import("./mod") works in vite dev but fails in production bundles.

Written for commit 7c8e322. Summary will update on new commits.

Review in cubic

…owing

configureAllApps caught every per-app error with an empty `catch {}`. When an
app matched a decofile block but failed to configure — most insidiously a
registry entry's `module: () => import("./mod")` dynamic import that resolves
under `vite dev` but NOT in a production bundle — the app was skipped silently,
its loaders/actions never registered, and its (often deferred) sections
resolved to null at runtime with zero diagnostic. Log the error (keep skipping
so one bad app can't break setup). This would have made a multi-hour
storefront-tanstack "PDP shows nothing in prod" investigation a one-line log.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hugo-ccabral hugo-ccabral requested a review from a team July 10, 2026 19:24
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