Supabase Unexpected error during login/signup
@Tr00d is already working on this.
Since Aug 4, 2026.
Assessment
This issue has not been assessed yet.
Description
6/5/2025 1:41:48 AM ==> ❌ Supabase Unexpected error during login/signup: Newtonsoft.Json.JsonSerializationException: Unable to find a constructor to use for type Supabase.Gotrue.Session. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'access_token', line 1, position 16.
this error is for this code on the android device:
public async Task SignInOrSignUpWithDeviceId()
{
string deviceId = OmUtility.GetDeviceId();
string fakeEmail = $"{deviceId}@emperor.local";
string password = deviceId;
try
{
var session = await SupabaseManager.Instance.SupabaseClient.Auth.SignInWithPassword(fakeEmail, password);
OmUtility.Log("Supabase User ID: " + session.User.Id);
OmUtility.Log("✅ Supabase Device login successful");
var sd = await LoadUserGameData();
var loadedData = JsonUtility.FromJson<MainSaveManager.SaData>(sd.JsonData1);
OmUtility.Log("Load Data Supabase , saveData1 : " + loadedData.saveData1);
}
catch (GotrueException ex)
{
if (ex.Message.Contains("Invalid login credentials") || ex.Message.Contains("user_not_found"))
{
OmUtility.Log("🆕 Supabase User not found. Trying signup...");
try
{
// var session = await SupabaseManager.Instance.SupabaseClient.Auth.SignUp(fakeEmail, password);
var session = await SupabaseManager.Instance.SupabaseClient.Auth.SignUp(fakeEmail, password);
OmUtility.Log("User ID: " + session.User.Id);
var sd = await LoadUserGameData();
var loadedData = JsonUtility.FromJson<MainSaveManager.SaData>(sd.JsonData1);
OmUtility.Log("Load Data Supabase , saveData1 : " + loadedData.saveData1);
}
catch (Exception signUpEx)
{
OmUtility.Log("❌ Supabase Signup failed: " + signUpEx);
}
}
else
{
OmUtility.Log("❌ Supabase Login failed with unknown error: " + ex.Message);
}
}
catch (Exception ex)
{
OmUtility.Log("❌ Supabase Unexpected error during login/signup: " + ex);
}
}
- Dominant language
- C#
- Stars
- 701
- Forks
- 106
- Avg merge
- 16h 35m
- Merged PRs (30d)
- 45
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/supabase-csharp
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
supabase/supabase-csharp#440 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
supabase/supabase-csharp#437 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
supabase/supabase-csharp#427 ·
-
supabase/supabase-csharp#409 · 1 comment · 1 assignee ·
-
area: realtime bug parity
supabase/supabase-csharp#393 · 1 assignee ·
All issues in supabase/supabase-csharp
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100