supabase-kt icon indicating copy to clipboard operation
supabase-kt copied to clipboard

[Bug]: Serializer for class 'RealtimeMessage' is not found.

Open Shabinder opened this issue 1 year ago • 8 comments

General Info

  • [X] I checked for similar bug report
  • [X] I am using the latest version
  • [X] I checked the troubleshooting page for similar problems

Version(s)

3.0.1

Kotlin Target(s) and their respective versions

JVM 21

What happened? (include your code)

With Proguard: Serializer for class 'RealtimeMessage' is not found. Please ensure that class is marked as '@Serializable' and that the serialization compiler plugin is applied.

Without Proguard it works.

I have even tried an extreme rule: -keep @kotlinx.serialization.Serializable class * {*;} But didn't help.

Steps To Reproduce (optional)

No response

Relevant log output (optional)

No response

Shabinder avatar Oct 29 '24 16:10 Shabinder

-keep class io.github.jan.** { *;}

Also, This worked for now, but would like to remove this, since it obfuscation than loses its point.

Shabinder avatar Oct 29 '24 18:10 Shabinder

I don't have this issue. Can you share your library versions and build files?

jan-tennert avatar Oct 29 '24 18:10 jan-tennert

I don't have this issue. Can you share your library versions and build files?

https://github.com/Shabinder/soundbound-extensions-lib/blob/zipline-test/gradle/deps.versions.toml

Shabinder avatar Oct 29 '24 18:10 Shabinder

Is this the project affected? The Supabase modules are declared but not used in any build file

jan-tennert avatar Oct 30 '24 10:10 jan-tennert

This catalog is used in the project, so can refer versions, project itself isn't open source.

Shabinder avatar Oct 30 '24 12:10 Shabinder

Well, can you make a reproducer? Normally if there is an issue with serializers for libraries not found, the serialization plugin was applied incorrectly. E.g. the serialization plugin has to also be applied in the project-wide build.gradle.kts

jan-tennert avatar Oct 30 '24 15:10 jan-tennert

E.g. the serialization plugin has to also be applied in the project-wide build.gradle.kts

Yes, that's confirmed here, since adding -keep class io.github.jan.** { *;} fixes the issue. Also, I noticed this is happening only in compose desktop target, android target runs fine.

Shabinder avatar Oct 30 '24 16:10 Shabinder

This might be related I don't think there is anything I can do since it a Ktor / KotlinX Serialization issue.

jan-tennert avatar Oct 31 '24 17:10 jan-tennert