empiricaly / empirica

Open source project to tackle the problem of long development cycles required to produce software to conduct multi-participant and real-time human experiments online.
https://empirica.ly/
Apache License 2.0
44 stars 8 forks source link

Data Missing from players.csv file #492

Closed emilygoodwin closed 6 months ago

emilygoodwin commented 7 months ago

Is there an existing issue for this?

What happened?

Finished experiments seem not to have all the information saved to the players.csv file. I am not sure if they're "in" the tajriba file (is it an export problem or an actual data-saving problem) but re-exporting the same tajriba file yields the same .csv.

Steps To Reproduce

Running 1.9.2, start 1 batch with 1 game. Complete that (will work fine).

Finish game, scp tajriba file to local, export locally. players.csv file will be missing participant identifiers, exit survey data for usually at least one participant.

When using earlier versions, I found that if I ran multiple games, it was only 1 participant from each game that was missing data. However, when running 1.9.2, I cannot run more than one game (without restarting the server and erasing the tajriba file) so I can't verify if that's true in 1.9.2. I believe the 'can't run more than one game' problem is unrelated- I will comment on the other relevant issues.

Empirica Version

Version: v1.9.2
SHA:     1503d53
Build:   173
Branch:  main
Time:    2024-01-09T04:04:09Z

What OS are you seeing the problem on?

macOS, Other

What browser are you seeing the problem on?

Chrome, Safari

Relevant log output

