fix(ui): surface silent failures in component renderer#8379
fix(ui): surface silent failures in component renderer#8379jacekradko wants to merge 2 commits intomainfrom
Conversation
Add a catch on the lazy import chain in `ensureMounted` so initialization rejections log a `[Clerk UI]` error instead of being swallowed, and emit a diagnostic warning after 10s if the renderer has not mounted. Makes stalled chunk loads, unresolved lazy-compilation proxies, and similar dev-time failures surface with an actionable message instead of hanging without feedback.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 571daf7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis pull request adds diagnostic improvements to component rendering initialization in the Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
Summary
Adds diagnostic coverage to the UI component renderer so silent initialization failures produce actionable errors instead of hanging indefinitely.
ensureMountedand logs a[Clerk UI]console error with the underlying cause. Currently these rejections disappear because every mount call inclerk-js/src/core/clerk.tsusesvoid this.#clerkUI.then(...)without a.catch.[Clerk UI]warning naming the common causes (failed chunk load, dev-server misconfiguration, pre-hydration mount). Cleared on both success and failure paths.Covers the full fan-out with a single change in
ensureMounted— the ~60void this.#clerkUI.then(...)call sites inclerk-jsall funnel through this one promise, so there is no per-mount-method surface to touch.Context
Surfaced while debugging a regression where
pnpm dev:sandboxloaded but components never rendered —Clerk.loaded === true,#appempty, zero console output. The root cause was an unrelated@rspack/clibump enabling lazy-compilation, whose proxy chunk never resolved. With these diagnostics in place, the next person to hit a similar class of failure gets a direct signpost.Test plan