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

Stopped running on docker after data collection #496

Closed bencebago closed 5 months ago

bencebago commented 6 months ago

Is there an existing issue for this?

What happened?

After we finished data collection, involving around 100 participants, the experiment stopped working from docker file (both on server and local). Empirica export did not work either. It seems to us that the datafile cannot be read by the experiment, when the experiment starts up.

Steps To Reproduce

Running the following docker file on our experiment: FROM ubuntu:jammy ENV PRJ=build WORKDIR /opt/${PRJ}

RUN apt update; apt install curl rsync esbuild -y RUN curl https://install.empirica.dev | sh

COPY ${PRJ} . RUN cd /opt/${PRJ} RUN empirica upgrade RUN empirica bundle

ENTRYPOINT [ "empirica", "serve", "bigsister-v2-new.tar.zst" ]

Empirica Version

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

Client:  1.9.2
Server:  1.9.2

What OS are you seeing the problem on?

macOS, Windows, Other

What browser are you seeing the problem on?

Does not apply

Relevant log output

Error: Unhandled error. (connect ECONNREFUSED 127.0.0.1:3000)
    at Ri.We.emit (/tmp/95b9bd877f7123fd/node_modules/@empirica/tajriba/src/events.js:146:14)
    at error (/tmp/95b9bd877f7123fd/node_modules/@empirica/tajriba/src/tajriba.ts:332:9)
    at Object.emit (/tmp/95b9bd877f7123fd/node_modules/graphql-ws/lib/client.mjs:104:21)
    at ye.K.onerror (/tmp/95b9bd877f7123fd/node_modules/graphql-ws/lib/client.mjs:162:47)
    at Ku (/tmp/95b9bd877f7123fd/node_modules/ws/lib/event-target.js:290:14)
    at ye.i (/tmp/95b9bd877f7123fd/node_modules/ws/lib/event-target.js:230:9)
    at ye.emit (node:events:513:28)
    at Yu (/tmp/95b9bd877f7123fd/node_modules/ws/lib/websocket.js:1033:13)
    at ClientRequest.<anonymous> (/tmp/95b9bd877f7123fd/node_modules/ws/lib/websocket.js:880:5)
    at ClientRequest.emit (node:events:513:28) {
  context: Is {
    [Symbol(kTarget)]: ye {
      _events: [Object: null prototype] {
        error: [Function: i] {
          [Symbol(kIsForOnEventAttribute)]: true,
          [Symbol(kListener)]: [Function (anonymous)]
        },
        close: [Function: i] {
          [Symbol(kIsForOnEventAttribute)]: true,
          [Symbol(kListener)]: [Function (anonymous)]
        },
        open: [Function: i] {
          [Symbol(kIsForOnEventAttribute)]: true,
          [Symbol(kListener)]: [AsyncFunction (anonymous)]
        },
        message: [Function: i] {
          [Symbol(kIsForOnEventAttribute)]: true,
          [Symbol(kListener)]: [Function (anonymous)]
        }
      },
      _eventsCount: 4,
      _maxListeners: undefined,
      _binaryType: 'nodebuffer',
      _closeCode: 1006,
      _closeFrameReceived: false,
      _closeFrameSent: false,
      _closeMessage: Buffer(0) [Uint8Array] [],
      _closeTimer: null,
      _extensions: {},
      _paused: false,
      _protocol: '',
      _readyState: 2,
      _receiver: null,
      _sender: null,
      _socket: null,
      _bufferedAmount: 0,
      _isServer: false,
      _redirects: 0,
      _autoPong: true,
      _url: 'ws://localhost:3000/query',
      _req: null,
      [Symbol(kCapture)]: false
    },
    [Symbol(kType)]: 'error',
    [Symbol(kError)]: Error: connect ECONNREFUSED 127.0.0.1:3000
        at __node_internal_captureLargerStackTrace (node:internal/errors:477:5)
        at __node_internal_exceptionWithHostPort (node:internal/errors:655:12)
        at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1247:16) {
      errno: -111,
      code: 'ECONNREFUSED',
      syscall: 'connect',
      address: '127.0.0.1',
      port: 3000
    },
    [Symbol(kMessage)]: 'connect ECONNREFUSED 127.0.0.1:3000'
  }
}
{"level":"fatal","error":"npm run --silent serve -- --token MhWIPwwXGxJbYnlI --url http://localhost:3000/query --sessionTokenPath /opt/build/.empirica/local/callBackSessionToken: exit status 1","time":"2024-01-30T09:15:19.735413773Z","message":"empirica: failed to start"}
{"level":"error","error":"exit status 1","time":"2024-01-30T09:15:19.737249016Z","message":"serve: failed server command"}

Anything else?

No response

Code of Conduct

bencebago commented 6 months ago

The new version seems to be incompatible with the old data, and it does not read it, so empirica export cannot work.