jonjomckay / fritter

A privacy-friendly Twitter frontend for mobile devices
https://fritter.cc
MIT License
1.38k stars 80 forks source link

[BUG]Found Fatal Exception Crashes from Testing #776

Open Mai-hh opened 3 weeks ago

Mai-hh commented 3 weeks ago

Hi! I'm a student researcher currently working on a project in the area of Android app analysis. As a part of the work centered around Intents, I found a bug that resulted in crashes after analyzing logs/execution traces. Below are the relevant activities, traces, and adb commands that triggered the crashes.

These bugs may be hidden in unexposed Receiver, but they are worth investigating into to prevent potential issues down the line and addressing to improve the overall robustness and quality. If anyone can be confirm these to be valid bugs first, I would appreciate it, and I can help provide more information as needed.

com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver

Execution trace:

01-22 07:56:27.705 12369 12369 E AndroidRuntime: FATAL EXCEPTION: main
01-22 07:56:27.705 12369 12369 E AndroidRuntime: Process: com.jonjomckay.fritter, PID: 12369
01-22 07:56:27.705 12369 12369 E AndroidRuntime: java.lang.RuntimeException: Unable to start receiver com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver: y1.s: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at android.app.ActivityThread.handleReceiver(ActivityThread.java:4357)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at android.app.ActivityThread.access$1600(ActivityThread.java:256)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2101)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:106)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at android.os.Looper.loopOnce(Looper.java:201)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:288)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7842)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
01-22 07:56:27.705 12369 12369 E AndroidRuntime: Caused by: y1.s: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at b2.k$b.c(ReflectiveTypeAdapterFactory.java:13)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at y1.e.g(Gson.java:6)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at y1.e.h(Gson.java:2)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at y1.e.i(Gson.java:2)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver.onReceive(ScheduledNotificationReceiver.java:13)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    at android.app.ActivityThread.handleReceiver(ActivityThread.java:4348)
01-22 07:56:27.705 12369 12369 E AndroidRuntime:    ... 9 more

adb command that triggers it:

adb shell su 0 am broadcast -n "com.jonjomckay.fritter/com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" --es notificationDetails AAA 
echo adb shell su 0 am broadcast -n "com.jonjomckay.fritter/com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" --es notificationDetails AAA 
sleep 3.0
adb shell am force-stop com.jonjomckay.fritter
sleep 2.0
#!/bin/bash

adb shell su 0 am broadcast -n "com.jonjomckay.fritter/com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" --es notificationDetails notificationDetails 
echo adb shell su 0 am broadcast -n "com.jonjomckay.fritter/com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" --es notificationDetails notificationDetails 
sleep 3.0
adb shell am force-stop com.jonjomckay.fritter
sleep 2.0
#!/bin/bash

adb shell su 0 am broadcast -n "com.jonjomckay.fritter/com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" --es notificationDetails AAA --ei notification_id 3 
echo adb shell su 0 am broadcast -n "com.jonjomckay.fritter/com.dexterous.flutterlocalnotifications.ScheduledNotificationReceiver" --es notificationDetails AAA --ei notification_id 3 
sleep 3.0
adb shell am force-stop com.jonjomckay.fritter
sleep 2.0