Skip to content

Conversation

@mkcode
Copy link
Contributor

@mkcode mkcode commented Nov 4, 2025

I found that in certain situations, such as using subdomains with better auth, that authClient.useSession() returns undefined data. This then causes an undefined id on undefined error here. This fixes the issue and makes this work again.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copilot AI review requested due to automatic review settings November 4, 2025 18:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a potential runtime error by adding optional chaining to safely access the session property. The change prevents a crash when session.session is undefined.

Key changes:

  • Added optional chaining operator (?.) to session.session.id access

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@erquhart
Copy link
Collaborator

Still haven't nailed down a scenario for this as it defies the types, but I know folks have run into it, so this is fair. Thanks!

@erquhart erquhart merged commit 46159f2 into get-convex:main Nov 13, 2025
9 checks passed
@aklusa022
Copy link

aklusa022 commented Nov 17, 2025

Would you guys be able to look into this issue by chance? #165
It would help a lot to have an extra set of eyes. I've been trying to find the source of it for the past few days now, maybe could be something similar to this thread and #165

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.

3 participants