Batch 01HKX4MRJC97MYK2REC0JFBHH0 changed status to "running"
20:51:28.707 ERR Error caught in "batch.status" callback:
20:51:29.207 ERR TypeError: Cannot read properties of undefined (reading 'get')
20:51:29.211 ERR   at Object.callback (/tmp/121f3729ba799437/src/callbacks.js:12:36)
20:51:29.211 ERR   at Object.next (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/cake.ts:322:30)
Batch 01HKX4BH1Q3BC4WDJ2GZHXWTCS changed status to "ended"
20:51:29.215 ERR Error caught in "batch.status" callback:
20:51:29.578 ERR TypeError: Cannot read properties of undefined (reading 'get')
20:51:29.579 ERR   at Object.callback (/tmp/121f3729ba799437/src/callbacks.js:12:36)
20:51:29.580 ERR   at Object.next (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/cake.ts:322:30)
20:51:29.580 INF server: started
20:51:34.546 ERR Error caught in "player.introDone" callback:
20:51:34.836 ERR ZodError: [
20:51:34.836 ERR   {
20:51:34.836 ERR     "code": "invalid_type",
20:51:34.837 ERR     "expected": "object",
20:51:34.837 ERR     "received": "undefined",
20:51:34.837 ERR     "path": [],
20:51:34.837 ERR     "message": "Required"
20:51:34.838 ERR   }
20:51:34.838 ERR ]
20:51:34.838 ERR ZodError: [
20:51:34.838 ERR {
20:51:34.838 ERR "code": "invalid_type",
20:51:34.838 ERR "expected": "object",
20:51:34.838 ERR "received": "undefined",
20:51:34.838 ERR "path": [],
20:51:34.838 ERR "message": "Required"
20:51:34.838 ERR }
20:51:34.838 ERR ]
20:51:34.839 ERR   at o7 (/tmp/121f3729ba799437/node_modules/zod/lib/index.mjs:449:23)
20:51:34.839 ERR   at Va.safeParse (/tmp/121f3729ba799437/node_modules/zod/lib/index.mjs:561:16)
20:51:34.839 ERR   at Va.parse (/tmp/121f3729ba799437/node_modules/zod/lib/index.mjs:541:29)
20:51:34.839 ERR   at Object.callback (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/classic/classic.ts:460:39)
20:51:34.839 ERR   at Object.next (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/cake.ts:322:30)
20:51:34.839 ERR   at runMicrotasks (<anonymous>)
20:51:34.839 ERR   at processTicksAndRejections (node:internal/process/task_queues:96:5)
20:51:34.839 ERR Error caught in "player.introDone" callback:
20:51:35.061 ERR ZodError: [
20:51:35.063 ERR   {
20:51:35.063 ERR     "code": "invalid_type",
20:51:35.063 ERR     "expected": "object",
20:51:35.063 ERR     "received": "undefined",
20:51:35.063 ERR     "path": [],
20:51:35.063 ERR     "message": "Required"
20:51:35.064 ERR   }
20:51:35.065 ERR ]
20:51:35.066 ERR ZodError: [
20:51:35.066 ERR {
20:51:35.066 ERR "code": "invalid_type",
20:51:35.066 ERR "expected": "object",
20:51:35.067 ERR "received": "undefined",
20:51:35.067 ERR "path": [],
20:51:35.067 ERR "message": "Required"
20:51:35.067 ERR }
20:51:35.067 ERR ]
20:51:35.067 ERR   at o7 (/tmp/121f3729ba799437/node_modules/zod/lib/index.mjs:449:23)
20:51:35.067 ERR   at Va.safeParse (/tmp/121f3729ba799437/node_modules/zod/lib/index.mjs:561:16)
20:51:35.067 ERR   at Va.parse (/tmp/121f3729ba799437/node_modules/zod/lib/index.mjs:541:29)
20:51:35.067 ERR   at Object.callback (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/classic/classic.ts:460:39)
20:51:35.067 ERR   at Object.next (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/cake.ts:322:30)
20:51:35.067 ERR   at runMicrotasks (<anonymous>)
20:51:35.067 ERR   at processTicksAndRejections (node:internal/process/task_queues:96:5)
20:51:35.068 ERR Error caught in "player.introDone" callback:
20:51:35.215 ERR TypeError: Cannot read properties of undefined (reading 'lobbyConfig')
20:51:35.216 ERR   at D9.get lobbyConfig (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/classic/models.ts:168:24)
20:51:35.216 ERR   at Object.callback (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/classic/lobby.ts:27:20)
20:51:35.216 ERR   at Object.next (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/cake.ts:322:30)
20:51:35.216 ERR   at runMicrotasks (<anonymous>)
20:51:35.216 ERR   at processTicksAndRejections (node:internal/process/task_queues:96:5)
20:51:35.216 ERR Error caught in "player.introDone" callback:
20:51:35.439 ERR TypeError: Cannot read properties of undefined (reading 'lobbyConfig')
20:51:35.439 ERR   at D9.get lobbyConfig (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/classic/models.ts:168:24)
20:51:35.439 ERR   at Object.callback (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/classic/lobby.ts:27:20)
20:51:35.439 ERR   at Object.next (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/cake.ts:322:30)
20:51:35.440 ERR   at runMicrotasks (<anonymous>)
20:51:35.440 ERR   at processTicksAndRejections (node:internal/process/task_queues:96:5)
Batch 01HKX4MRJC97MYK2REC0JFBHH0 changed status to "running"
20:51:35.441 ERR Error caught in "batch.status" callback:
20:51:35.693 ERR TypeError: Cannot read properties of undefined (reading 'get')
20:51:35.693 ERR   at Object.callback (/tmp/121f3729ba799437/src/callbacks.js:12:36)
20:51:35.693 ERR   at Object.next (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/cake.ts:322:30)
20:51:35.693 ERR   at runMicrotasks (<anonymous>)
20:51:35.694 ERR   at processTicksAndRejections (node:internal/process/task_queues:96:5)
Batch 01HKX4BH1Q3BC4WDJ2GZHXWTCS changed status to "ended"
20:51:35.694 ERR Error caught in "batch.status" callback:
20:51:35.781 ERR TypeError: Cannot read properties of undefined (reading 'get')
20:51:35.781 ERR   at Object.callback (/tmp/121f3729ba799437/src/callbacks.js:12:36)
20:51:35.782 ERR   at Object.next (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/cake.ts:322:30)
20:51:35.782 ERR   at runMicrotasks (<anonymous>)
20:51:35.782 ERR   at processTicksAndRejections (node:internal/process/task_queues:96:5)
Batch 01HKX4MRJC97MYK2REC0JFBHH0 changed status to "running"
management: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE3MDQ5ODM1MzUsImV4cCI6MTcwNTA2OTkzNSwianRpIjoiand0X25vbmNlIiwidHlwZSI6Im1hbmFnZW1lbnQiLCJ2ZXJzaW9uIjoyLCJuYmYiOjE3MDQ5ODM1MzUsImFjY2Vzc19rZXkiOiI2NTU5MTc2ODY4MTExZjZmZTRiNTdlNTcifQ.wV8CvHlNd3TtycnlcoT5HJkDOw4RgkApYFvuyWHDXSs
templateID: 65591de4c75a69c5f81034f4
All rooms created, and all roomCodes set!
Round 0
Batch 01HKX4MRJC97MYK2REC0JFBHH0 changed status to "terminated"
20:51:42.615 ERR Error caught in "batch.status" callback:
20:51:43.015 ERR TypeError: Cannot read properties of undefined (reading 'get')
20:51:43.016 ERR   at Object.callback (/tmp/121f3729ba799437/src/callbacks.js:12:36)
20:51:43.016 ERR   at Object.next (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/cake.ts:322:30)
Batch 01HKX4BH1Q3BC4WDJ2GZHXWTCS changed status to "ended"
20:51:43.017 ERR Error caught in "batch.status" callback:
20:51:43.231 ERR TypeError: Cannot read properties of undefined (reading 'get')
20:51:43.231 ERR   at Object.callback (/tmp/121f3729ba799437/src/callbacks.js:12:36)
20:51:43.231 ERR   at Object.next (/tmp/121f3729ba799437/node_modules/@empirica/core/src/admin/cake.ts:322:30)
20:51:43.232 INF server: started
root@ubuntu-s-1vcpu-512mb-10gb-sfo3-01:~# ^C
root@ubuntu-s-1vcpu-512mb-10gb-sfo3-01:~# empirica version
Version: v1.9.2
SHA:     1503d53
Build:   173
Branch:  main
Time:    2024-01-09T04:04:09Z
root@ubuntu-s-1vcpu-512mb-10gb-sfo3-01:~# ^C

Anything else?

Ubuntu on the remote server (where the experiment is served) and MacOS 11.7.10 locally (where it is bundled). I included the log out put that I got, which has errors that are I believe unrelated to the data-dropping issue- I get data dropped even from the first game in the batch, which produced no errors.

Code of Conduct

npaton commented 6 months ago

This should be fixed in the latest release (1.9.6). You should be able to upgrade your project and run with a tajriba.json file created with an older version, and you should see all the data. This is a rewrite of export, so please tell me if you notice any inconsistencies with the previous version or any other problems.