openneuro icon indicating copy to clipboard operation
openneuro copied to clipboard

unable to upload with exception: (node:13391) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property `affirmedDefaced` of 'undefined' or 'null'.

Open yarikoptic opened this issue 3 years ago • 0 comments

Describe the bug

Cannot upload the dataset, getting

TypeError: Cannot read property 'id' of null
    at DatasetPage.render (/srv/packages/openneuro-app/src/dist/server/server.js:7444:26)
    at d (/srv/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:35:231)
    at bb (/srv/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:36:16)
    at a.b.render (/srv/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:42:43)
    at a.b.read (/srv/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:41:83)
    at exports.renderToStaticMarkup (/srv/node_modules/react-dom/cjs/react-dom-server.node.production.min.js:51:446)
    at /srv/node_modules/@apollo/client/react/ssr/ssr.cjs.js:85:21
    at new Promise (<anonymous>)
    at process (/srv/node_modules/@apollo/client/react/ssr/ssr.cjs.js:83:16)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

if I visit freshly (presumably) created new dataset ds003649

To Reproduce Steps to reproduce the behavior:

  1. installed outdated client following workaround for #2113
  2. docker container for the beast is available from repronim/openneuro-tools:0.0.20210510-3
  3. ran openneuro create-dataset

which gave us a little confusing UI suggesting to select/check multiple items but when we pressed enter on the first it just proceeded:

singularity:openneuro-tools-0.0.20210510-3.simg > beast:/data/R01/bids/Brain/wpc-7642.datalad$ openneuro create-dataset
? Please affirm one of the following: All structural scans have been defaced, obscuring any tissue on or near the face that could potentially be used to reconstruct the facial structure.
^[[B
-----------------------------------------------------
Your OpenNeuro client is out of date (v3.31.1). We strongly recommend you update to the latest version (v3.32.4) for an optimal experience.
-----------------------------------------------------

Dataset https://openneuro.org/datasets/ds003649 created.
Git remote: https://openneuro.org/git/3/ds003649

NB. not sure about the source of ^[[B...

  1. attempt to upload leads to
singularity:openneuro-tools-0.0.20210510-3.simg > amanelis@beast:/data/R01/bids/Brain/wpc-7642.datalad$ openneuro upload --dataset ds003649  .
Adding files to "ds003649"
(node:13391) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property `affirmedDefaced` of 'undefined' or 'null'.
    at uploadDataset (/usr/local/lib/node_modules/openneuro-cli/src/actions.js:55:23)
    at Command.upload (/usr/local/lib/node_modules/openneuro-cli/src/actions.js:169:7)
    at Proxy.listener (/usr/local/lib/node_modules/openneuro-cli/node_modules/commander/index.js:315:8)
    at Proxy.emit (events.js:198:13)
    at Proxy.EventEmitter.emit (domain.js:448:20)
    at Proxy.Command.parseArgs (/usr/local/lib/node_modules/openneuro-cli/node_modules/commander/index.js:651:12)
    at Proxy.Command.parse (/usr/local/lib/node_modules/openneuro-cli/node_modules/commander/index.js:474:21)
    at Object.<anonymous> (/usr/local/lib/node_modules/openneuro-cli/src/cli.js:84:11)
    at Generator.next (<anonymous>)
    at bl (/usr/local/lib/node_modules/openneuro-cli/node_modules/esm/esm.js:1:245412)
(node:13391) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:13391) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Expected behavior

A clear and concise description of the upload process.

Desktop (please complete the following information):

  • OS: Debian running in a singularity image built from docker repronim/openneuro-tools:0.0.20210510-3

yarikoptic avatar May 12 '21 15:05 yarikoptic