Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Bug?]: useSession().data value inconsistentΒ #1192

@metruzanca

Description

@metruzanca

Duplicates

  • I have searched the existing issues

Latest version

  • I have tested the latest version

Current behavior 😯

Sometimes session.data.userId is undefined when expected to be defined.

Expected behavior πŸ€”

Expecting session.data to be consistent e.g. logged in user always has data.userId.

Steps to reproduce πŸ•Ή

I've made a repository based off the with-auth example/template that reproduces the bug. I've just added a "create project" function and "list project" function, the latter is what causes the issue.

And I've got a video in the readme with a demonstration.

https://github.com/metruzanca/solidstart-getSession-bug-repro

Context πŸ”¦

Trying to build my next app with solidstart beta 2, but this issue is making it impossible to reliably get any data from the server.
Had good success with beta 1 and wanted to use the latest. I would like to keep this project using beta 2 and not have to fall back to v1.

Your environment 🌎

Tested on a fresh Ubuntu LTS 20 desktop with latest node v20.10 and pnpm v8.13, https://github.com/metruzanca/solidstart-getSession-bug-repro/blob/main/package.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingvinxirelated to vinxi

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions