ElishaAz / Sayboard

An open-source on-device voice IME (keyboard) for Android using the Vosk library.
GNU General Public License v3.0
304 stars 19 forks source link

Crash when download or opening a downloaded model on Graphene OS #34

Closed nomonkeynodeal closed 8 months ago

nomonkeynodeal commented 8 months ago

Edit: At some point I noticed that the model is actually loaded after the crash and it all works. But it does still crash every time I attempt to download or pick a model.

Here's the log I'm offered after it crashes:

type: crash
osVersion: google/felix/felix:14/UP1A.231005.007/2023101300:user/release-keys
package: com.elishaazaria.sayboard:4002
process: com.elishaazaria.sayboard
processUptime: 18797 + 231 ms
installer: dev.imranr.obtainium

java.lang.RuntimeException: Unable to start service com.elishaazaria.sayboard.downloader.FileDownloadService@9039ce0 with Intent { cmp=com.elishaazaria.sayboard/.downloader.FileDownloadService (has extras) }: android.app.MissingForegroundServiceTypeException: Starting FGS without a type  callerApp=ProcessRecord{464708 6850:com.elishaazaria.sayboard/u0a164} targetSDK=34
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4856)
    at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2296)
    at android.os.Handler.dispatchMessage(Handler.java:106)
    at android.os.Looper.loopOnce(Looper.java:205)
    at android.os.Looper.loop(Looper.java:294)
    at android.app.ActivityThread.main(ActivityThread.java:8199)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
    at com.android.internal.os.ExecInit.main(ExecInit.java:49)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:359)
Caused by: android.app.MissingForegroundServiceTypeException: Starting FGS without a type  callerApp=ProcessRecord{464708 6850:com.elishaazaria.sayboard/u0a164} targetSDK=34
    at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:53)
    at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:49)
    at android.os.Parcel.readParcelableInternal(Parcel.java:4890)
    at android.os.Parcel.readParcelable(Parcel.java:4872)
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3061)
    at android.os.Parcel.createException(Parcel.java:3050)
    at android.os.Parcel.readException(Parcel.java:3026)
    at android.os.Parcel.readException(Parcel.java:2968)
    at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6776)
    at android.app.Service.startForeground(Service.java:775)
    at com.elishaazaria.sayboard.downloader.FileDownloadService.onStartCommand(SourceFile:183)
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:4838)
    ... 11 more
ElishaAz commented 8 months ago

Sorry, I chnaged the build target to 34 (android 14) without checking if it actually works there

ElishaAz commented 8 months ago

I changed it back. It should work with the latest version: https://github.com/ElishaAz/Sayboard/releases/tag/v4.0.3