Joghurt's Techblog

Unable to use GUI on QNAP TS-412 NAS

I am using a QNAP TS-412 NAS with firmware 3.8.3 Build 20130426.

Yes, I know, there is a new major firmware version, but after updating to that I had problems with my hard drives, which are not on the compatibility list (which I only discovered way after having purchased them, since they work with said firmware 3.8).

Therefore, I can't update.

But that is not the problem: When using the graphical user interface I encounter a timeout 19 out of 20 times that prevents me from doing anything (which is quite annoying - but if you found this article in the depths of the internet I won't have to tell you this).

But I found the root cause and a solution to the problem: There is a JavaScript function that tries to get the date from a string that should contain something like "Jan" or "Feb" or so, and does this by comparing it to an array of names. The problem is that something seems to not work here (any longer? Because it once did) and the string seems to be off. The determination loop, on the other hand, only increments over the array without checking for its ending and therefore works as an infinite loop.

To fix the problem, connect to your NAS (using ssh or sftp or whatever) and modify the file "/mnt/ext/home/httpd/cgi-bin/html/home.js". Change "while(c[b]!=g){b++}" to "while(c[b]!=g&&b<12){b++}" to make sure it stops the loop and continues with the code after going through all possible month names and you're good.