-
Notifications
You must be signed in to change notification settings - Fork 495
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
Improve error message if restoring from JSON file #1056
Improve error message if restoring from JSON file #1056
Conversation
They hadn't been usable in Tachiyomi for quite a while either afaik Edit: Although considering this is just an error message, I don't think it'd be a problem to have it in Mihon. |
How do people even manage to select these, aren't JSON files filtered out of the file picker already? 🤔 |
Still, people do manage to run into these issues, and not everyone bothers asking for support.
It shows every file type for me ¯\_(ツ)_/¯ |
No file is filtered out |
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.
Think you can also do a try catch on the decode function forProtobufDecodingEception
and say the backup file is corrupted?
Could / should they be? |
I dedicate this PR merge to @ThaDaVos |
* Improve error message if restoring from JSON file * Replace Exception with IOException * Use more generic error message if protobuf fails * fix lint (cherry picked from commit de8ef6d)
Current state
Older versions of Tachiyomi support backing up and restoring from JSON files. If a user tries to restore from such a backup they should be nudged in correct direction. Currently the error message is very cryptic and leads to a support burden:
Proposed change
Users are likely to expect old JSON backups to still be usable in Mihon, unless told directly. With the proposed change there is a de minimis maintenance/performance burden as it hooks into the existing gzip signature check. The new error message:
Limitations
If the user picks a JSON file that is not a backup file from Tachiyomi the error message will falsely imply that the file is a valid Tachiyomi JSON backup file. Accounting for this would be non-feasible, and an unlikely scenario.
[!] I do not have an actual JSON backup file from Tachiyomi at hand, I assume it looks like a regular JSON file.
Images