streetwriters / notesnook

A fully open source & end-to-end encrypted note taking alternative to Evernote.
https://notesnook.com/
GNU General Public License v3.0
9.57k stars 588 forks source link

Notesnook crashes after a reboot #6628

Closed NikunjKhangwal closed 3 days ago

NikunjKhangwal commented 4 days ago

What happened?

Notesnook crash twice in background everytime i reboot the phone

Observed using Logfox app: Screenshot_20240930-110816_LogFox

Steps to reproduce the problem

Reboot the phone and observe

Version

3.0.18

Platform/OS

Android

Relevant log output

FATAL EXCEPTION: main
Process: com.streetwriters.notesnook, PID: 8519
java.lang.RuntimeException: Unable to start service com.streetwriters.notesnook.BootTaskService@47f34d3 with Intent { cmp=com.streetwriters.notesnook/.BootTaskService }: android.app.MissingForegroundServiceTypeException: Starting FGS without a type  callerApp=ProcessRecord{b95a238 8519:com.streetwriters.notesnook/u0a770} targetSDK=34
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5107)
    at android.app.ActivityThread.-$$Nest$mhandleServiceArgs(Unknown Source:0)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2432)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8601)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:583)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:863)
Caused by: android.app.MissingForegroundServiceTypeException: Starting FGS without a type  callerApp=ProcessRecord{b95a238 8519:com.streetwriters.notesnook/u0a770} 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:5016)
    at android.os.Parcel.readParcelable(Parcel.java:4998)
    at android.os.Parcel.createExceptionOrNull(Parcel.java:3178)
    at android.os.Parcel.createException(Parcel.java:3167)
    at android.os.Parcel.readException(Parcel.java:3150)
    at android.os.Parcel.readException(Parcel.java:3092)
    at android.app.IActivityManager$Stub$Proxy.setServiceForeground(IActivityManager.java:7011)
    at android.app.Service.startForeground(Service.java:776)
    at com.streetwriters.notesnook.BootTaskService.onStartCommand(Unknown Source:60)
    at android.app.ActivityThread.handleServiceArgs(ActivityThread.java:5089)
    ... 9 more
ammarahm-ed commented 4 days ago

Hi, what is your android version?

NikunjKhangwal commented 4 days ago

Hi, what is your android version?

It's Android 14

ammarahm-ed commented 4 days ago

I am also on android 14, I don't see a crash when I reboot my phone. The issue was present in v3.0.17 but has been fixed in v3.0.18.

NikunjKhangwal commented 4 days ago

I am also on android 14, I don't see a crash when I reboot my phone. The issue was present in v3.0.17 but has been fixed in v3.0.18.

I'm using crdroid custom rom and it's rooted so that might be causing the issue (maybe). I'm on 3.0.18 as well. I've provided the log but if there's any other way i can help identifying it, let me know.

ammarahm-ed commented 3 days ago

@NikunjKhangwal I was getting the same error in v3.0.17 but now I am not with the latest version. So it's strange why you are still getting this

NikunjKhangwal commented 3 days ago

I guess I'll try re-installing the app and see if it works.

NikunjKhangwal commented 3 days ago

Reinstalling it fixed the issue