Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forground crashes at launch #155

Open
skewballfox opened this issue Jan 5, 2023 · 6 comments
Open

Forground crashes at launch #155

skewballfox opened this issue Jan 5, 2023 · 6 comments

Comments

@skewballfox
Copy link

pretty much an exact replica in description of #139 right down to the environment: Pixel 4a running GrapheneOS
installed, set up sync, worked for a day or two, then started crashing on startup

type: crash
osVersion: 
google/bramble/bramble:13/TQ1A.221205.011/2022122700:user/release-keys
package: me.bgregos.brighttask:18
process: me.bgregos.brighttask
processUptime: 166 + 321 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:3646)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3783)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2308)
	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:7878)
	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:8352)
	at android.app.Activity.performCreate(Activity.java:8331)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1422)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3627)
	... 14 more

let me know if you need more info, or need me to try anything on my end

@soerenschneider
Copy link

I can confirm this. Same phone, same os, same problem.

@gasull
Copy link

gasull commented Feb 8, 2023

This also happens to me on a Pixel 5 with GrapheneOS.

@gasull
Copy link

gasull commented Feb 8, 2023

It happens when Foreground is opened again after configuring it and syncing with the taskserver.

@bradyt
Copy link

bradyt commented Feb 8, 2023

I wonder if someone can reproduce this by building GrapheneOS onto an Android emulator, and running the app there. Then there might be steps to reproduce without needing a spare device to install GrapheneOS on. And it might be nice if said person could provide steps to build GrapheneOS to an emulator. Because right now, to reproduce this class of bugs, seems to require an Android device with GrapheneOS installed.

@jelly
Copy link

jelly commented May 28, 2023

I have this issue as well on GrapheneOS, when I disable secure app loading it does start: This feature can be disabled via Settings ➔ Security ➔ Enable secure app spawning.

@m-rey
Copy link

m-rey commented Jul 13, 2023

I have the same issue in version 1.6.0 and 1.6.2

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:3650)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3787)
	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:2303)
	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:7888)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:550)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
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:110)
	at me.bgregos.foreground.tasklist.TaskViewModel.<init>(TaskViewModel.kt:77)
	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:171)
	at me.bgregos.foreground.di.DaggerApplicationComponent.inject(DaggerApplicationComponent.java:127)
	at me.bgregos.foreground.tasklist.MainActivity.onCreate(MainActivity.kt:56)
	at android.app.Activity.performCreate(Activity.java:8359)
	at android.app.Activity.performCreate(Activity.java:8338)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1421)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3631)
	... 12 more

as mentioned a few comments above, it happens when Foreground is opened again after configuring it and syncing with the taskserver

device: Xiaomi Mi Note 10 (tucana)
ROM: Octavi 4.3
Android version: 13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants