GrapheneOS / os-issue-tracker

Issue tracker for GrapheneOS Android Open Source Project hardening work. Standalone projects like Auditor, AttestationServer and hardened_malloc have their own dedicated trackers.
https://grapheneos.org/
359 stars 21 forks source link

[bug] Foreground task list app crashes on relaunch in GrapheneOS if any tasks have a due date set #2531

Open jeffgazso opened 1 year ago

jeffgazso commented 1 year ago

The Foreground task list app crashes on relaunch in GrapheneOS if any tasks in the list have a due date set. This bug appears to exist even on the most recent app release on the most recent GrapheneOS version.

Temporarily disabling Secure App Spawning prevents the issue until the security feature is re-enabled.

The error text reads:

type: crash
osVersion: google/redfin/redfin:13/TQ3A.230605.012/2023061402:user/release-keys
package: me.bgregos.brighttask:18
process: me.bgregos.brighttask
processUptime: 156 + 292 ms

java.lang.RuntimeException: Unable to start activity ComponentInfo{me.bgregos.brighttask/me.bgregos.foreground.tasklist.MainActivity}: com.google.gson.JsonIOException: Interfaces can't be instantiated! Register an InstanceCreator or a TypeAdapter for this type. Interface name: android.content.IIntentSender
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3652)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3789)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:138)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2314)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7937)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
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:355)
Caused by: com.google.gson.JsonIOException: Interfaces can't be instantiated! Register an InstanceCreator or a TypeAdapter for this type. Interface name: android.content.IIntentSender
at com.google.gson.internal.ConstructorConstructor$3.construct(ConstructorConstructor.java:136)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.createAccumulator(ReflectiveTypeAdapterFactory.java:425)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:381)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:431)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:391)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:431)
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:391)
at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82)
at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
at com.google.gson.Gson.fromJson(Gson.java:1214)
at com.google.gson.Gson.fromJson(Gson.java:1124)
at com.google.gson.Gson.fromJson(Gson.java:1034)
at com.google.gson.Gson.fromJson(Gson.java:1001)
at me.bgregos.foreground.util.NotificationRepository.load(NotificationRepository.kt:99)
at me.bgregos.foreground.tasklist.TaskViewModel.<init>(TaskViewModel.kt:68)
at me.bgregos.foreground.tasklist.TaskViewModel_Factory.newInstance(TaskViewModel_Factory.java:42)
at me.bgregos.foreground.tasklist.TaskViewModel_Factory.get(TaskViewModel_Factory.java:31)
at me.bgregos.foreground.tasklist.TaskViewModel_Factory.get(TaskViewModel_Factory.java:10)
at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
at me.bgregos.foreground.di.DaggerApplicationComponent.injectMainActivity(DaggerApplicationComponent.java:172)
at me.bgregos.foreground.di.DaggerApplicationComponent.inject(DaggerApplicationComponent.java:124)
at me.bgregos.foreground.tasklist.MainActivity.onCreate(MainActivity.kt:23)
at android.app.Activity.performCreate(Activity.java:8389)
at android.app.Activity.performCreate(Activity.java:8368)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1422)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3633)
... 14 more
matchboxbananasynergy commented 11 months ago

As per the reports in https://github.com/bgregos/foreground/issues/164, this seems to happen on OSes which I don't believe use secure app spawning, so it's possible that this is not an issue that's specific to GrapheneOS, but rather a bug in the app that needs to be addressed there.

chaseadam commented 2 months ago

I can confirm similar error on DivestOS on mata and can confirm disabling "secure app spawning" is a workaround.

08-21 10:28:29.981  7965  7965 D AndroidRuntime: Shutting down VM
08-21 10:28:29.982  7965  7965 E AndroidRuntime: FATAL EXCEPTION: main
08-21 10:28:29.982  7965  7965 E AndroidRuntime: Process: me.bgregos.brighttask, PID: 7965
08-21 10:28:29.982  7965  7965 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{me.bgregos.brighttask/me.bgregos.foreground.tasklist.MainActivity}: com.google.gson.JsonIOException: Interfaces can't be instantiated! Register an InstanceCreator or a TypeAdapter for this type. Interface name: android.content.IIntentSender
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3645)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:138)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:106)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:201)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:288)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7924)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.android.internal.os.ExecInit.main(ExecInit.java:48)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:355)
08-21 10:28:29.982  7965  7965 E AndroidRuntime: Caused by: com.google.gson.JsonIOException: Interfaces can't be instantiated! Register an InstanceCreator or a TypeAdapter for this type. Interface name: android.content.IIntentSender
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.internal.ConstructorConstructor$3.construct(ConstructorConstructor.java:136)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.createAccumulator(ReflectiveTypeAdapterFactory.java:425)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:381)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:431)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:391)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.readIntoField(ReflectiveTypeAdapterFactory.java:212)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$FieldReflectionAdapter.readField(ReflectiveTypeAdapterFactory.java:431)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:391)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:82)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:61)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.Gson.fromJson(Gson.java:1214)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.Gson.fromJson(Gson.java:1124)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.Gson.fromJson(Gson.java:1034)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at com.google.gson.Gson.fromJson(Gson.java:1001)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at me.bgregos.foreground.util.NotificationRepository.load(NotificationRepository.kt:109)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at me.bgregos.foreground.tasklist.TaskViewModel.<init>(TaskViewModel.kt:77)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at me.bgregos.foreground.tasklist.TaskViewModel_Factory.newInstance(TaskViewModel_Factory.java:42)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at me.bgregos.foreground.tasklist.TaskViewModel_Factory.get(TaskViewModel_Factory.java:31)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at me.bgregos.foreground.tasklist.TaskViewModel_Factory.get(TaskViewModel_Factory.java:10)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at me.bgregos.foreground.di.DaggerApplicationComponent.injectMainActivity(DaggerApplicationComponent.java:171)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at me.bgregos.foreground.di.DaggerApplicationComponent.inject(DaggerApplicationComponent.java:127)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at me.bgregos.foreground.tasklist.MainActivity.onCreate(MainActivity.kt:56)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:8342)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at android.app.Activity.performCreate(Activity.java:8321)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626)
08-21 10:28:29.982  7965  7965 E AndroidRuntime:    ... 14 more
08-21 10:28:29.985  1355  8013 I DropBoxManagerService: add tag=data_app_crash isTagEnabled=true flags=0x2
08-21 10:28:29.985  1355  1707 W ActivityTaskManager:   Force finishing activity me.bgregos.brighttask/me.bgregos.foreground.tasklist.MainActivity
08-21 10:28:29.993  7965  7965 I Process : Sending signal. PID: 7965 SIG: 9
08-21 10:28:30.030  1355  1707 I ActivityManager: Process me.bgregos.brighttask (pid 7965) has died: fg  TOP 
08-21 10:28:30.031   848   848 I Zygote  : Process 7965 exited due to signal 9 (Killed)
08-21 10:28:30.033  2045  2084 W System  : A resource failed to call release. 
08-21 10:28:30.033  2045  2084 W System  : A resource failed to call release. 
08-21 10:28:30.033  2045  2084 W System  : A resource failed to call release. 
chaseadam commented 2 months ago

notably, after starting the app successfully with "secure spawning" disabled. The app continues to start fine with "secure spawning" re-activated (even after reboot).