Skip to content

Conversation

@ForestLinSen
Copy link

🔍 Description

What changed?

Modified the _updateUser method in src/GoTrueClient.ts to execute the _notifyAllSubscribers call asynchronously.

Why was this change needed?

This fixes a deadlock issue where updateUser would hang indefinitely despite a successful server response.

I've got the same issue as issue #1441 . After digging into it, I found that the issue is because updateUser acquires a lock, and after success, it calls and awaits _notifyAllSubscribers. However, the lock is unavailable for the subscribers. So the subscriber waits for the lock, and updateUser waits for the subscriber => Deadlock

Closes #1441

📸 Screenshots/Examples

🔄 Breaking changes

  • This PR contains no breaking changes

📋 Checklist

  • I have read the Contributing Guidelines
  • My PR title follows the conventional commit format: <type>(<scope>): <description>
  • I have run npx nx format to ensure consistent code formatting
  • I have added tests for new functionality (if applicable)
  • I have updated documentation (if applicable)

📝 Additional notes

@ForestLinSen ForestLinSen requested review from a team as code owners January 11, 2026 18:16
@mandarini
Copy link
Contributor

@ForestLinSen thank you for the contribution! I went with this solution instead (#2014) because it matches existing patterns!

Once again, thank you for taking the time to contribute to Supabase! You're helping us make the tool better! 💚

@mandarini mandarini closed this Jan 12, 2026
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.

supabase.auth.setSession and supabase.auth.updateUser do not resolve unless there is an error

2 participants