wallabag / android-app

Android application to read your articles saved in your wallabag. You can also easily add new articles.
https://www.wallabag.org
GNU General Public License v3.0
470 stars 260 forks source link

Crashes when using TTS #1348

Open tcitworld opened 9 months ago

tcitworld commented 9 months ago

Reported from Google Play Console :

Another issue:

Exception java.lang.NullPointerException:
  at fr.gaulupeau.apps.Poche.tts.TtsFragment.onReadFinished (TtsFragment.java:640)
  at fr.gaulupeau.apps.Poche.tts.TtsFragment.lambda$vXXw53yckoOIUcjDNACQ7yVr4MA
  at fr.gaulupeau.apps.Poche.tts.-$$Lambda$TtsFragment$vXXw53yckoOIUcjDNACQ7yVr4MA.run
  at android.os.Handler.handleCallback (Handler.java:942)
  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:8762)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:604)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1067)
kidpixo commented 9 months ago

Same with Android 14 , wallabag installed from Fdroid.

jamietanna commented 7 months ago

I'm seeing a slightly different error on Android 14:

12-29 10:02:41.561 22194 22194 E AndroidRuntime: FATAL EXCEPTION: main
12-29 10:02:41.561 22194 22194 E AndroidRuntime: Process: fr.gaulupeau.apps.InThePoche, PID: 22194
12-29 10:02:41.561 22194 22194 E AndroidRuntime: android.app.MissingForegroundServiceTypeException: Starting FGS without a type  callerApp=ProcessRecord{2222502 22194:fr.gaulupeau.apps.InThePoche/u0a241} targetSDK=34
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:53)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.app.MissingForegroundServiceTypeException$1.createFromParcel(MissingForegroundServiceTypeException.java:49)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.os.Parcel.readParcelableInternal(Parcel.java:4870)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.os.Parcel.readParcelable(Parcel.java:4852)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.os.Parcel.createExceptionOrNull(Parcel.java:3052)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.os.Parcel.createException(Parcel.java:3041)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.os.Parcel.readException(Parcel.java:3024)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.os.Parcel.readException(Parcel.java:2966)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:6761)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.app.Service.startForeground(Service.java:775)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at fr.gaulupeau.apps.Poche.tts.TtsService.setForegroundAndNotification(TtsService.java:1141)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at fr.gaulupeau.apps.Poche.tts.TtsService.setForegroundAndNotification(TtsService.java:1106)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at fr.gaulupeau.apps.Poche.tts.TtsService.playCmd(TtsService.java:436)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at fr.gaulupeau.apps.Poche.tts.TtsService.playPauseCmd(TtsService.java:504)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at fr.gaulupeau.apps.Poche.tts.TtsFragment.playPauseCommand(TtsFragment.java:539)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at fr.gaulupeau.apps.Poche.tts.TtsFragment.lambda$onCreateView$0$fr-gaulupeau-apps-Poche-tts-TtsFragment(TtsFragment.java:212)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at fr.gaulupeau.apps.Poche.tts.TtsFragment$$ExternalSyntheticLambda0.onClick(Unknown Source:2)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.view.View.performClick(View.java:7658)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.view.View.performClickInternal(View.java:7635)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.view.View$PerformClick.run(View.java:30167)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:958)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:99)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:205)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:294)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:8194)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
12-29 10:02:41.561 22194 22194 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971)

Which looks like we can sort with https://stackoverflow.com/questions/77520968/why-am-i-encountering-the-error-starting-fgs-without-a-type-when-executing-the

ngosang commented 4 months ago

@Strubbl I see this is already fixed on master. Could you publish a release? This is affecting all users of Android 14 / 15

Strubbl commented 4 months ago

I do not have the keys to publish a release, we need the help from @tcitworld here.

tcitworld commented 4 months ago

2.5.2 is published on our side. Unfortunately as the changes from https://github.com/wallabag/android-app/commit/b0ea81403659b1d5be5c01ac7100d3829602b284 need to be manually reviewed it might take a while for the new version to be available on Google Play (I had to make videos illustrating the uses of FOREGROUND_SERVICE_DATA_SYNC and FOREGROUND_SERVICE_MEDIA_PLAYBACK).