[Userscript] Wanikani Heatmap

Very well, I’ll attempt to wait it out, as I had been after reading similar reports above however it has been about 4 days (lining up with the latest update) since the troubles started. Thank you for the help.

1 Like

I wish I could be of more help, but the recent update was very small and could not be the direct cause of the problem (though perhaps there’s an indirect path somewhere)

1 Like

I pressed “Reload review data” within the heatmaps settings page, f5’d and the heatmap worked. The heatmap was not working on multiple devices on multiple browsers. No idea why, but all’s well that ends well.

1 Like

If I were to take a shot in the dark, I had done an excessive amount of reviews the day the heatmap stopped working (Jun 16), from 400 being my most reviews to 485. Perhaps something went wrong with the auto generated colours being recalibrated or something, idk, as I said, random shot in the dark.

1 Like

Oh yes, there is an issue with the script not being able to take advantage of some caching that WK does, and that can slow your reviews down as long as you have over 100 reviews remaining. They’re looking into making it work better with scripts, though

1 Like

I think they were talking about the Heatmap script, not Reorder Omega :wink:

1 Like

Haha, oops. I was wondering why I didn’t think of the caching earlier, I guess that’s why, lol. Sorry @razmic I was thinking about another script with my last post

1 Like

Hi, started up the heatmap script after not using it for a while. It is showing a scattering of reviews up to 3 years in the future:

Anyone have any idea what’s happening here?

Thanks

1 Like

That is curious. I wonder if there might be an issue with your data. Would you mind sending me an API token at kumi@kumirei.com so that I can have a look at it when I get the time?

2 Likes

Will do, thanks

2 Likes

I’m also getting 503’s from the server and haven’t had a working heatmap for a week or so.

Some of the requests go through fine, but one just hangs for a while and then returns the 503. Is there some way we can follow up on the errors?

Request URL: https://api.wanikani.com/v2/reviews?page_after_id=2686366243&updated_after=2022-07-01T13%3A07%3A33.186019Z
Request Method: GET
Status Code: 503
Referrer Policy: strict-origin-when-cross-origin
Cache-Control: no-cache, no-store
Connection: keep-alive
Content-Length: 507
Content-Type: text/html; charset=utf-8
Date: Thu, 14 Jul 2022 15:48:49 GMT
Server: Cowboy

In the debug console this generates a JSON error:

Uncaught SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at XMLHttpRequest.received (:279:20)
at XMLHttpRequest.nrWrapper ((index):6:29851)

1 Like

As a follow up, I cleared all site data (from the debug console ‘Application’ tab, then the ‘Storage’ section and clicking on ‘Clear site data’ button with ‘including third-party cookies’ checked), and then requests started succeeding (albeit with a lot of 429 responds about ‘Too many requests’).

It looked like it was making progress, but then stopped when it got a ‘500’ (not ‘503’) error.

It’s pretty clear that I nuked the review cache, and it was trying to recreate it, so I waited a bit and then refreshed and it started making progress again. The second attempt also ran into 429 errors but then eventually seemed to be close to completing (the bar in the loading screen was filled), until one request stalled and then… returned a ‘503’ :frowning:

It looks like one particular review request is hitting some internal server error and then timing out (the 503 always comes after exactly 90 seconds of stalling).

I guess I’ll keep waiting and try again occasionally to see if it resolves itself…

1 Like

and after one more attempt just to see what would happen… it started working. :slight_smile:

so clearing all data and trying again several times might help… maybe.

1 Like

I only do 10-15 new lessons every day and do review whenever I have time, thus Wanikani Heatmap is very useful and very encouraging seeing those marked colors every new day.
Awesome!

2 Likes

I’m glad it resolved itself for you. Sadly I don’t think that there is anything that I can do about 5xx errors on my end

1 Like

Actually, since it doesn’t seem like WK is planning on doing anything about this I might see if I can fetch the reviews in smaller chunks. I really should take another look at the review cache script. I’m starting a new job soon, though, so I probably won’t have time for that for a while

1 Like

I have just had a look at this and there is indeed some weird stuff going on with your data, with reviews scheduled for as far into the future as 2025. The good news is that these are all hidden items (items deleted from WK), and I can safely just not include them in the forecast. I do wonder what caused that, however.

@Mods you may want to look into what is causing the review dates of hidden items to be a couple of years in the future. Of course it doesn’t matter as they are hidden, but it seems strange. Maybe you have a good reason for it?

5 Likes

@Taniotoshi This should be fixed in 3.0.51! Thank you for sending me your API key, it made it a lot easier for me to find the issue. You can now remove the key if you want to

2 Likes

Thanks very much

1 Like

Thanks for letting us know! I’ve passed the info on to the engineers.

4 Likes