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

Issue while creating Json file #34

Open
Wordcounter opened this issue Mar 10, 2020 · 6 comments
Open

Issue while creating Json file #34

Wordcounter opened this issue Mar 10, 2020 · 6 comments

Comments

@Wordcounter
Copy link

Error
I'm getting error as per screenshot attached, when trying to run through Command prompt. When trying through run through opening the .jar file, I get similar error as below:

[MR2Tachiyomi] [2020-03-10 21:01:35] [c.w.m.MR2Tachiyomi] ERROR - Could not convert database file to json due to unknown exception
java.lang.NumberFormatException: For input string: "8wWv ?m�?"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at com.waicool20.mr2tachiyomi.util.ABUtils.correctHeaders(ABUtils.kt:131)
at com.waicool20.mr2tachiyomi.util.ABUtils.processFile(ABUtils.kt:87)
at com.waicool20.mr2tachiyomi.util.ABUtils.ab2tar(ABUtils.kt:40)
at com.waicool20.mr2tachiyomi.MR2Tachiyomi.extractDbFromAb(MR2Tachiyomi.kt:106)
at com.waicool20.mr2tachiyomi.MR2Tachiyomi.convert(MR2Tachiyomi.kt:87)
at com.waicool20.mr2tachiyomi.MR2TachiyomiKt.main(MR2Tachiyomi.kt:72)

Please advise.

@waicool20
Copy link
Owner

Your backup probably contains the manga images (which interferes with the decoding), delete them and clear cache then try to redo the backup.

@rdking
Copy link

rdking commented May 3, 2020

I'm having a similar issue. The problem is that your inflater needs to be updated. I just downloaded abe-all.jar and it was able to successfully decompress my .ab archive where your tool keeps crashing. That's after deleting all MR downloads, turning off the download feature, force-stopping the app, and dumping the cache before creating the backup file. Even in this state, I get

Exception: For input string: ""

Suggestion: Is there any way you can allow the tool to work from an already inflated .tar file as well as from the deflated .ab file? At least then, even if there's something you can't fix about that quirky algorithm Google chose, we would still be able to use the tool after manual inflation.

@waicool20
Copy link
Owner

The issue is that there seems to be two different ab formats, the ab file i got from my phone did not work with abe-all

If you have the tar file already, it should be trivial to open it in an archive manager like 7-zip and manually extract the db file directly. In that case you can just open it in the tool and get your json file.

@Akzyra
Copy link

Akzyra commented May 6, 2020

Manually converting to TAR and using the DB file worked well.
Format probably depends on which ADB or backup tool (Helium) you use.

@rdking
Copy link

rdking commented May 7, 2020

If you have the tar file already, it should be trivial to open it in an archive manager like 7-zip and manually extract the db file directly. In that case you can just open it in the tool and get your json file.

That's what I ended up doing. After posting that comment, I looked at the repo and noticed that the program can accept the .db file. So I just extracted it. Now all but about 15 of my 450+ manga are in Tachiyomi. The only not-so-nice part about it is that the "last read" information didn't seem to come along with it.

@rdking
Copy link

rdking commented May 7, 2020

Format probably depends on which ADB or backup tool (Helium) you use.

Probably. I couldn't get Helium to backup MR. It's the only app that Helium wouldn't work on. I also couldn't get the OS to backup MR. None of my phone backups contain MR. I could only use adb backup to get it.

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

4 participants