[Guide] What to do if a userscript does not work

Things to check

(The first two steps are mainly targeted at issues where the script doesn’t seem to do anything at all.)

a) Make sure that you are looking at the right place

Read the entire description of the script. Which pages is it supposed to affect? Lessons? Reviews? The dashboard? Does it only affect kanji? Or maybe just vocabulary? After you made sure that you know what the script is supposed to do and confirmed that it does not match that expectation, continue to the next step.

b) Check if your userscript manager is executing the script

When you click on the userscript manager extension icon, the popup should list all scripts that are running on the current page. If you are on a page that should be affected by the script, but the script is not listed in the popup, check if your userscript manager is disabled. If it is not, report your problem in the userscript’s thread.

Tampermonkey example

In this example screenshot of the Tampermonkey popup you can see that Tampermonkey is enabled, but Keisei and Rendaku Information are disabled. If the script you are having problems with is disabled, you just have to enable it by clicking on the switch left to it.

c) Are there any dependencies missing?

Did the script author mention any required scripts? Many scripts require Open Framework to work correctly. If it is required and you haven’t installed it yet, go to the installation instructions and install it.

d) Make sure you are using the latest version of the userscript

If you have just installed the script, you should already be on the latest version. Otherwise visit the script’s installation link and make sure that you have the newest version.

e) Does the problem persist if all other scripts are disabled?

If you are using more than one userscript they might conflict with each other. Disable all other userscripts that are not required by the problematic script [1] and reload the page. If the script still doesn’t work, skip to the next step.

Otherwise, if the script now works, you know that it conflicts with one of your other scripts. To find out with which one exactly, you can reactivate them one by one, reload the page after each one, and check if everything still works. As soon as it stops working you have found the conflicting script. Report the conflict in the thread of one of the two userscripts (and maybe also post a link to your bug report in the other script’s thread so that the author/maintainer of that script is aware of the conflict too).

f) Does the problem persist if all other browser extensions are disabled?

Are you using other browser extensions (for example an adblocker) aside from your userscript manager (Tampermonkey, …)? Try disabling all of them except for your userscript manager, reload the page, and check if anything has changed. If the script still doesn’t work, skip to the next step.

Otherwise, if the script is working now, then there is a conflict between the script and one of your browser extensions. To find out with which one exactly, you can reactivate them one by one, reload the page after each one, and check if everything still works. As soon as it stops working you have found the conflicting browser extension. Report the conflict in the thread of the userscript to see if anything can be done about it. Or, depending on the conflicting browser extension, you might be able to change a setting in the extension to disable it on wanikani.com.

g) Check for any errors or warnings in the browser console

While on the page which should be affected by the script, open the browser console to check for any errors or warnings:

Chromium-based browser (Chrome, Edge, Brave, Opera, Vivaldi, ...)

Windows/Linux: Ctrl+⇧ Shift+J
Mac: ⌘ Cmd+⌥ Option+J

Firefox

Windows/Linux: Ctrl+⇧ Shift+K
Mac: ⌘ Cmd+⌥ Option+K

Safari
Make sure you have Develop Menu enabled

Choose Safari > Preferences, click Advanced, then select “Show Develop menu in menu bar.” [2]

⌘ Cmd+⌥ Option+C

Take a screenshot [3] of the console and include it in your bug report in the userscript’s thread.

h) Maybe your browser's security settings are too strict for the userscript to work

Before resorting to this step, you should probably just report your problem in the userscript thread and see if you can get help there. But if you are dead set on exhausting all your options before writing a bug report, you could try lowering your browser’s security settings for wanikani.com. In many browsers you can click the shield or the lock icon at the left end of the address bar to open a popup in which you can disable tracking prevention on the current page. [4]


