Skip to content

Context is undefined in __root__ match #1740

Closed as not planned
Closed as not planned

Description

@maksymskuibida

Describe the bug

Randomly context in __root__ is undefined. Devtools show that context is defined in layout route $lang matcg under __root__, but at the same time is undefined in __root__ match. I cannot even catch exact situation when it happens on my website. Sometimes I open website and it crashes with "cannot descructive property ... from undefined" error. I managed to replace in all my cases useRouteContext({from: "__root__"}) to useRouteContext({from: /$lang"}) and now it is not happen, but it is still an issue, I think

Your Example Website or App

Steps to Reproduce the Bug or Issue

I don't have exact steps to reproduce.

Expected behavior

I excpected if I set context in it will be available always

Screenshots or Videos

No response

Platform

  • Version 1.34.9 — 1.36.3 probably earlier that 1.34.9, I have updated from 1.33.4 to 1.34.9 and the issue was introduced and still persist

Additional context

No response

Activity

  1. aleluman commented on Jun 13, 2024

    @aleluman

    I'm also still experiencing issues with undefined context in the latest release and since the last several versions. The latest PR addressing the issue did nothing for me. Can also confirm that downgrading to 1.33.4 fixes all the undefined context issues. Seems it was introduced in 1.33.6.

  2. aleluman commented on Jun 13, 2024

    @aleluman

    I did some more testing and not all issues with context are fixed in 1.33.4, context is always available, but some variables inside context are undefined. I had to revert all the way back to 1.31.0 to fix these issues, seems like everything started to break in 1.31.1.

  3. schiller-manuel commented on Jun 13, 2024

    @schiller-manuel
    Collaborator

    can you please provide a minimal complete example by forking one of the existing examples on stackblitz?

  4. added
    information needed
    on Jun 13, 2024
  5. SeanCassiere commented on Jul 4, 2024

    @SeanCassiere
    Member

    Closing this, since there's no reproduction. Plus, #1892 seems to be a similar issue with a reproduction available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    information needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions