avluis/Hentoid

Download from E-Hentai/ExHentai crashes app

Closed this issue · 6 comments

Hentoid Version: 1.18.14 (was working fine with 1.18.12, so testing later a downgrade)

Device/Android Version: M2012K11AG (POCO F3), Android Version 13 (LineAge OS 20)

Issue details / Repro steps: App starts downloading the book and crashes.

  1. add a book from E-hentai/Exhentai to download.
  2. crashes directly on download.
  3. retry crashes after "Download chain started" again.

Downloads from others sources are working.

Stack trace / LogCat:
latest-crash log : begin Hentoid ver: 1.18.14 (707) API: 33 Device: M2012K11AG Start : 2023-11-30T05:33:14.576Z End : 2023-11-30T05:33:14.576Z (00:00) -----
Attempt to invoke virtual method 'boolean java.lang.String.contains(java.lang.CharSequence)' on a null object reference java.lang.NullPointerException:
Attempt to invoke virtual method 'boolean java.lang.String.contains(java.lang.CharSequence)' on a null object reference
at me.devsaki.hentoid.parsers.images.EHentaiParser.parseImagePageMpv(Unknown Source:26)
at me.devsaki.hentoid.parsers.images.EHentaiParser.parseImagePage(SourceFile:0)
at me.devsaki.hentoid.parsers.images.ExHentaiParser.parseImagePage(Unknown Source:2)
at me.devsaki.hentoid.workers.ContentDownloadWorker.parsePageforImage(Unknown Source:72)
at me.devsaki.hentoid.workers.ContentDownloadWorker.access$parsePageforImage(Unknown Source:0)
at me.devsaki.hentoid.workers.ContentDownloadWorker$downloadFirstInQueue$4$1.invokeSuspend(Unknown Source:38)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:11)
at kotlinx.coroutines.DispatchedTask.run(Unknown Source:93)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(Unknown Source:3)
at kotlinx.coroutines.scheduling.TaskImpl.run(Unknown Source:2)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(Unknown Source:0)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(Unknown Source:14)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(Unknown Source:28)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Unknown Source:0)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@69c2990, Dispatchers.Default] latest-crash log : end

Screen record of the download attempt
https://cloud.yougoshatenshi.help/s/WAW8xq8krKq47dR/download/screen-20231130-063320.mp4

@AVnetWS/admin-team

Thanks for the detailed report.

I see you're using the multipage viewer perk. Maybe they changed something on the site? Did you try using a downgraded version of the app?

For the time being, try disabling the perk, downloads should work normally.

I tried to downgrade with .12 and .13, but yeah the same errors appears.
As well tried it as with a new user profile on the phone, for a clean setup.
Sometimes it starts downloading pages, but crashes after 10-100 pages.
I have the perk indeed unlocked, but not enabled by default, so it shouldnt be used?

image

For the other tests i had one crash with another crash log, maybe just from the same effect.

latest-crash log : begin Hentoid ver: 1.18.13 (705) API: 33 Device: M2012K11AG Start : 2023-11-30T14:51:59.420Z End : 2023-11-30T14:51:59.420Z (00:00) -----
Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{c47ac04 u0 me.devsaki.hentoid/androidx.work.impl.foreground.SystemForegroundService} android.app.RemoteServiceException$ForegroundServiceDidNotStartInTimeException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{c47ac04 u0 me.devsaki.hentoid/androidx.work.impl.foreground.SystemForegroundService} at android.app.ActivityThread.generateForegroundServiceDidNotStartInTimeException(ActivityThread.java:2005) at android.app.ActivityThread.throwRemoteServiceException(ActivityThread.java:1979) at android.app.ActivityThread.-$$Nest$mthrowRemoteServiceException(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2241) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7924) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: android.app.StackTrace: Last startServiceCommon() call for this service was made here at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1915) at android.app.ContextImpl.startForegroundService(ContextImpl.java:1870) at android.content.ContextWrapper.startForegroundService(ContextWrapper.java:822) at androidx.core.content.ContextCompat$Api26Impl.startForegroundService(Unknown Source:0) at androidx.core.content.ContextCompat.startForegroundService(Unknown Source:6) at androidx.work.impl.Processor.startForeground(Unknown Source:78) at androidx.work.impl.utils.WorkForegroundUpdater$1.run(Unknown Source:38) at androidx.work.impl.utils.SerialExecutorImpl$Task.run(Unknown Source:2) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637) at java.lang.Thread.run(Thread.java:1012) latest-crash log : end

Ok i tested some more options, its not the multipage viewer perk but the Sources Nexus for original files, which allows to prefer showing the original files. If i prefer resampled images it doesnt crash.
image

They changed 5 weeks ago that h@h clients provide these too now, so maybe thats the reason?

Thanks for the detailed report.

I see you're using the multipage viewer perk. Maybe they changed something on the site? Did you try using a downgraded version of the app?

For the time being, try disabling the perk, downloads should work normally.

Okay, we're progressing, but I don't have that perk to test with.

Could you open the Multipage viewer with Sources Nexus on and get me the response to the api.php call using Chrome dev tools ?

You should normally see JSON data.

with both enabled
{"d":"2423 x 2934 :: 7.18 MiB","o":"org","lf":"fullimg\/2750643\/2\/vaysb1aa4om\/de4a5c401cfe975dc46238d5143fee7b.png","ls":"?f_shash=774bbc4134ca6dc130821a7f2f059510b05af3e4&fs_from=de4a5c401cfe975dc46238d5143fee7b.png+from+EchoSaber","ll":"774bbc4134ca6dc130821a7f2f059510b05af3e4-7531977-2423-2934-png\/forumtoken\/2750643-2\/de4a5c401cfe975dc46238d5143fee7b.png","lo":"s\/774bbc4134\/2750643-2","xres":"2423","yres":"2934","i":"https:\/\/zyngbcv.zgiqcitxxxqd.hath.network\/h\/774bbc4134ca6dc130821a7f2f059510b05af3e4-7531977-2423-2934-png\/keystamp=1701471600-da28257f3e;fileindex=138502028;xres=org\/de4a5c401cfe975dc46238d5143fee7b.png","s":"35744"}

Hi there~ Crashes should have stopped now. But do you still have issues downloading from exH / e-h?