Supabase Kotlin: NoClassDefFoundError: InstantSerializer in Spring Boot
Framework: Spring Boot
Kotlin Version: 2.2.0
Supabase Version: 3.2.6
Dependencies:
I'm getting a
Root Cause
The Supabase Auth library uses InstantSerializer in the UserSession class:
Source: - https://github.com/supabase-community/supabase-kt/blob/master/Auth/src/commonMain/kotlin/io/github/jan/supabase/auth/user/UserSession.kt
However, InstantSerializer is not being found on the classpath at runtime, even though I have kotlinx-serialization-json:1.9.0 included.
What I've Tried:
Adding kotlinx-serialization-json dependency
Checking Kotlin version compatibility
Reviewing Supabase-KT dependency versions
Questions:
What is the correct version of kotlinx-serialization-json needed for Supabase-KT 3.2.6?
Is there a version compatibility issue between Kotlin 2.2.0 and Supabase-KT 3.2.6?
Do I need to add additional datetime serialization dependencies?
Is there a workaround to properly load InstantSerializer onto the classpath?
Kotlin Version: 2.2.0
Supabase Version: 3.2.6
Dependencies:
The Problem
I'm getting a
NoClassDefFoundError when calling my signup endpoint using supabase.auth.signUpWith():Error Stack Trace
Root Cause
The Supabase Auth library uses InstantSerializer in the UserSession class:
Source: - https://github.com/supabase-community/supabase-kt/blob/master/Auth/src/commonMain/kotlin/io/github/jan/supabase/auth/user/UserSession.kt
However, InstantSerializer is not being found on the classpath at runtime, even though I have kotlinx-serialization-json:1.9.0 included.
What I've Tried:
Adding kotlinx-serialization-json dependency
Checking Kotlin version compatibility
Reviewing Supabase-KT dependency versions
Questions:
What is the correct version of kotlinx-serialization-json needed for Supabase-KT 3.2.6?
Is there a version compatibility issue between Kotlin 2.2.0 and Supabase-KT 3.2.6?
Do I need to add additional datetime serialization dependencies?
Is there a workaround to properly load InstantSerializer onto the classpath?
GitHub
A Kotlin Multiplatform Client for Supabase. . Contribute to supabase-community/supabase-kt development by creating an account on GitHub.