Looks to me like those first two errors are happening in Double Check.
And I tried to trace it back myself to figure out the issue, but it’s kinda insane what’s happening.
Basically, SRSManager
isn’t even returning the default stage names map. However, since that’s WaniKani’s internal implementation and not part of a userscript, what seems like is actually happening is a script is modifying (or somehow deleting) the srsId
property of the internal subjectIdSRSMap
map.
Though that makes absolutely no sense to me.
I have doubts that Double Check itself is the problem, since myself and thousands of others use it, but you can always check out the Double Check topic and see if you can get help there after you’ve exhausted other options.
In any case, your next step should probably be to try again after disabling all other userscripts. If it works, then systemmatically reenable/disable them until you can narrow down which one’s causing the problem(s).
The third (and last) userscript error is in Heatmap, but that one I have seen before, myself.
Though it’s unlikely to be affecting your reviews, if you’d like to fix it, you can modify your Heatmap script locally with something like
This
Replacing these lines (around line # 52)
window.addEventListener('turbo:load', async (e) => {
setTimeout(main, 0)
})
}
With
}
window.addEventListener('turbo:load', async (e) => {
setTimeout(main, 0)
})
Essentially the only change here is moving the bracket up to before the addEventListener so that it’s properly added no matter what page you start on, which also ensures that it’s loaded after you finish a review session.
(What would be better, however, would be to define the anonymous function outside of the main
function, and then add a removeEventListener
call before it, so that future calls don’t end up recursively adding a new listener…, but it’s probably not too big of a deal, particularly if you’re regularly manually refreshing the page).
(though that would make the end of the main
function look something like this instead)
}
window.removeEventListener('turbo:load', call_main)
window.addEventListener('turbo:load', call_main)
}
function call_main() {
setTimeout(main, 0)
}
Anyway, and then you’ll want to do the following…
Replacing these lines (near line # 1097)
if (!document.getElementById('heatmap') || heatmap.getAttribute('position') != settings.general.position)
document.querySelector(position[0]).insertAdjacentElement(position[1], heatmap)
With
if (!document.getElementById('heatmap') || heatmap.getAttribute('position') != settings.general.position) {
let precedingSibling = document.querySelector(position[0])
if (!precedingSibling) return
precedingSibling.insertAdjacentElement(position[1], heatmap)
}
This will prevent the console error you’re seeing, as well as many of the side-effects there may or may not be.