kodjodevf / mangayomi-extensions

Source extensions for the Mangayomi app.
Apache License 2.0
60 stars 14 forks source link

Exception in MangaClash listing: RangeError (invalid indexing) #36

Closed resolritter closed 3 months ago

resolritter commented 3 months ago

Source information

MangaClash 0.0.85

Source language

English

Steps to reproduce

  1. Install the MangaClash extension v0.0.85
  2. Open up a listing in the app which cannot be processed correctly (see the screenshot below)

Expected behavior

The listings' chapters are loaded successfully

Actual behavior

An exception is thrown while loading the listing's chapters:

Screenshot_20240311-001614

Mangayomi version

0.1.85

Device

Samsung Galaxy Tab A

Other details

This problem seems to happen because the madara source adds to 3 arrays independently in getDetail: chapUrls, chaptersNames and chapDates.

https://github.com/kodjodevf/mangayomi-extensions/blob/1e6f245175e5716abcce9c10c48de79d3584c59a/manga/multisrc/madara/madara.dart#L184-L186

If those arrays somehow end up with different sizes, then an exception might be thrown later on due to incorrect indexing, presumably around here:

https://github.com/kodjodevf/mangayomi-extensions/blob/1e6f245175e5716abcce9c10c48de79d3584c59a/manga/multisrc/madara/madara.dart#L242

I have refactored that part of the code locally and the problem apparently went away. I'll submit a PR for this later.

Acknowledgements