FAIL: Errors occurred during the experiment
When my online participants finish the study, most of the time they get the following message "Errors occurred during the experiment". Their data is saved, but the problem is that this screen is shown before JATOS can generate an MTurk confirmation code. (Also happens before I can redirect them to a URL, which is used by Prolific.co).
This error never occurs when I run and finish an experiment in my local browser.
Is this a bug on JATOS' side?
Any idea what might be happening?
This bug is super annoying given that it breaks the functionality of both MTurk and Prolific (which kind of defeats the purpose of it all...)

Comments
I kind of solved it by editing the "onFinishedhandler" function in the "jatos.js" file ("study_assets_root" folder of any JATOS-uploaded OSWeb experiment).
I made it so that even if errors occurred, it finishes successfully (and redirects back to Prolific) by using `jatos.endStudyAjax(true...` instead of `jatos.endStudyAjax(false...`
I can share the code if someone needs it (for now I can't figure out how to post it in a code block).
Hi Yavor,
I get that you are using JATOS with Mturk and Prolific and your experiment is done in OSWeb.
The "jatos.js" file you edited is actually one from OSWeb and not the jatos.js library from JATOS. It's unfortunately that they used the same filename, but it doesn't break anything.
I heard of this problem before. It's a problem in OSWeb's "jatos.js". I think it has to do with OSWeb not waiting for an request to finish and just goes on with the study which then if the study is going to finsh can lead to those error messages.
Actually using
jatos.endStudyAjax(true...instead ofjatos.endStudyAjax(false...shouldn't change much. It's more about how you handle the next step, e.g withjatos.endStudyAjax().done. There are examples in http://www.jatos.org/jatos.js-Reference.html#jatosendstudyajax but since JATOS 3.5.1 there an easier way withjatos.endStudyAndRedirect(http://www.jatos.org/jatos.js-Reference.html#jatosendstudyandredirect).Best,
Kristian
Hi guys
@kri is right. I've been frequently facing this problem myself. This has to do with the way that OpenSesame interfaces with Jatos. It's high on my priority list and once have the opportunity to work on osweb again, this is one of the first issues I'm going to tackle.
At the moment Osweb sends a trial response (or rather once the logger item is called) after each trial. The reason was that if an experiment doesn't finish successfully, not all data is lost if it is only retained locally by the client. However, I was not aware that the previous request needs to finish before a new one could be sent but now I am, I am going to take a different approach.