What to include in the bug report

  1. Your browser (Chrome, Firefox, Safari, …)
  2. Your userscript manager (Tampermonkey, Violentmonkey, Userscripts, …)
  3. Maybe your Operating System (Windows, Mac, Linux, …)
  4. Maybe a screenshot [3:1] that showcases the wrong behavior
  5. Maybe a screenshot [3:2] of the errors and warnings in the browser console
  6. A link to the webpage where you expected the script to work
  7. A description of the problem and how to reproduce it
  8. What you have already checked/tried in an attempt to find/fix the problem

  1. If the script requires Open Framework, leave Open Framework enabled. ↩︎


  2. Source ↩︎

  3. How to take a screenshot

    Windows 10: ⊞ Win+⇧ Shift+S
    Mac: ⌘ Cmd+⇧ Shift+4

    Draw a rectangle around the region you want to screenshot and then paste it into your bug report. ↩︎ ↩︎ ↩︎

  4. ↩︎

21 Likes

I thought it might make the process of fixing userscript problems easier and faster if there were a list of common steps to narrow down the problem, which can then be referenced by users and linked to by userscript authors.

I neither have an Apple device, nor Windows 11 or the Opera browser, so I wasn’t able to test the corresponding instructions. If you notice any mistakes (including grammar mistakes) or have suggestions for improvement of the post, let me know. Depending on the number of suggestions, it might be easier to turn the post into a wiki.

7 Likes

Really well done in putting this together!

3af6p7

5 Likes

Looking for help with troubleshooting. My scripts are no longer working with violentmonkey even though it shows them being detected and loaded in the browser.

If I disable violentmonkey and enable tampermonkey, they work normally even though they both have the exact same scripts enabled. I also didn’t change any settings.

Which web browser are you using? Can you post a screenshot of the browser console? I have just tested Ultimate Timeline with Violentmonkey in Edge, and everything works for me. Have you tried it with just Open Framework and Ultimate Timeline enabled to see if this changes anything?

I’m on Firefox. I got it to work by enabling synchronous page mode in Violentmonkey. Not sure why this has to be enabled now as the equivalent setting does not need to be enabled in tampermonkey. Disabling all but open framework and ultimate timeline with synchronous disabled still doesn’t work, however it does work with synchronous enabled.

There are 3 errors about wkof if I disable synchronous mode, which do not appear with synchronous mode enabled

1 Like

Do you have set Open Framework to run before all other scripts?

It is, this is my load order

image

I have now tested it with Firefox and Violentmonkey, and the problem you are seeing happens for me as well. It seems that Violentmonkey is unable to inject the scripts in page context and instead has to fall back to content context. Open Framework requires the scripts to be injected in page context, otherwise it doesn’t work.

I don’t know why Firefox+Violentmonkey stopped working, maybe one of them released an update that breaks the page injection. Maybe it will get fixed in the future, maybe not.

You said that it works if you try it with Tampermonkey instead – can you just switch to Tampermonkey altogether, or is there a problem with this solution?

2 Likes

I’ll likely just leave it how it is for now and see if there are any problems. So far I haven’t noticed any. It’s strange that it worked fine all this time. I do still have Tampermonkey installed in case it does break. At least I was able to confirm that it’s not just on my end.

And to somewhat answer the question above, I switched from Tampermonkey simply because I think the UI is nicer and it’s open source.

2 Likes

strokeorder
Any advice on the Stroke Order script not showing up on Chrome with ViolentMonkey? This is the first script I’ve installed.

Does it not work on any page? For example, if you go to the kanji page of 上, does the stroke order diagram not appear near the top of the page?


Doesn’t look like it, I’m not seeing it anywhere

Do you have version 1.1.21 of the Stroke Order script installed? And can you check in the browser console (step g in the top post) if there are any related errors?


I have 1.1.21… A lot comes up on the browser console, too much to screenshot, but am not sure what specifically I should be looking for.

You can also copy & paste the console output.

One thing you could also try is to use Tampermonkey instead of Violentmonkey.


Yeah, I was originally going to, but this turned me off… Really appreciate all the help so far anyways though!


hello everyone,
Its been a while since I used to web version of wanikani and now it seems I cannot run any scripts. I tried every step in the guide and still couldnt fix it. Im using chrome with tampermonkey. I also cant access greasyfork if thats relevant. I read most of the threads tried using firefox or violetmonkey but still no success. Any ideas?