-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Unify error reporting and add error notification #7482
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM only minor things.
Tested it a bit, seems to work as expected.
I'm glad that you managed to get rid of the ugly exception workaround 😄
Only one thing is a bit confusing:
When e.g. a player error happens, the player just stops and I don't notice the notification at the top (in particularly when the notification bar is already full due to my phones notch).
So I think showing a toast that says "Unexpected error occurred, tap notification for details" would be great. I would show the toast whenever a new error notification is shown.
I agree, I'll improve this |
You can also test the player error by trying to play in background this live: https://www.youtube.com/watch?v=Q3uwXbkheDo |
Activity, snackbar and notification
The wrong @decorator was put in the wrong place to mark the throwable fieldd as transient, now this is fixed and the exception is not serialized. So if a non-serializable throwable is passed, that's not an issue, since it's not going to be serialized. The need for EnsureExceptionSerializable is also gone.
efd05ee
to
a2a8c13
Compare
since the notification is silent, also show a toast, otherwise the user is confused
a2a8c13
to
950956e
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
report_player_errors_title and report_player_errors_summary were removed in TeamNewPipe#7482
What is it?
Description of the changes in your PR
ErrorUtil
class that contains the three ways to report an error:openActivity
: just opens the error activity as alwaysshowSnackbar
: just opens the error snackbar as alwayscreateNotification
: creates a notification with a description containing the usual error message, and a title explaining that by tapping on the notification you can report the error. The notification disappears upon tapping, and is set toIMPORTANCE_LOW
like other NewPipe notifications so that it does not make sounds.ErrorInfo
, eliminating the need forEnsureExceptionSerializable
(see commit message for more info)PlayerErrorHandler
and instead always show error notification when an error occurs in the player. Also remove the related "report player error" setting.Before/After Screenshots/Screen Record
APK testing
The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.
To test I suggest using the "Crash the player" button from #7142 or triggering #7302 @litetex
Due diligence