Skip to content

[ClerkJS] v5.52.1 breaks components using the LazyComponentRenderer #5087

Description

@pingzing

Preliminary Checks

Reproduction

https://github.com/pingzing/clerkJsRedirectRepro

Publishable key

pk_test_ZnJlc2gtc2hlZXBkb2ctMTkuY2xlcmsuYWNjb3VudHMuZGV2JA

Description

Steps to reproduce:

Assuming you're using the minimal-reproduction repository I linked:

  1. Run a local HTTP server inside the repository (in my case, I used dotnet serve --port 8080, but any local server should do)
  2. Navigate to http://localhost:8080/1-signIn.html, where it will prompt you to sign in.
  3. After sign-in, navigate back to http://localhost:8080/1-signIn.html where, now that you are logged-in, it will attempt to display a <UserButton/> component
  4. Observe the failure in the console: can't access property "routing", e.componentProps is undefined.

Expected behavior:

Components to load and render correctly.

Actual behavior:

Components don't render, and an error is printed to the log.

Extra notes

Falling back to v5.52.0 works, and it looks like the culprit is this line:

if (props.componentProps.routing === 'virtual') {

I suspect there's no need to use my reproduction above either--all you need is to be using ClerkJS v5.52.1, and have a logged-in Clerk user on a page that tries to mount a <UserButton/>.

Environment

No environment--just raw HTML and ClerkJS in script tags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions