just-ai / aimybox-android-assistant

Embeddable custom voice assistant for Android applications
https://aimybox.com
Apache License 2.0
226 stars 52 forks source link

Поддержать io.grpc grpc-protobuf-lite 1.35.0 #62

Closed svetlana-e-petrova closed 3 years ago

svetlana-e-petrova commented 3 years ago

В своем проекте обновили firebase, зависимость com.google.firebase:firebase-perf-ktx тянет com.google.protobuf:protobuf-javalite:3.14.0. Эта версия конфликтует с com.google.protobuf:protobuf-lite:3.0.1, которую подтягивает библиотека com.justai.aimybox:yandex-speechkit. Duplicate class com.google.protobuf.AbstractMessageLite found in modules jetified-protobuf-javalite-3.14.0 (com.google.protobuf:protobuf-javalite:3.14.0) and jetified-protobuf-lite-3.0.1 (com.google.protobuf:protobuf-lite:3.0.1)

От использования новой версии firebase отказаться не можем. Чтобы разрешить конфликт зависимостей необходимо поддержать в com.justai.aimybox:yandex-speechkit обновление io.grpc » grpc-protobuf-lite до версии 1.35.0

При подключении этой версии происходит краш:


2021-02-20 10:25:05.750 10628-10839/ru.alfabank.mobile.android.feature W/System.err: java.lang.ExceptionInInitializerError
2021-02-20 10:25:05.750 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at yandex.cloud.ai.stt.v2.SttServiceOuterClass$StreamingRecognitionRequest.getDefaultInstance(SttServiceOuterClass.java:467)
2021-02-20 10:25:05.751 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at yandex.cloud.ai.stt.v2.SttServiceGrpc.getStreamingRecognizeMethod(SttServiceGrpc.java:50)
2021-02-20 10:25:05.751 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at yandex.cloud.ai.stt.v2.SttServiceGrpc$SttServiceStub.streamingRecognize(SttServiceGrpc.java:130)
2021-02-20 10:25:05.751 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at com.justai.aimybox.speechkit.yandex.cloud.YandexRecognitionApi.openStream$yandex_speechkit_release(YandexRecognitionApi.kt:53)
2021-02-20 10:25:05.752 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at com.justai.aimybox.speechkit.yandex.cloud.YandexRecognitionApi$openStream$1.invokeSuspend(Unknown Source:12)
2021-02-20 10:25:05.752 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2021-02-20 10:25:05.752 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
2021-02-20 10:25:05.752 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
2021-02-20 10:25:05.753 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738)
2021-02-20 10:25:05.753 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
2021-02-20 10:25:05.754 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
2021-02-20 10:25:05.755 10628-10839/ru.alfabank.mobile.android.feature W/System.err: Caused by: java.lang.RuntimeException: Unable to get message info for yandex.cloud.ai.stt.v2.SttServiceOuterClass$StreamingRecognitionRequest
2021-02-20 10:25:05.755 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at com.google.protobuf.GeneratedMessageInfoFactory.messageInfoFor(GeneratedMessageInfoFactory.java:62)
2021-02-20 10:25:05.755 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at com.google.protobuf.ManifestSchemaFactory$CompositeMessageInfoFactory.messageInfoFor(ManifestSchemaFactory.java:143)
2021-02-20 10:25:05.755 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at com.google.protobuf.ManifestSchemaFactory.createSchema(ManifestSchemaFactory.java:55)
2021-02-20 10:25:05.756 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at com.google.protobuf.Protobuf.schemaFor(Protobuf.java:90)
2021-02-20 10:25:05.756 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at com.google.protobuf.Protobuf.schemaFor(Protobuf.java:104)
2021-02-20 10:25:05.756 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at com.google.protobuf.GeneratedMessageLite.makeImmutable(GeneratedMessageLite.java:175)
2021-02-20 10:25:05.756 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at yandex.cloud.ai.stt.v2.SttServiceOuterClass$StreamingRecognitionRequest.<clinit>(SttServiceOuterClass.java:463)
2021-02-20 10:25:05.756 10628-10839/ru.alfabank.mobile.android.feature W/System.err:    ... 11 more
2021-02-20 10:25:05.757 10628-10839/ru.alfabank.mobile.android.feature W/System.err: Caused by: java.lang.UnsupportedOperationException
2021-02-20 10:25:05.757 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at yandex.cloud.ai.stt.v2.SttServiceOuterClass$StreamingRecognitionRequest.dynamicMethod(SttServiceOuterClass.java:455)
2021-02-20 10:25:05.758 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at com.google.protobuf.GeneratedMessageLite.dynamicMethod(GeneratedMessageLite.java:256)
2021-02-20 10:25:05.758 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at com.google.protobuf.GeneratedMessageLite.buildMessageInfo(GeneratedMessageLite.java:284)
2021-02-20 10:25:05.758 10628-10839/ru.alfabank.mobile.android.feature W/System.err:     at com.google.protobuf.GeneratedMessageInfoFactory.messageInfoFor(GeneratedMessageInfoFactory.java:60)
2021-02-20 10:25:05.758 10628-10839/ru.alfabank.mobile.android.feature W/System.err:    ... 17 more```
morfeusys commented 3 years ago

@svetlana-e-petrova а exclude из зависимости yandex-speechkit пробовали?

svetlana-e-petrova commented 3 years ago

@morfeusys да, если сделать exclude protobuf-lite из зависимости yandex-speechkit, то возникает ошибка (стектрейк прикреплен к issuue) - проект компилируется, но крашится при инициализации aimybox.

bgubanov commented 3 years ago

Обновили библиотеку, вы можете подтянуть новую версию 0.15.1