Thank you for looking into this! I updated the openneuro CLI and started the upload again. It’s uploading now, but I still get a lot of those errors, e.g.
ERROR Failed to transfer annex object SHA256E-s1418208-1613de2c792d0b3b5df9255c6f19fe9b26ca4fab24be9ab0470c4718d7da901b.ptseries.nii” after 3 attempts
How can I get the more complete logs that you mentioned?
I’m still getting the same problem: When I upload, I get a lot of “Failed to transfer annex object” errors. When I run it again, I get a permission error:
error: Uncaught (in worker "") (in promise) PermissionDenied: Permission denied (os error 13): copy '/home/ASDPrecision/data/bids_clean/sub-025/dwi/sub-025_acq-PA_dwi.bvec' -> '/tmp/openneuro_cli_openneuro.org_450a74891bbc49f6/ds007182/sub-025/dwi/sub-025_acq-PA_dwi.bvec'
at async Object.copyFile (ext:deno_fs/30_fs.js:1:2513)
error: Uncaught (in promise) Error: Unhandled error in child worker.
at Worker.#pollControl (ext:runtime/11_workers.js:1:3400)
The DEBUG logging didn’t produce much additional output either, I’m afraid.
Unfortunately, the issue persists. We’ve since tried updating the dataset from a different account (another admin on the project), and also tried creating a fresh dataset from that account. Both attempts fail with the same errors, and we still can’t upload the full dataset.
This is blocking us from submitting a revision of our data descriptor, and we can’t do that until the derivatives are publicly available. If it would help with troubleshooting, we’re happy to share the whole dataset, or parts of it, through another channel. We’d really appreciate any help getting this resolved.
Thank you for doing this, @effigies. However, it would be great if this could be solved in some way. I get the same error every time I try to make a change to the dataset. For instance, I tried adding the fMRIPrep output now and got a permission error again and couldn’t create a new version.
One detail in the earlier permissions check: the listing shows the dwi directory, but not the sub-025_acq-PA_dwi.bvec file inside it. After the next copy error, could you compare the permissions and ownership of that exact file at both paths in the error, including whether either is a symbolic link and its target?
Being able to edit the source file does not establish that the cached destination can be overwritten. A read-only destination or link target is one possibility to check, not a diagnosis. That would help separate the local copy failure from the remote snapshot problem; creating a snapshot on the server does not test the local destination.
Thank you, @bcidecoded, that’s very helpful. I tried investigating the permissions, but ran into a separate error:
After clearing the openneuro and deno cache, I tried uploading the dataset again. The upload now fails with ENOENT: no such file or directory, open ‘/tmp/openneuro_cli_openneuro.org_…/ds007182/derivatives/fmriprep/sub-047/func/sub-047_task-farmers_run-09_desc-confounds_timeseries.tsv’. The file exists in my local dataset and is listed in the OpenNeuro web interface, but it isn’t in the CLI’s temporary copy.
I tried uploading the fmriprep output via the web interface and then couldn’t create a new version. Maybe that caused this issue?
That is a different failure from the earlier permission error: the path in this message is in the CLI’s temporary repository. The file appearing on the website does not tell us whether that local path is a regular file, an annex symlink, or absent.
One possibility worth distinguishing is a dangling link in that temporary copy. In the current CLI code, the non-annexed-file path opens the destination for writing or copies into it. A destination symlink whose target is missing can fail even when the source file is readable. That is a hypothesis to check, not a diagnosis of your dataset.
Before clearing the cache again, could you share the current CLI version, the full error stack and the last upload-stage message, plus ls -l and readlink output for that exact temporary TSV path and the corresponding source path? readlink returning nothing for an ordinary file is expected. No TSV contents are needed.
Those details would help distinguish a missing directory or checkout entry from a missing link target, and show where the CLI is trying to open it. I would keep the failed temporary repository intact for that check; the web upload followed by a snapshot failure is not enough on its own to identify the cause.
Thank you again for your thoughtful suggestions, @bcidecoded
The ENOENT error for the TSV file has gone (unclear why, as nothing changed between uploads), but the original permission error is back. I ran ls -l and readlink on the .bvec file named in the error:
The owner permissions are the important part here. Your temporary file is -r--rwxr--: owner r--, group rwx, others r--. If the CLI is running as jmbathe, Linux uses the owner bits; it does not fall back to the more generous group bits. So that account can read this cached file but cannot overwrite it. The different group names are not needed to explain that failure. The directory being writable does not make the existing file writable.
You can check this without changing anything, in the same shell/account used for the upload:
id
test -w '/tmp/openneuro_cli_openneuro.org_5a6102646fa54371/ds007182/sub-025/dwi/sub-025_acq-PA_dwi.bvec' && echo writable || echo not-writable
If that confirms jmbathe and not-writable, a narrow test would be to add owner-write permission to only that regular file in the temporary copy, then retry the upload. Keep the source dataset and its ACLs unchanged; no recursive permission change or sudo is needed. Record the original mode first, as you already have here. If it then fails on another cached file with the same mode, that would point towards how the CLI creates or reuses these copies, rather than a group-membership problem.
The Linux permission rules describe this owner-first check. I could not open the attached log in my browser, so this is based on the listing you pasted, not a review of the full log. It also does not explain the earlier TSV error, which has disappeared.
It’s exactly ss you predicted: after chmod u+w on sub-025_acq-PA_dwi.bvec in the temporary copy (id showed jmbathe; test -w gave not-writable before the chmod and writable after), the upload now fails on the bvec file for sub-025. So, it does indeed seem like the CLI copies the source file’s read-only owner permissions into its temporary copy.
I only added the group so that we can share the dataset locally. So, I can just create a new copy and give my user read and write permissions before uploading everything. Hopefully, that will resolve the upload problems.
That before/after test confirms the owner-write problem for the file you checked. A separate upload copy with owner read/write permissions sounds like a sensible next test, while leaving the shared source and its group permissions unchanged. Make it an independent copy rather than a hard-linked copy, so permission changes do not affect the original.
One detail to pin down: your update names the sub-025 bvec again. Did the next error name a different file, or the same path as before? If it is the same path, checking its current test -w result would help distinguish a new read-only temporary copy from a different failure. Keeping the exact new error line with CLI version 5.10.2 would also give the maintainers a useful reproduction.
The writable check is progress; I would wait for a completed upload before calling the issue resolved.
ApolloError: Failed to create snapshot: 400 Bad Request
EditAnnexedFileException('unexpected {path} content')
My dataset contains approximately 658 GB of multimodal sleep data from 149 participants. The dataset is uploaded, and OpenNeuro’s BIDS validator reports Valid, but every attempt to create the initial snapshot fails with the same error.
Troubleshooting completed:
Verified the local dataset (657,856,885,893 bytes; 10,171 files).
Confirmed that the local Git HEAD and OpenNeuro remote main point to the same commit (af3da8850f5709fedd603da863e6b4c471fb14fa).
Successfully accessed the remote Git repository using the OpenNeuro CLI credential helper.
Identified 57 historical unused Git-annex objects from previous uploads and file replacements. These are no longer referenced by the current dataset tree.
Confirmed that temporary tmp filenames are absent from the current Git HEAD.
Despite these checks, snapshot creation remains unsuccessful. I have not deleted or modified any historical annex objects.
I have already submitted support tickets, including #13133, and contacted OpenNeuro by email, but have not received a resolution for nearly a month. The support form is currently unavailable as well.
Could someone from the OpenNeuro development team please help investigate the server-side snapshot creation process, identify the specific file or repository state causing the error, and advise how to repair the existing dataset without re-uploading approximately 658 GB?
I would also appreciate confirmation that the existing Draft will be preserved while this issue is being investigated, as I need to obtain a DOI and make the dataset available for manuscript review.