Hi Jatos-experts,
currently I am piloting my study (using JsPsych, Jatos and Prolific) and am facing some issues, one of which is related to saving/uploading the data generated during an experimental session. For some participants, the experiment runs smoothly and data is saved just as I want/would expect it to. But for some subjects files are either not saved at all or just the first few.
For instance, one participant reported that they completed all the trials, got to the final page saying "you finished and will be redirected to Prolific" but then redirection failed. For this participant only the first 3 files (out of 12) were saved.
Data is saved in 2 different ways (because there are different tasks):
1. after 30 seconds of audio recordings, the audio file is saved (as base64 string) before the next trial starts.
on_finish: function(data){
var outname = "whisper" + filecount_whisp + ".json"
var resultCsv = jsPsych.data.get().json();
jatos.uploadResultFile(resultCsv,outname)
filecount_whisp = filecount_whisp +1;
}
2. data are saved at the very end of the component:
on_finish: function() {
var interaction_data = jsPsych.data.getInteractionData().json();
jsPsych.data.addProperties({
interactData:interaction_data
});
jatos.uploadResultFile(trial_info_rand, 'randomized_trial_info.json')
var resultData = jsPsych.data.get().json();
jatos.uploadResultFile(resultData, "task1.json") / save in file
jatos.submitResultData(resultData, jatos.startComponentByPos(8))
}
In case of failure, the state reported for the component was RESULTDATA_POSTED. Is it possible that I use the wrong jatos.js function to save the data and this causes the problem? I have read somewhere in the thread that it may be better not to save during the experiment but rather at the very end?
I would be very happy about any help solving this issue.
All the best,
Christina