Sav22999 / common-voice-android

Repository of "CV Project" app. It's an unofficial app for Mozilla Common Voice, which permits you to contribute to this project via your device.
https://www.saveriomorelli.com/commonvoice/
GNU General Public License v3.0
109 stars 18 forks source link

[BUG] Crashed when I was listening to Persian voices #202

Closed ahmaduxui closed 2 years ago

ahmaduxui commented 2 years ago

General information

About OS*

OS version: 12

OS language:_ English

About the app (CV Project)*

App release: 2.4.0.5 (#179::GPS)

App language: Persian

About you device

Device RAM: 6GB

Device display size (in Inches): 6.4in

From what store have you installed the app?: Google Play Store

Are there installed Google Services on your device? Yes

Description bug *

When listening to Persian voices, the app crashed and this message appeared

How to reproduce the bug *

  1. Go to listen section

Screenshots

Screenshot_20221023-190502_Device care.jpg

Log file

java.lang.IllegalArgumentException: org.commonvoice.saverio: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline replies or bubbles.    at android.app.PendingIntent.checkFlags(PendingIntent.java:382)     at android.app.PendingIntent.getActivityAsUser(PendingIntent.java:465)  at android.app.PendingIntent.getActivity(PendingIntent.java:451)    at android.app.PendingIntent.getActivity(PendingIntent.java:415)    at org.commonvoice.saverio.ListenActivity.sendNotification(ListenActivity.kt:1449)  at org.commonvoice.saverio.ListenActivity.showPopupAndSendNotification(ListenActivity.kt:1414)  at org.commonvoice.saverio.ListenActivity.access$showPopupAndSendNotification(ListenActivity.kt:66)     at org.commonvoice.saverio.ListenActivity$setupBadgeDialog$1$invokeSuspend$$inlined$collect$1.emit(Collect.kt:146)  at kotlinx.coroutines.flow.SharedFlowImpl.collect(SharedFlow.kt:351)    at kotlinx.coroutines.flow.SharedFlowImpl$collect$1.invokeSuspend(Unknown Source:15)    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)   at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:234)    at kotlinx.coroutines.DispatchedTaskKt.resumeUnconfined(DispatchedTask.kt:190)  at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:161)  at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:397)    at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:431)    at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:420)    at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:328)    at kotlinx.coroutines.flow.SharedFlowImpl.emitSuspend(SharedFlow.kt:472)    at kotlinx.coroutines.flow.SharedFlowImpl.emit(SharedFlow.kt:374)   at org.commonvoice.saverio_lib.preferences.StatsPrefManager$localValidated$1.invokeSuspend(StatsPrefManager.kt:125)     at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)   at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)     at android.os.Handler.handleCallback(Handler.java:938)  at android.os.Handler.dispatchMessage(Handler.java:99)  at android.os.Looper.loopOnce(Looper.java:226)  at android.os.Looper.loop(Looper.java:313)  at android.app.ActivityThread.main(ActivityThread.java:8751)    at java.lang.reflect.Method.invoke(Native Method)   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135) 
Sav22999 commented 2 years ago

@Ahmadhosseinbor if you use a different language, the crash happens anyway?

ahmaduxui commented 2 years ago

@Ahmadhosseinbor if you use a different language, the crash happens anyway?

No, I tested the English language and there was no problem

Sav22999 commented 2 years ago

@Ahmadhosseinbor I cannot replicate this bug. Try to clear cache and clear data and try again

Let me know

Sav22999 commented 2 years ago

See version 2.5