Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck in sending data #306

Open
chenyu-psy opened this issue Apr 11, 2024 · 1 comment
Open

Stuck in sending data #306

chenyu-psy opened this issue Apr 11, 2024 · 1 comment

Comments

@chenyu-psy
Copy link

Hi,

I am using jsPsych to program my experiment and JATOS 3.8.1 to host it. There is one issue that has been troubling me for a long time since our IT uploaded JATOS from 3.7.x to 3.8.1: there are always 10%-20% of participants who complain that they are stuck on the screen while sending data, and it takes forever.

Initially, I send data to jatos after each trial using the function jatos.appendResultData. Then I noticed that the data would never be sent again once the participants lost internet connection for a few seconds (I replicated this issue by turning off Wi-Fi for a few seconds).

Since then, I have started using the jatos.submitResultData function to transfer data to the server. In addition, I also use the navigator.onLine function to check the status of the internet when transferring data to the server. The data will only be submitted when the navigator.onLine function returns true.

However, there are still always 5%-10% of participants who report the same issue, and I cannot replicate it on my own laptop. I wonder if there are any potential problems that may cause the issue. It would be greatly appreciated if you could give me some suggestions.

Here is the code that I am using to transfer data

//@ts-ignore submit results to JATOS
jatos
  .submitResultData(resultJson)
  //@ts-ignore end the study
  .then(jatos.endStudyAjax(true, "FINISHED"))
  .then(() => {
    document.body.innerHTML = END_INFO.completedOnline[expInfo.LANG];
  })
  .catch((error) => {
    console.error("Failed to submit the results to JATOS", error);
  });
@kristian-lange
Copy link
Member

Hi, it might be / probably is related to issue #304. We are in the process of fixing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants