The current node list is empty.

Issue #161 resolved
Fribb created an issue

for a while now my installed Atarashii API can't fetch anything anymore and I get the exception

request.CRITICAL: Uncaught PHP Exception InvalidArgumentException: "The current node list is empty."

[...]/symfony/symfony/src/Symfony/Component/DomCrawler/Crawler.php line 496

could that be the cause of the missing features on myanimelist since it isn't fully up yet?

This creates an {"error":{"code":500,"message":"Internal Server Error"}} for everything I do.

Comments (12)

  1. Michael Johnson

    With all the recent changes and lockdowns on MAL lately, it's nearly impossible to update the API code or run tests to fix issues. Likely most of the breakage you're seeing is related to these changes on the MAL side.

    I may try to make some fixes, but anything that is using their XML API will be broken (mainly list manipulation) until MAL re-enables it. I just don't feel like trying to change how all that code works when it's likely that everything will be broken again soon.

  2. Fribb reporter

    So it is a problem that the official API you are using to do certain things is not accessible currently?!

    So my only option is to wait until they enable the official API again or until they release the new version, that is unfortunate.

  3. Michael Johnson

    Basically, but not everything is broken. Things that won't work right now include:

    • The history page for anyone except the signed in user
    • Any forum activities
    • Viewing any anime or manga list
    • Adding, updating, or deleting any manga or anime entries on a user's list
    • Searching

    The first two items are because MAL has either restricted or temporarily removed functionality. The other items are because MAL has disabled their old API (specifically the malappinfo page and the XML API). There may be additional stuff not working that I haven't determined yet.

    Potentially, I could get lists working again, but I'm not sure the effort will be worth it. It's going to be a lot of work, and list sizes are limited.

    In theory, anime and manga entries should work along with character and staff entries after some fixes. The problem right now is seeing if that's the case and if I can get the sample downloader working for running tests to fix things.

  4. Michael Johnson

    I just looked, and search actually uses both methods. If you call with API 2.1 and a user login, it'll use the API search (which returned more info than the page parser). If you don't login, then it resorts to the older page scraping that still works in theory.

    I'm still working on a more complete fix, but you can make the following changes to get title info for a non-logged-in request that should get you back up and running:

    In the file Parser/TitleParser.php, go to line 34 or so. Change input[@name="aid"] to input[@id="myinfo_anime_id"] and input[@name="mid"] to input[@id="myinfo_manga_id"] a few lines below.

    This is specific to the develop branch, which is the only working code branch right now, and the one it looks like you're using anyway.

  5. Fribb reporter

    Since I couldn't find the TitleParser.php file I searched for the aid field and found it in the AnimeParser.php and changed it to the ID used on myanimelist but still doesn't work.

  6. Michael Johnson

    Fixes are in place for the issues I could find in what pages I could test against. You need to make sure to update to the latest code on the develop branch to get things working. Based on the filename you are either on the master branch or using the very old 2.1 release.

  7. Log in to comment