Experiment no longer works after updating to JATOS 3.7.1
Hey!
I made an experiment that ran perfectly on version 3.6.1, which I hosted on MindProbe (a server service running JATOS). However, it recently updated to 3.7.1 and now my experiment doesn't work. The issues are present both when running JATOS 3.7.1 locally and on MindProbe so I don't think the issue lies with them (when locally running 3.6.1 there are also no issues)
The main problem seems to be that, when using devtools (f12), I'm getting absolutely bombarded with the same error message (300 a second). The error message reads:
httpLoop.js:96 undefined http://127.0.0.1:9000/publix/21e2f74c-afff-48c4-8da7-e1e6f0c91742/8177d32e-aae6-4090-a4b2-4bbc077c75ae/undefined 501 (Not Implemented)
This refers to httpLoop.js, which is part of JATOS's webpack: webpack://jatos.js/./javascripts/httpLoop.js
Don't really understand what the JATOS webpack thing is supposed to do but I think they made some changes to it in 3.7.1 so that's probably why it's giving the error. The error message seems to refer to this section in httpLoop.js:
// Actual sending of data
var data;
if ("data" in request) {
data = request.data;
} else if ("blob" in request) {
data = new FormData();
data.append("file", request.blob, request.filename);
}
xhr.send(data); // <<< this line specifically is giving the error message
}
This error message keeps popping up regardless of what I do; I've even gone as far as removing the entire experiment and most of the HTML but once I add the line <script src="jatos.js"></script> to my HTML it starts giving the error.
I don't really understand why it's giving the error and what the error means, I'm not using anything with xhr.
In practice, the experiment somehow still runs for 2 of the 4 sections. I have 4 sections with a certain amount of trials, but after the second section, it skips to the last two slides. I don't understand why but since it worked perfectly well in 3.6.1 I'm pretty sure it has something to do with the update and the error message that I'm getting.
It also still saves the data for the completed trials in JATOS, so if I could get the last sections to work I could also just ignore the bombardment of error messages but understanding why I'm getting the error will probably lead me to the solution for the experiment.
Any ideas why I might be getting the error, and how to solve it?
Comments
Hi,
I've seen those 501 error with a colleague of mine. But there it was solved with rebooting the computer - something that probably won't help in your case.
The thing is that since 3.7.1 we use Webpack to pack jatos.js and its dependencies into one minified file (smaller file and less requests). Although the JS is still the same there might be issues with the way Webpack changes them.
But there is a version 3.7.2 out now that fixes another issue in the httpLoop.js and heartbeat.js. Have you tried this one out. It's on cortex.jatos.org already. It might fix your issue too.
Best,
Kristian
Hey,
Thanks for the advice!
A computer reboot does not solve the issue - I've had it for a week or two and rebooted plenty of times. 3.7.2 also does not seem to fix the error.
However, your advice did open my eyes to the possibility that it was an issue specific to my PC or browser. I attempted to run it on an old laptop and it works fine on that device, so I'll have to do some more testing to figure out if this happens on many devices or just my own PC.
Depending on how frequent this bug is, I might still have to fix the error. So if anyone else knows what's going on please do respond.
For now, though, we've made progress. Thanks again!
Hm, but I'm getting worried that there is some issue that only happens with a small subset of browsers (that apparently I do not have). Can you tell me more about your two laptops, like OS type, browser, version?
My PC(a desktop) uses chrome version 97.0.4692.99 (official build) (64-bit) while the laptop uses version 97.0.4692.71 (official build) (64-bit).
Both use the same version of windows 10 (build 19041.1415).
So if there's a chrome specific issue it's probably related to build version 97.0.4692.99.
There is a simlar GitHub issue now: https://github.com/JATOS/JATOS/issues/253
Hi @Purban, could you please check if those 501 errors still occur if you use Chrome's incognito mode? I have a hunch that one of your browser extensions interferes with JATOS.
Your hunch is correct!
It works in incognito, turns out the Metamask extension (a crypto wallet thing) was causing the errors.
I also found out what was causing the experiment to not fully run, which was an issue unrelated to the errors.
Thanks for the help!
Nice!