calvinaquino / LNReader-Android

Light novel reader for android test project collab
Apache License 2.0
120 stars 36 forks source link

Update freezes while downloading external chapter and novel cover image doesn't shows up and a bitmap empty prompt. #252

Closed mike211 closed 6 years ago

mike211 commented 7 years ago

["mike211"]Hi Nandaka, I just want to inform you that there is a problem with "Konjiki no Wordmaster". When updating it get stuck on "Downloading external chapter info 763 of 770". This problem made the "update service" and "download all info" for web function to be stuck due to the same problem.

I check the website and it seem there is a few chapters unlinked.

Could this be the cause of the update getting stuck?

Try to untick Include External Chapter in Settings -> Update and Notification -> Include External Chapter.

Can you get the adb log files? I need to know which page that causing the stuck up.

Here is the adb log that you requested and regarding the the novel cover image doesn't shows up. My device is able to browse the website using the tablet browser and manual refresh still prompt "bitmap empty" .

problems.zip

Nandaka commented 7 years ago

from the log file:

org.jsoup.HttpStatusException: HTTP error fetching URL. Status=410, URL=https://loliquent.wordpress.com/

Looks like url problem? I think you need to manually delete those chapters linked by loliquent, as the site already removed.

Bitmap empty

Which novel is affected? I only see ShinSekaiYori and Zaru Soba from log file. I've tried on my device and emulator, and it is downloaded properly.

[ 09-09 12:42:55.154  7735: 7735 E/BitmapFactory ]
Unable to decode stream: java.io.FileNotFoundException: /storage/extSdCard/Android/data/com.erakk.lnreader/files/project/images/2/2a/ShinSekai_Yori_Cover.jpg: open failed: ENOENT (No such file or directory)

[ 09-09 12:41:21.537  7735: 7735 E/BitmapFactory ]
Unable to decode stream: java.io.FileNotFoundException: /storage/extSdCard/Android/data/com.erakk.lnreader/files/project/images/b/bf/91P+V6q5AyL._SL1500_.jpg: open failed: ENOENT (No such file or directory)

can you check if the file/folder exists?

mike211 commented 7 years ago

I have tired deleting the chapters, clearout the cache and even deleting the novel altogether, but the same problem still occur. Regarding the bitmap empty problem, it seem to affected only the new novels that I haven't downloaded before.

I have checked both /storage/extSdCard/Android/data/com.erakk.lnreader/files/project/images/2/2a and /storage/extSdCard/Android/data/com.erakk.lnreader/files/project/images/b/bf, both folder exists but no file name ShinSekai_Yori_Cover.jpg or 91P+V6q5AyL.SL1500.jpg.

mike211 commented 7 years ago

While checking the folder , I have come across more then few .jpg that is corrupted, should I manually delete them? Also there is over 7000+ thumb.php files in /storage/extSdCard/Android/data/com.erakk.lnreader/files/project. Are they suppose to be there ?

mike211 commented 7 years ago

I have majorly fuck up, I have some how manage to corrupted my micro sd card which contain all the Baka Reader image files. I would need to purchase a new one and re-download everything and then proceed from there if problems still occur.

By the way, is there any chance you know where I might find a download/torrent that containing of a backup of all files (images and the novel data including those that have been abandon) of Bakareader EX? Cause I have a few abandon novels on my bakareader and I want to re-download the images for those as well.

mike211 commented 7 years ago

Update

I brought a new 64 gb mirco sd card and while using the "update now" function, I notice it wasn't redownloading any of the novel illustrations on my watch list and that I would have to one by one manually download them. Also it doesn't download the update of the chapter, it just show (!) beside the novel title. And another thing I have notice, baka reader seem to crash itself when running the "update now".

Here is a log file while using "update now". I also added the error files that was found in the sd card. running update now test.zip

"Bitmap empty" Regarding this problem, manually refresh now work and will download novel cover image, but the "download novel info" function on the novel list still don't download novel cover image.

"Konjiki no Wordmaster" Nothing change, still getting stuck while updating Konjiki no Wordmaster.

Nandaka commented 7 years ago

thumbs.php

it is normal, as the thumbnails is generated by php if you check the website. Technically, I can make it to have better filename, but no time :smile:

backup images

sorry, I don't know about that.

logs

from log file, looks like you have IO/access problem. For some reason, it cannot update the DB. Can you try to uninstall the apps and start from fresh DB? (Backup you old db and images first).


[ 09-14 04:25:52.400  1469: 2515 E/class com.erakk.lnreader.task.GetUpdatedChaptersTask ]

Failed to update: Lillia to Treize

