[Userscript] Wanikani Heatmap

My heatmap hasn’t been working for about a week. The “Loading data…” dialog is getting stuck on “Wanikani reviews”. I’m using Firefox, and when I check the warnings/errors under Web Developer Tools, I see this particular message:

Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://api.wanikani.com/v2/reviews?page_after_id=2700065030&updated_after=2022-07-13T00%3A41%3A40.140560Z. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 503.

Is there a straightforward way for me to fix this?

Thank you!

1 Like

There is not. It seems to be a issue with the WK api. What you can do is really just keep refreshing the page until it does work, or go into the web console and enter review_cache.reload() to reload all stored reviews, until it works once. It may be a couple of months before I get the time to improve the review cache to make it a bit more robust when handling this error

4 Likes

Thank you @Kumirei ! I tried the review_cache.reload(), followed by hitting F5, and that worked.

I love this heatmap, it has certainly motivated me on my lazier days :slight_smile: Good luck on your new job!

1 Like

Hi! I’ve encountered a problem with my heatmap. I’ve started using wanikani in august last year and I haven’t missed a day of doing my reviews ever since. However, today I noticed that the heatmap suddenly shows that I missed a few days, when this isn’t the case.

This is a post I posted on my instagram after reaching my 300 days streak.

This is how my heatmap looks now. As you can see there are a few days missing now, but this was not the case before. Is there something I can do to fix this? My streak was my strongest motivator to do my reviews regularly, so losing it would be such a pity. Also I was really looking forward to my 1 year streak that is coming up :pleading_face:

2 Likes

Did you move to a different time zone? Did you change your setting for when the new day starts? (this is a Heatmap setting)

2 Likes

I am traveling but I’m staying in a country with the same timezone as mine (both are UTC/GMT+2). And didn’t change the heatmap settings.

1 Like

The script may somehow be confused about your local time. You could probably fix it until you get back by just setting the new day to start at something like 1 AM

1 Like

I just tried and there’s still a few days marked grey :cry: But you’re probably right, so I’ll just wait until I get home in two weeks and if I still have that issue I’ll come back here haha! Thank you so much!

EDIT: I just got back home and it was indeed a timezone problem! Everything is back to normal now, and in two days I’ll reach my one year streak! I’m so happy!

1 Like

It isn’t loading anymore… I haven’t added any scripts or changed anything. It was working yesterday I’m pretty sure. Other scripts are working, but the timeline for reviews script isn’t either. WK open framework complains in the console about trying to access dom elements that don’t exist anymore. I’ve tried reinstalling the script, but I’m not sure what else to try. Any suggestions?

1 Like

Can you take a screenshot of the error?

Hiya Kumi!

Something happened with my Heatmap. I am thinking it had an issue syncing up with Tsurukame? I did several reviews on Tsurukame on 9/21/2022 but Heatmap did not seem to recognize as it just showed me this morning that I lost my streak. I was not able to do any desktop reviews on 9/21/2022, hence my inference above. But my streak! Oh no!
:sob:

Heatmap image

Not sure what was wrong this time but I have done Tsurukame-only reviews in the past and it has not affected my Heatmap at all.

Any assistance would be much appreciated. As always, thank you very much for the scripts you have so generously shared to many like me. :upside_down_face:

1 Like

Make sure that Tsurukame has submitted (synced) the reviews to Wanikani. Once they’re in Wanikani the Heatmap will pick them up. If you believe that they are already in Wanikani you can try reloading your reviews in the Heatmap settings

If that doesn’t work out you can send me an API key and I’ll look at your timeline

1 Like
response to Kumi

Hi Kumirei, appreciate your quick response regarding this. :grin:

I did. The review counts on Tsurukame and WaniKani match.

I logged in and out of WaniKani restarted my phone and my computer too. Heatmap still says I did not do any reviews on 9/21/2022. Heatmap is saying that the 87 reviews I did on the 21st as me doing it today, the 22nd.

Is is okay of I send it via Discord so it is not public?

1 Like

Sorry for the late reply. Here’s the whole console. I expanded the mentioned error line, but it looks like its related to another extension? Not super sure frontend stuff is definitely not my strong suit.



1 Like

Looks like bulk add synonyms is causing it. Did you try disabling that script?

Looks like that script has been broken for a while (according to myself half a year ago)


I tried disabling it, and it made that top line for the timelines extension pop up, but not fully (also not really the thing i care about lol. I’ve had it the entire time and it hasn’t caused issues until now fwiw.

With it disabled the console now gives:


1 Like

@rfindley do you recognize this error?

I don’t, but it sounds like maybe corrupt object data stored in indexeddb. I’d suggest clearing indexeddb.

1 Like

I’m not sure how to do that. is it a setting in the extension or something?

1 Like