java.lang.AbstractMethodError: Receiver class com.mongodb.internal.operation.FindOperation in kotlin mongo driver

Hello, I am using
org.mongodb:mongodb-driver-kotlin-coroutine:4.11.1
org.mongodb:bson-kotlinx:4.11.1
+
jetpack compose desktop

The problem is that after launching the release version, when accessing the Mongo entity

data class Prompt(
    @BsonId val id: ObjectId? = null,
    @BsonProperty("brand_url")
    val brandUrl: String? = null,
    @BsonProperty("title")
    val title: String?  = null,
    @BsonProperty("optional_name")
    val optionalName: String? = null,
    @BsonProperty("category")
    val category: String? = null)
override suspend fun getPrompts() : FindFlow<Prompt>? {
        return collection.find<Prompt>()
    }

I get an error when trying to get Mongo entities from the database
The suspicion is that it is necessary to introduce proguard rules for the library, but I don’t know which ones exactly
Maybe someone already has a ready-made file
ERROR

> [Thread-16] ERROR org.mongodb.driver.connection - Callback onResult call produced an error
> java.lang.AbstractMethodError: Receiver class com.mongodb.internal.operation.FindOperation$$Lambda$262/0x00000008004382b0 does not define or inherit an implementation of the resolved method 'abstract org.bson.BsonDocument create$15045586(com.mongodb.connection.ServerDescription, androidx.compose.material.icons.filled.AddKt)' of interface com.mongodb.internal.operation.CommandOperationHelper$CommandCreator.
> 	at com.mongodb.internal.operation.AsyncOperationHelper.createReadCommandAndExecuteAsync(AsyncOperationHelper.java:276)
> 	at com.mongodb.internal.operation.FindOperation.lambda$executeAsync$4(FindOperation.java:350)
> 	at com.mongodb.internal.operation.AsyncOperationHelper.lambda$withAsyncSourceAndConnection$0(AsyncOperationHelper.java:117)
> 	at com.mongodb.internal.operation.AsyncOperationHelper.lambda$withAsyncSuppliedResource$2(AsyncOperationHelper.java:133)
> 	at com.mongodb.internal.async.function.AsyncCallbackSupplier.lambda$whenComplete$2(AsyncCallbackSupplier.java:101)
> 	at com.mongodb.internal.operation.AsyncOperationHelper.lambda$withAsyncSuppliedResource$3(AsyncOperationHelper.java:134)
> 	at com.mongodb.internal.connection.DefaultServer.lambda$getConnectionAsync$0(DefaultServer.java:130)
> 	at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:47)
> 	at com.mongodb.internal.connection.DefaultConnectionPool.lambda$getAsync$0(DefaultConnectionPool.java:222)
> 	at com.mongodb.internal.connection.DefaultConnectionPool$OpenConcurrencyLimiter.lambda$openAsyncWithConcurrencyLimit$0(DefaultConnectionPool.java:1038)
> 	at com.mongodb.internal.connection.DefaultConnectionPool$PooledConnection.lambda$openAsync$0(DefaultConnectionPool.java:665)
> 	at com.mongodb.internal.connection.UsageTrackingInternalConnection.lambda$openAsync$0(UsageTrackingInternalConnection.java:74)
> 	at com.mongodb.internal.connection.InternalStreamConnection$1.lambda$completed$0$425a0e4d(InternalStreamConnection.java:252)
> 	at com.mongodb.internal.connection.InternalStreamConnectionInitializer.completeConnectionDescriptionInitializationAsync$16cba3ce(InternalStreamConnectionInitializer.java:223)
> 	at com.mongodb.internal.connection.InternalStreamConnectionInitializer.finishHandshakeAsync$16cba3ce(InternalStreamConnectionInitializer.java:111)
> 	at com.mongodb.internal.connection.InternalStreamConnection$1.lambda$completed$1$425a0e4d(InternalStreamConnection.java:244)
> 	at com.mongodb.internal.connection.InternalStreamConnectionInitializer.lambda$startHandshakeAsync$0(InternalStreamConnectionInitializer.java:100)
> 	at com.mongodb.internal.connection.CommandHelper.lambda$executeCommandAsync$0(CommandHelper.java:77)
> 	at com.mongodb.internal.connection.InternalStreamConnection.lambda$sendCommandMessageAsync$0(InternalStreamConnection.java:555)
> 	at com.mongodb.internal.connection.InternalStreamConnection$MessageHeaderCallback$MessageCallback.onResult(InternalStreamConnection.java:1849)
> 	at com.mongodb.internal.connection.InternalStreamConnection$3.completed(InternalStreamConnection.java:1671)
> 	at com.mongodb.internal.connection.AsynchronousChannelStream$BasicCompletionHandler.completed(AsynchronousChannelStream.java:2252)
> 	at java.base/sun.nio.ch.Invoker.invokeUnchecked(Unknown Source)
> 	at java.base/sun.nio.ch.Invoker.invokeUnchecked(Unknown Source)
> 	at java.base/sun.nio.ch.WindowsAsynchronousSocketChannelImpl$ReadTask.completed(Unknown Source)
> 	at java.base/sun.nio.ch.Iocp$EventHandlerTask.run(Unknown Source)
> 	at java.base/sun.nio.ch.AsynchronousChannelGroupImpl$1.run(Unknown Source)
> 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> 	at java.base/java.lang.Thread.run(Unknown Source)

decided with these rules in proguard

-keep class com.mongodb.** { *; }
-keep class data.model.Prompt { *; }
-keepclassmembers class data.model.Prompt {
    <init>(...);
}
-keepclassmembers class data.model.Prompt {
    private *;
}

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.