Error Code=-6004: Failed to update: Lillia to Treize. Inner Exception: disk I/O error (code 3850)

    at com.erakk.lnreader.task.GetUpdatedChaptersTask.processWatchedNovel(GetUpdatedChaptersTask.java:232)

    at com.erakk.lnreader.task.GetUpdatedChaptersTask.getUpdatedWatchedNovelList(GetUpdatedChaptersTask.java:263)

    at com.erakk.lnreader.task.GetUpdatedChaptersTask.getUpdatedChapters(GetUpdatedChaptersTask.java:110)

    at com.erakk.lnreader.task.GetUpdatedChaptersTask.doInBackground(GetUpdatedChaptersTask.java:50)

    at com.erakk.lnreader.task.GetUpdatedChaptersTask.doInBackground(GetUpdatedChaptersTask.java:25)

    at android.os.AsyncTask$2.call(AsyncTask.java:287)

    at java.util.concurrent.FutureTask.run(FutureTask.java:234)

    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)

    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)

    at java.lang.Thread.run(Thread.java:856)

Caused by: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 3850)

    at android.database.sqlite.SQLiteConnection.nativeExecuteForLong(Native Method)

    at android.database.sqlite.SQLiteConnection.executeForLong(SQLiteConnection.java:784)

    at android.database.sqlite.SQLiteSession.executeForLong(SQLiteSession.java:652)

    at android.database.sqlite.SQLiteStatement.simpleQueryForLong(SQLiteStatement.java:107)

    at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:813)

    at android.database.DatabaseUtils.longForQuery(DatabaseUtils.java:801)

    at android.database.sqlite.SQLiteDatabase.getVersion(SQLiteDatabase.java:968)

    at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:242)

    at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:188)

    at com.erakk.lnreader.dao.NovelsDao.getPageModel(NovelsDao.java:569)

    at com.erakk.lnreader.dao.NovelsDao.getPageModel(NovelsDao.java:591)

    at com.erakk.lnreader.model.PageModel.getPageModelByName(PageModel.java:66)

    at com.erakk.lnreader.model.PageModel.getPageModel(PageModel.java:193)

    at com.erakk.lnreader.task.GetUpdatedChaptersTask.processWatchedNovel(GetUpdatedChaptersTask.java:179)

    ... 9 more

[ 09-14 04:25:55.439  1469: 2515 E/SQLiteDatabase ]

Failed to open database '/storage/emulated/0/Android/data/com.erakk.lnreader/files/databases/pages.db'.

android.database.sqlite.SQLiteCantOpenDatabaseException: unable to open database file (code 14)
mike211 commented 7 years ago

So you want me to try uninstall the apps and start from fresh DB and not even loading the backup? Regarding the images, I have none. I am still quite upset about it, because my previous sd card that contain everything of Baka reader have die on me.

thumbs.php

it is normal, as the thumbnails is generated by php if you check the website. Technically, I can make it to have better filename, but no time :smile:

Might I suggest creating a folder for those, cause I notice it took a while to load all those before I have access to the image folder.

mike211 commented 7 years ago

Ok, I did what you have told me. I have backup db and uninstall the apps and reinstall again, but now for some reason my backup db won't load.

Please I really need your help, I have already lost the images, I don't want to lose the novels I have saved up whiles I was waiting for the original problem to be solve, lost as well.

I will link the db backup I have here.

https://mega.nz/#!M0UjESZQ!PaZSMs9oHZQJVJBPGQ2az-JGzUxf8u5b55NB8oHvxJc

Nandaka commented 7 years ago

can you follow the instruction from http://wiki.team-mediaportal.com/1_MEDIAPORTAL_1/16_Support/Troubleshooting/Repair_SQLite_Database ?

change the db name to the backup db. Please note that if the db is corrupted, it might only be able to recover part of your data.

mike211 commented 7 years ago

Thank you, I have follow the instruction and have repaired most of the data, some of the abandon novel that I have, have missing chapters here and there other than that I should be able to redownload the others.

Question, How did my backup corrupted itself?

Nandaka commented 7 years ago

I'm not sure, maybe SDCard issue? Other than that maybe the writing is interrupted (e.g. service killed).

Fyi, you can enable autobackup with multiple copies created in settings page.

mike211 commented 7 years ago

But it a brand new Sd card and I waited until it said it was done. Oh well, let see if I run the "update now", would it update and download or does it crash like last time.

Man, I seem to be have all the bad luck while dealing with this issue.

Update "Update now" function still crash while running. Here is a log of it. [Uploading UpdateNowTest2.zip…]()