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

t [CombinedError]: [Network] with empirica export #474

Closed
2 tasks done
aliciamchen opened this issue Dec 27, 2023 · 1 comment
Closed
2 tasks done

t [CombinedError]: [Network] with empirica export #474

aliciamchen opened this issue Dec 27, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@aliciamchen
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

After getting the error in #473, I tried to export my data, and was not able to.

(I've been exporting by moving tajriba.json from the server to my computer, and it usually works this way)

Steps To Reproduce

No response

Empirica Version

Version: v1.8.12
SHA:     656d19b
Build:   159
Branch:  main
Time:    2023-12-26T07:14:40Z

What OS are you seeing the problem on?

macOS

What browser are you seeing the problem on?

No response

Relevant log output

empirica export
Setting up export environment...
13:17:32.239 INF exporting data args="npm run export -- --filename /Users/aliciachen/Dropbox/projects/adaptive_teaching/experiments/exp3/exp3-2023-12-27-13-17-32.zip --tajfile /Users/aliciachen/Dropbox/projects/adaptive_teaching/experiments/exp3/.empirica/local/tajriba.json --srtoken PFHdSUXYnatSDCzi"

> export@1.0.0 export
> npm run build && node --trace-warnings --enable-source-maps dist/index.js


> export@1.0.0 build
> esbuild src/index.js --platform=node --define:process.env.NODE_ENV='"production"' --bundle --minify --outfile=dist/index.js --sourcemap


  dist/index.js      1.5mb ⚠️
  dist/index.js.map  3.2mb

⚡ Done in 79ms

Exporting CSV to /Users/aliciachen/Dropbox/projects/adaptive_teaching/experiments/exp3/exp3-2023-12-27-13-17-32.zip 

Processing batches
 -> 34 records found.
Processing games
 -> 34 records found.
Processing playerGames
 -> 26 records found.
Processing rounds
 -> 650 records found.
Processing playerRounds
 -> 456 records found.
Processing stages
[t [CombinedError]: [Network] Invalid response body while trying to fetch http://localhost:60400/query: Premature close] {
  graphQLErrors: [],
  networkError: /Users/aliciachen/Dropbox/projects/adaptive_teaching/experiments/exp3/.empirica/local/export/node_modules/node-fetch/lib/index.js:400
                                reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err));
                                       ^
  
  FetchError: Invalid response body while trying to fetch http://localhost:60400/query: Premature close
      at PassThrough.<anonymous> (/Users/aliciachen/Dropbox/projects/adaptive_teaching/experiments/exp3/.empirica/local/export/node_modules/node-fetch/lib/index.js:400:12)
      at PassThrough.emit (node:events:525:35)
      at emitErrorNT (node:internal/streams/destroy:157:8)
      at emitErrorCloseNT (node:internal/streams/destroy:122:3)
      at processTicksAndRejections (node:internal/process/task_queues:83:21) {
    type: 'system',
    errno: 'ERR_STREAM_PREMATURE_CLOSE',
    code: 'ERR_STREAM_PREMATURE_CLOSE'
  },
  response: Xt [Response] {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: [Dt] },
    [Symbol(Response internals)]: {
      url: 'http://localhost:60400/query',
      status: 200,
      statusText: 'OK',
      headers: [er [Headers]],
      counter: 0
    }
  }
}
13:17:41.126 FTL empirica: failed to start error="npm run export -- --filename /Users/aliciachen/Dropbox/projects/adaptive_teaching/experiments/exp3/exp3-2023-12-27-13-17-32.zip --tajfile /Users/aliciachen/Dropbox/projects/adaptive_teaching/experiments/exp3/.empirica/local/tajriba.json --srtoken PFHdSUXYnatSDCzi: exit status 1"
13:17:41.128 FTL empirica: failed to start error="run export script: exit status 1"

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@aliciamchen aliciamchen added the bug Something isn't working label Dec 27, 2023
@npaton
Copy link
Contributor

npaton commented Jan 1, 2024

Hopefully this should be fixed in the latest release. I could not reproduce it, but I have found an issue that looks suspiciously similar. See the release notes if you're extremely interested in the details. Otherwise, with the update, empirica export should be using the latest version of nodejs, which should fix this issue. Please let me know if it's not the case. You might also want to upgrade the version of node you're using in the experiment, though this has had limited testing so far (all tests pass, but I can't say for sure), so up to you. If you want to, you can change the "volta" section in server/package.json and client/package.json to:

  "volta": {
    "node": "20.10.0",
    "npm": "10.2.3"
  },

@npaton npaton closed this as completed Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants