Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

JATOS did not save data in the MRI scanner!


I had a first pilot of my study in an MRI scanner, using a local installation of JATOS (3.7.1) on the stimulus computers. I played the task myself the day before the scanning day on the same computer, and it worked perfectly well, and it saved all the data needed. However today I had a participant in the scanner, and for some reason, the data was not saved.

This is the code I have at the end of the study:

var resultJson =;

  if(jatos.studyJsonInput.task_type == "MRI") {
  jatos.endStudyAndRedirect("",true,"VERIFIED FINISHED MRI -SG");

In the results section, I do see a "VERIFIED FINISHED MRI -SG" message, so clearly it has executed the submitResultData line. I also saw on the screen something like "Saving data/submitting data", and I waited for the overlay to disappear, but I found ultimately that there was not data.

I have two questions:

  1. Any intuitions on why that may have happened? My guess is that when I played the task on the scanner PC but not during an actual scan, there were not many scanner triggers. I am saving an array with all the scanner triggers on every jsPsych trial's data parameter, and I wonder if it makes the resulting data file too large, and that may have caused JATOS to crash. Perhaps it was the case that even the overlay disappeared, the file save was not complete, and I closed the browser prematurely.
  2. Is there a way to retrieve the study data even if it was not completely saved in jatos? Perhaps through the browser or some logs that JATOS may be keeping?

I have collected about 100 participants online with the same script, so it is unlikely that there is any bug in the code itself. Since MRIs tend to be expensive, I have to get to the root of this issue, or at least have an alternate way of saving data!

Please let me know your thoughts. It would be very much appreciated.


  • Hi,

    In the results section, I do see a "VERIFIED FINISHED MRI -SG" message, so clearly it has executed the submitResultData line.

    This is strange. If you can see the message all result data should have been sent. What do you see in the JATOS' result page: Are there no result data at all? What is the state of the study, is it FINISHED?

    1) It can happen that to much data crashes JATOS. But then you need a substantial amount of data or many studies that run in parallel. I can't imagine this happened in your case with only one study running. But to be sure you can have a look in JATOS' application.log (go to the Administration page -> Logs -> application.log) and search for 'exception' or 'error'. Are you sure the overlay disappeared before you closed the browser? Usually this disappearance is a clear sign that the sending of the result data finished.

    2) Sorry, there is no other way to retrieve the data after you closed the browser.

    Some other questions / remarks I have:

    • Your code looks fine. It should work.
    • Are there any error messages in your browser's developer tools console when you run your study?
    • Those other participants ("I have collected about 100 participants online"), did you use an older JATOS for this or a different system?



  • And just to add: it might be worth adding (and testing - unfortunately you'd need the scanner running to send the triggers for that) saving data after every block, and not just at the very end of the study.

    Another question I had: What do those triggers look like? Are they just time stamps every 4 s? In that case I don't see how they would increase the size of your data that much. How do you read them into your browser? Is it possible that something failed there?



  • Hi Kristin and Elisa,

    Thanks for your quick replies. These are good comments.

    @kri - Yes, the study state says "Finished", and yes I did close the browser after the overlay ended. I specifically waited, in fact, for the overlay to disappear. What I did not notice, though, is the redirect to "", and maybe that should have been a warning sign to not close the browser. Is it possible that the overlay disappears before the data sending finishes?

    And there were no error messages in the console, at least when I checked it at the 90% mark. I did not check at the end.

    For the previous participants, it runs on a 3.5.8 on my local machine and 3.6.1 on the server for online participants. The MRI one has the latest 3.7.1. Would that make any difference? I did test the task on the MRI machine once, so I would expect if there were version incompatibilities, it would have crashed when I played the task myself?

    @elisa Yes, that's what I plan to do. I'll save the data now at the end of every block. The scanner triggers are an array of timestamps after every ~2 seconds. So it's just a large array of about 7000 entries. I read them through a jsPysch event listener which listens for a '5' (scanner sends a trigger as a keyboard button press 5), and then I save that at every trial's jspsych data column. It is unlikely that the reading into the browser failed because I checked the console at around the 90% mark and everything was working as it should so I can't see why the browser would fail after that mark.

    Overall, only change I'm making is to save data after every block, and maybe turn the overlay for data saving 'off' so that participants don't see a loading wheel on screen while they play the task. Is there any other changes you'd recommend.

    A colleague suggested that they had a similar problem with JATOS a couple of times and after that they started manually copy pasting the data from the console to a text file as backup.

  • I'd recommend to try 100% of the experiment and check for errors in the browser's console. Newer JATOS versions have a 5 MB result data limitation by default (but one can change this: If a study reaches this limit JATOS returns an error that should be visible in the browser's console.

    And did you check for any exceptions or errors in the application.log?

    You could update to 3.7.2 too, but I don't think it will fix your issue.

    And last I want to state that your colleague's suggestion ('manually copy pasting the data from the console to a text') concerns me :/. JATOS exists to make this kind of hack obsolete. I hope we can fix your study.



  • Sorry I just saw this Kristian. I'll check for exceptions and errors more carefully the next time I visit the scanner.

    Yes I agree, i should not have to manually copy-paste in this day and age! I'm positive we can fix these errors. I'll write here if I encounter any more problems the next time I scan.

  • There is also a new version 3.7.3 that fixes a problem that happens in a subset of browsers. Maybe your browser was one of them.

Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games