Skip to content

**[BUG]: Critical Native Deadlock on Auth.CreateUserWithEmailAndPasswordAsync when user already exists (RAM Spike / Freeze)** #1339

@mehmetbelen

Description

@mehmetbelen

Description

The application (Unity Editor) completely freezes and enters a deadlock state when calling Auth.CreateUserWithEmailAndPasswordAsync() with an email address that is already registered. RAM usage rapidly spikes up to [max ram usage approx. 2.5 GB]. This suggests a thread synchronization/mutex deadlock within the Firebase Native SDK layer when attempting to return an error to the C# environment.

Reproducing the issue

  1. Ensure a user with administrator privileges is currently signed in.
  2. Call the Auth.CreateUserWithEmailAndPasswordAsync() method.
  3. Use an email address in the parameters that is already present in your Firebase Authentication console.

Firebase Unity SDK Version

12.10.1

Unity editor version

6000.1.7f1

Installation Method

.unitypackage

Problematic Firebase Component(s)

Authentication

Other Firebase Component(s) in use

Authentication, Firestore

Additional SDKs you are using

This bug persists even after trying aggressive asynchronous isolation techniques such as Task.Run() and task.GetAwaiter().GetResult() to bypass the SynchronizationContext deadlock. The high RAM usage during the freeze strongly suggests the issue lies in a native thread lock within the SDK's internal C++ wrapper, preventing resource cleanup and halting the main thread.

Targeted Platform(s)

Android

Unity editor platform

Windows

Scripting Runtime

IL2CPP

Release Distribution Type

Pre-built SDK from https://firebase.google.com/download/unity

Relevant Log Output

This bug persists even after trying aggressive asynchronous isolation techniques such as **Task.Run()** and **task.GetAwaiter().GetResult()** to bypass the `SynchronizationContext` deadlock. The high RAM usage during the freeze strongly suggests the issue lies in a **native thread lock** within the SDK's internal C++ wrapper, preventing resource cleanup and halting the main thread.

If using CocoaPods for Apple platforms, the project's Podfile.lock

Expand Podfile.lock snippet
👀 Replace this line with the contents of your Podfile.lock!

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: authneeds-infoNeed information for the developerstaleDon't have recent activity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions