openneuro icon indicating copy to clipboard operation
openneuro copied to clipboard

DOI minting failure

Open effigies opened this issue 3 years ago • 2 comments

Describe the bug This issue is resolved by deleting and repopulating the cache for the dataset, but I'm opening this in case there's something to be done to avoid it in the future...

To Reproduce Steps to reproduce the behavior:

  1. Go to https://openneuro.org/datasets/ds004302/snapshot
  2. Set changelog to "Initial release"
  3. Click "Create version"
  4. See Error: DOI minting failed.

From console:

 TypeError: Cannot read property 'filter' of undefined
    at Object.registerSnapshotDoi (/srv/packages/openneuro-server/dist/libs/doi/index.js:62:39)
    at createIfNotExistsDoi (/srv/packages/openneuro-server/dist/datalad/snapshots.js:64:58)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) 

So it seems to be at L67 in:

https://github.com/OpenNeuroOrg/openneuro/blob/fd4d356ca0e88b7a061e0c1feceb07968feed50d/packages/openneuro-server/src/libs/doi/index.js#L62-L80

Where oldDesc is defined:

https://github.com/OpenNeuroOrg/openneuro/blob/fd4d356ca0e88b7a061e0c1feceb07968feed50d/packages/openneuro-server/src/datalad/snapshots.js#L55

It seems that retrieving the description() was failing to contain a defined Authors field. Deleting the cache resolved the issue.

effigies avatar Oct 26 '22 18:10 effigies

This is likely the cache is populated by a call that errors but doesn't have a status code or exception to prevent the cache from being populated.

nellh avatar Oct 26 '22 18:10 nellh

For what it's worth, prior to deleting the cache, I renamed the README from README.txt to README and dos2unixed it from UTF-16LE with carriage returns to UTF-8 with line feeds. I don't know if there's anything that might have been sensitive to either of those.

effigies avatar Oct 26 '22 19:10 effigies

I am seeing exactly the same issue for https://openneuro.org/datasets/ds004332/snapshot

melanieganz avatar Nov 09 '22 16:11 melanieganz

@melanieganz This seems to be a different issue. There isn't any data in ds004332 and resetting the cache doesn't produce any changes.

effigies avatar Nov 09 '22 16:11 effigies

Hmm, ok, I am trying to upload a single subject and it's taking forever...maybe then the upload stalls...I can't really see it.

melanieganz avatar Nov 09 '22 16:11 melanieganz

you were right, mine was another issue, our server being sooooo slow, after some time it resolved

melanieganz avatar Nov 09 '22 17:11 melanieganz

Ran into this again today. Deleting the cache resolved the issue.

effigies avatar Jan 17 '23 13:01 effigies

A recent release included a fix for this which seems to be working so far, so please reopen if you are still seeing this.

nellh avatar Mar 15 '23 23:03 nellh