The last component of the study does not want to finish and save the data
Dear All,
I have an experiment where the last component is just simple Screen HTML with just a message on the screen. And its timeout was set to 500 ms. Of the 4 participants who participated, the data was saved only for two, but for two the last component remained "forever" on the screen and the page with "This study is finished. Thank you for your participation" does not want to load. That's why I lost those two participants because it is pointless to participate twice in this research. What could have caused this behavior of JATOS? The experiment is complex and consists of over 20 components (several questionnaires, several tests programmed in JavaScript, etc.) and I also collect data about mouse movements in "event stream" form. So the final txt file with the results of one participant has about 4 MB. However, I repeat, for two participants the data was stored and everything went fine (!?) So what could have caused this problem?
Thank you very much for your reply,
Marko
Comments
Hi Marko,
That is unfortunate. Let's have a look. What do you mean with "its timeout was set to 500 ms"? This isn't one of JATOS' features, is it? It seems to be a component with only a few lines of code: Maybe you could post them here?
Best,
Kristian
Hi Kristian,
It is feature from lab.js. A timeout can be set for each component in the Behavior tab (see picture ->). I am normally using that to finish the experiment and write down the results.
Marko
Hi Kristian again,
Now I have another doubt: I use the VDC (Virtual Data Center) of our University on which we are allowed to install what we want. So I installed JATOS on it. And now I see that that server is "Not secured". Is it possible that this prevents saving the results?
Thank you again,
Marko
I can't imagine a scenario where a server without HTTPS does prevent your data from being saved, especially after you successfully run several other components.
So, this 500ms timeout is a feature of lab.js. I would need to see the actual source code that lab.js produces. I suspect the culprit is there. Can you please post it here? Or if you can't find it, send me the whole experiment file (if you prefer privately).
I sent you a private message.
I got your message and it contains a zip with a JSON file. But the JSON file is not what's running in a browser. I assume that is what lab.js produces? I'd need an actual JATOS archive (click the Export button in JATOS UI).
Ok, I sent you it privately.
Thank you,
Marko
Dear Kristian,
I've moved the research from our university's JATOS to Mindprobe and it seems to work fine there. Some problem seems to be on our server.
Marko
Dear Kristian,
Unfortunately, it doesn't even work on Mindprobe. Sometimes the data is written, sometimes not. I don't see the logic at all. Please help,
Marko
Hi Marko, I had hope to find something in your code, but since your experiment is in lab.js and lab.js is minified and difficult to debug I couldn't find anything. I suspect there is a problem in how lab.js handles your (short) timeout and using of jatos.js' study flow functions, but again their is no easy way for me to check. You could head over to lab.js' Slack channel but it seems to be down: https://lab.js.org/resources/support/. Another thing that comes to my mind is to put your last lab.js component into an JATOS component: there you have full control over it but you have to do it yourself in HTML/JS. But don't know how feasible this is for you. Sorry, I couldn't help any further.
Hi Kristian, First, thanks so much for trying to help! I have just one more question. You say this: "I suspect there is a problem in how lab.js handles your (short) timeout and using of jatos.js' study flow functions..." Does this mean that the experiment could be more stable if I set timeout of the last component to a longer time instead of 500ms? Thanks in advance for your reply, Marko
Could be. It's a hunch.
Another thing that comes to my mind: have you updated to the latest version of JATOS? It fixes a bug (maybe not really a bug actually), where participants cannot finish it's study in case they have a bad internet connection and even after 5x retrying to send the result data doesn't help. Without the fix jatos.js just stops at this point - with the fix jatos.js tries to continue (and accept the temporary data loss) with the next request. I'm not sure this will help in your case.
Greetings,
First of all, I transferred the study to Mindprobe and I had a problem with Mindprobe. So it's not up to JATOS (if you maintain JATOS properly :-)). And now I can finish by explaining how I solved the problem: After I split the study into two parts and after each part has a little more than 2 mb of data (instead of over 4 mb in total) everything works fine. However, it is not good that there is such a problem on JATOS (even on Mindprobe). The whole problem was due to the "excessive" amount of data being collected. I don't know if the problem is in JATOS, data transfer or even in the browser, but the problem obviously exists.
Marko
Hi Marko! Hm. JATOS has by default a upper limit of 5 MB per sending of result data (by using
jatos.submitResultDataorjatos.appendResultData). Are you sure about the 2 MB size of your data? Maybe they are 2 MB in a file on your computer but larger when send over the network? Anyway, there is an easy way to circumvent this quota: send your data in several chunks viajatos.appendResultData(or usejatos.uploadResultFile). Best, Kristian