Hi @franklin,
I’m running into similar problems as documented in this thread already, and I know you are already working on a fix, but I thought perhaps additional information about experience might be helpful.
Basically, I’m getting the same ServerParseError (Unexpected toekn < in JSON at position 0
). This happens right after all the “transferring” is done (below, the Transferring "sub-26/ses-2/func/sub-26_ses-2_task-self_run-2_physio.tsv.gz" - 100% complete
is the “end” of my dataset).
Transferring "sub-26/ses-2/func/sub-26_ses-2_task-self_run-2_events.tsv" - 100% complete
Transferring "sub-26/ses-2/func/sub-26_ses-2_task-self_run-2_physio.json" - 100% complete
Transferring "sub-26/ses-2/func/sub-26_ses-2_task-self_run-2_physio.tsv.gz" - 100% complete
{ SyntaxError [ServerParseError]: Unexpected token < in JSON at position 0
**strong text**at JSON.parse (<anonymous>)
at /usr/lib/node_modules/openneuro-cli/node_modules/apollo-link-http-common/lib/index.js:35:25
at processTicksAndRejections (internal/process/task_queues.js:86:5)
name: 'ServerParseError',
response:
Response {
size: 0,
timeout: 0,
[Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
[Symbol(Response internals)]:
{ url: 'https://openneuro.org/crn/graphql',
status: 504,
statusText: 'Gateway Time-out',
headers: [Headers],
counter: 0 } },
**[** statusCode: 504,
bodyText:
'<html>\r\n<head><title>504 Gateway Time-out</title></head>\r\n<body bgcolor="white">\r\n<center><h1>504 Gateway Time-out</h1></center>\r\n</body>\r\n</html>\r\n' }
During this process, however, it did create a new (Unnamed) dataset on openneuro (ds002545), yet without any files/information/metadata. Now, when I retry the upload (openneuro upload --dataset ds002545 -i my_bids_dir
), it starts reuploading again from the start, with the exception of some small files (README, dataset_description.json, participants.json, participants.tsv; see below). Then, it crashes with the same ServerParseError again, yet this time not at the end (at sub-24 this time).
Adding files to "ds002545"
bids-validator@1.4.0
Summary: Available Tasks: Available Modalities:
621 Files, 9.78GB other T1w
26 - Subjects self bold
2 - Sessions events
physio
If you have any questions, please post on https://neurostars.org/tags/bids.
Skipping existing file - "README"
Skipping existing file - "dataset_description.json"
Skipping existing file - "participants.json"
Skipping existing file - "participants.tsv"
Transferring "code/convert_logfiles.py" - 100% complete
Transferring "code/convert_phys2bids.py" - 100% complete
Transferring "derivatives/physiology/sub-01/figures/sub-01_ses-1_task-other_physio_alignment.png" - 100% complete
...
Transferring "sub-24/ses-1/func/sub-24_ses-1_task-self_run-1_bold.nii.gz" - 37% complete (52.3 MB remaining)
{ SyntaxError [ServerParseError]: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at /usr/lib/node_modules/openneuro-cli/node_modules/apollo-link-http-common/lib/index.js:35:25
at processTicksAndRejections (internal/process/task_queues.js:86:5)
name: 'ServerParseError',
response:
Response {
size: 0,
timeout: 0,
[Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
[Symbol(Response internals)]:
{ url: 'https://openneuro.org/crn/graphql',
status: 502,
statusText: 'Bad Gateway',
headers: [Headers],
counter: 0 } },
statusCode: 502,
bodyText:
'<html>\r\n<head><title>502 Bad Gateway</title></head>\r\n<body bgcolor="white">\r\n<center><h1>502 Bad Gateway</h1></center>\r\n</body>\r\n</html>\r\n' }
Every time I retry uploading after the second time, It immediately crashes (after `Adding files to “ds002545”):
Adding files to "ds002545"
{ SyntaxError [ServerParseError]: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at /usr/lib/node_modules/openneuro-cli/node_modules/apollo-link-http-common/lib/index.js:35:25
at processTicksAndRejections (internal/process/task_queues.js:86:5)
name: 'ServerParseError',
response:
Response {
size: 0,
timeout: 0,
[Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
[Symbol(Response internals)]:
{ url: 'https://openneuro.org/crn/graphql',
status: 504,
statusText: 'Gateway Time-out',
headers: [Headers],
counter: 0 } },
statusCode: 504,
bodyText:
'<html>\r\n<head><title>504 Gateway Time-out</title></head>\r\n<body bgcolor="white">\r\n<center><h1>504 Gateway Time-out</h1></center>\r\n</body>\r\n</html>\r\n' }
At this point, the “My dashboard” page on openneuro.org shows the (Unnamed) dataset, but when I click on it, it just shows “Loading dataset” …
Some more info: I’m using openneuro version 3.11.2 and node version v11.14.0. I don’t have any very large nifti files in my dataset (the largest file is 165 MB).
Hope this helps you in debugging this issue!
If you need more info, let me know.
Best,
Lukas