Skip to content

Data is saved when ran locally or via web app but not when ran by Prolific subjects #3330

Answered by jodeleeuw
Hadil0520 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Hadil0520,

It looks like you are saving data in the experiment on_finish event and you are redirecting participants to Prolific's completion page in the completeSubmission trial. You've got a 100ms delay, between the end of the trial and the redirect. This is probably not enough time for the update to be submitted to firebase. I'd suggest moving the redirect to inside the saveSubjectData function, after you await the update to the database. This should ensure that the data are written before exiting the page.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Hadil0520
Comment options

Answer selected by Hadil0520
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants