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

Uncaught TypeError: Cannot read property 'length' of undefined #32

Closed
chrisgorgo opened this issue Sep 1, 2017 · 10 comments · Fixed by bids-standard/bids-validator#307 or #53
Closed

Comments

@chrisgorgo
Copy link
Contributor

When trying to load https://openneuro.org/datasets/ds001049

Uncaught TypeError: Cannot read property 'length' of undefined
    at t.value (/app.min.4f999727.js:50)
    at t.value (/app.min.4f999727.js:50)
    at t.value (/app.min.4f999727.js:50)
    at c._renderValidatedComponentWithoutOwnerOrContext (/app.min.4f999727.js:38)
    at c._renderValidatedComponent (/app.min.4f999727.js:38)
    at c.mountComponent (/app.min.4f999727.js:37)
    at Object.mountComponent (/app.min.4f999727.js:40)
    at v.mountChildren (/app.min.4f999727.js:39)
    at v._createContentMarkup (/app.min.4f999727.js:38)
    at v.mountComponent (/app.min.4f999727.js:38)

We have a user stuck on this - it would be great to get it fixed in a timely manner.

@chrisgorgo
Copy link
Contributor Author

Happened after user tried to delete one of the .nii files.

@nellh nellh self-assigned this Sep 1, 2017
@nellh
Copy link
Contributor

nellh commented Sep 1, 2017

Looks like they deleted the only .nii file and that's important because it leads to a special case where the validator returns 'Invalid' instead of a list of errors.

I'm writing tests and a fix for this on the frontend but maybe it would be better to remove this special case from the validator? It would be more consistent to return a regular validator error quickTest fails.

@nellh
Copy link
Contributor

nellh commented Sep 11, 2017

Last step to finish this is to upgrade OpenNeuro to bids-validator@0.23

@nellh nellh reopened this Sep 11, 2017
@nellh
Copy link
Contributor

nellh commented Sep 11, 2017

@chrisfilo The bids-validator fixes prevent this from crashing the page but it is still impossible to recover from it. You can't add a subject because the directory is removed automatically and you can't create directories. You can delete the dataset and start over with these fixes and it's much clearer what went wrong with the error code.

Should we support adding subjects after upload so you can recover from this situation without recreating the dataset?

@chrisgorgo
Copy link
Contributor Author

Yes. Adding new subjects after upload is very useful when you run apps while still acquiring data.

nellh added a commit that referenced this issue Sep 15, 2017
This fixes #32 but affected datasets will need to be revalidated.
@nellh nellh closed this as completed in #53 Sep 15, 2017
@chrisgorgo
Copy link
Contributor Author

Even after update this error is still affecting this dataset. Maybe revalidation needs to be forced?

In addition, there is a new one as well now:

Uncaught TypeError: Cannot read property 'body' of undefined
    at scitran.js:169
    at o (request.js:131)
    at request.js:26
    at u.callback (client.js:615)
    at u.<anonymous> (client.js:415)
    at u.t.emit (index.js:133)
    at XMLHttpRequest.e.onreadystatechange (client.js:705)

@chrisgorgo chrisgorgo reopened this Sep 22, 2017
@chrisgorgo
Copy link
Contributor Author

The second error is probably #6

@chrisgorgo
Copy link
Contributor Author

I confirmed the original error on a connection not affected by #6

@nellh
Copy link
Contributor

nellh commented Sep 22, 2017

@chrisfilo I did miss revalidating this in my deployment steps. I just tried it now and ran into a problem with the dataset hashes not matching up. I'll put together a workaround tomorrow.

@nellh
Copy link
Contributor

nellh commented Sep 22, 2017

@chrisfilo I cleared the bad validation data but it looks like this dataset was deleted. Revalidation didn't work since the files are missing.

@nellh nellh closed this as completed Sep 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants