AnimeNeko / Atarashii

DISCONTINUED. Atarashii! - An amazing, modern MAL app for Android 4+
http://atarashiiapp.com
BSD 2-Clause "Simplified" License
79 stars 23 forks source link

Info pages for some MAL entries (consistently) fail to load #443

Closed aphirst closed 9 years ago

aphirst commented 9 years ago

I'm using the 2.1.1 release available here from GitHub, on a CM 12.1 (nightly) device without GApps.

I am experiencing a problem, by which the Info/Description pages for some anime/manga in MAL fail to load, with the following error message on the bottom of the screen: Atarashii can't load the details

This seems to be deterministic - if I clear the App's cache and Local Data, reboot the device, and try again - the same entries fail to load. Also reproducible across a few different WiFi networks I have access to, and the Mobile Internet.

When I have a bit more time, I'll try to compile a short list of some entries which always do load, and respectively some which always don't. But otherwise, I'm not sure what other information I should provide - nonetheless I'm keen to if someone lets me know what I should share/do. :smile:

srvrguy commented 9 years ago

A list of a few titles that show this issue would be greatly appreciated.

aphirst commented 9 years ago

Well for me, it feels like the majority of things.

Entries that work:

Entries that don't

I can keep adding to this if you really want, but I can reproduce this consistently. It'd be interesting to know if others have this problem too.

ratan12 commented 9 years ago

Confirmed that it is not an API issue.

In my custom build it loads fine, it could be a bug that I fixed after rewriting some parts. To be 100% sure we need to try to reproduce it on the same version as @aphirst.

I will look into this as soon I am done with the DB changes.

srvrguy commented 9 years ago

Running a quick test with 2.1.1 on a N9 with AOSP (factory image) and not seeing any issues with the titles. Some are on my list, some are not. Maybe this is CM-related? I'd love to see a logcat when the error occurs.

aphirst commented 9 years ago

OK I think I got it, I gave the terminal emulator superuser priviliges. https://a.pomf.cat/njclmt.txt

I did a clear of Atarashii's Cache and Data, opened it fresh, enabled the log, tabbed into Atarashii, and opened the following 5 entries:

ratan12 commented 9 years ago

Awesome!

NetworkTask.doInBackground(): ANIME-task API error on job GETDETAILS: 200 - OK W/System.err( 4124): retrofit.RetrofitError: com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: Expected an int but was 5.4 at line 1 column 2697 path $.storage_value W/System.err( 4124): at

This is your error and this is enough info to find the cause! @motokochan seems that the API is passing double which the app doesn't support.

srvrguy commented 9 years ago

MAL supports floats on storage value, and the API documents that it will pass a "decimal number". The application should probably be fixed.

ratan12 commented 9 years ago

@aphirst I will release this week a quickpatch. Thanks for your help to find this issue!

aphirst commented 9 years ago

@ratan12 No problem! Happy to help in the ways I can. @motokochan How come, then, that it seemed to work fine on your side with AOSP? I'm curious to know :smile:

ratan12 commented 9 years ago

The cause was the storage value. We do not use that feature so we had no problems ;)

srvrguy commented 9 years ago

What he said. I don't usually set storage for the titles I watch. I think I may only have it on one title that I used for testing the API parsing.

ratan12 commented 9 years ago

The fix is ready. Once the API got updated I will release it.

ratan12 commented 9 years ago

@aphirst The fix got released yesterday.

I will not close this issue because it is still in version 2.2 which also must be fixed.

ratan12 commented 9 years ago

Fixed by 58a8dd8