Add more specific error messages and deduplicate their handling#12578
Add more specific error messages and deduplicate their handling#12578Stypox merged 7 commits intoTeamNewPipe:devfrom
Conversation
4cb62bf to
1bde2dc
Compare
- ErrorInfo.getMessage() now returns an ErrorMessage instance that can be formatted into a string using a context (this allows the construction of an ErrorInfo to remain independent of a Context) - now the service ID is used in ErrorInfo.getMessage() to customize some messages based on the currently selected service - player HTTP invalid statuses are now included in the message - building a custom error message for AccountTerminatedException was moved from ErrorPanelHelper to ErrorInfo
|
Regarding #12533 ;
So, in the event that I start getting served "sign in to confirm" from YouTube, I should test this APK and report what it gives me? Or is no further testing needed unless something goes wrong with newpipe's error reporting |
@HeroponRikiBestest yes, thanks in advance :-) |
Tested with the latest CI build of this PR, this is what it reports when it occurs; seems correct to me. |
| GETTING_MAIN_SCREEN_TAB("getting main screen tab"); | ||
| GETTING_MAIN_SCREEN_TAB("getting main screen tab"), | ||
| PLAY_ON_POPUP("play on popup"), | ||
| SUBSCRIPTIONS("loading subscriptions"),; |
There was a problem hiding this comment.
| SUBSCRIPTIONS("loading subscriptions"),; | |
| SUBSCRIPTIONS("loading subscriptions"); |
app/src/main/res/values/strings.xml
Outdated
| <string name="trending_movies">Trending movies and shows</string> | ||
| <string name="trending_music">Trending music</string> | ||
| <string name="entry_deleted">Entry deleted</string> | ||
| <string name="player_http_403">HTTP error 403 received from server while playing, likely caused by an IP ban or by streaming URL expiration</string> |
There was a problem hiding this comment.
| <string name="player_http_403">HTTP error 403 received from server while playing, likely caused by an IP ban or by streaming URL expiration</string> | |
| <string name="player_http_403">HTTP error 403 received from server while playing, likely caused by streaming URL expiration or an IP ban</string> |



What is it?
Description of the changes in your PR
GitHub closed #12477 and I can't reopen it, hence a new PR.
This PR deduplicates the decision of which error message to show for which throwable (it was done in 3 different places previously). It also adds some nice new error messages for specific errors, so users understand better what is going on (and maybe complain less when YouTube breaks something ;-) ).
RouterActivity, a toast is shown like before if the error is not something that usually needs to be reported, as to not distract the user with a notification.ContentNotAvailableExceptionnow have nice specific error messages, and in particular this PR addsUnsupportedContentInCountryException(from [YouTube] Add support for more kiosks and change default one NewPipeExtractor#1354) andSignInConfirmNotBotException( [YouTube] Add custom error for "Sign in to confirm ..." NewPipeExtractor#1352). The latter in particular will hopefully help reduce the amount of duplicate comments in [YouTube] "Sign in to confirm..."/"Watch on the latest version..." #11139.Relies on the following changes
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. You can find more info and a video demonstration on this wiki page.
Due diligence