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

Dataset Export: Metadata character causing json parsing error, schema.org export fail and subsequent 500 error #8358

Closed
kcondon opened this issue Jan 21, 2022 · 5 comments
Assignees

Comments

@kcondon
Copy link
Contributor

kcondon commented Jan 21, 2022

https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/J9TLXT

Something in the metadata is causing schema.org export to fail with a json parsing error, posting a blank file allows dataset to load.

So, this ticket is to:

  1. identify latest failing char to be fixed.
  2. consider once again:
    -allowing the dataset page to load despite one or more export failures
    -allowing the page to be loaded in a raw mode that can be used for troubleshooting/fixing.
@djbrooke
Copy link
Contributor

Thanks @kcondon for creating this issue!

@pdurbin pdurbin added the Small label Feb 9, 2022
@pdurbin
Copy link
Member

pdurbin commented Feb 9, 2022

Export goes to /tmp initially. You might be able to figure out the bad character.

The blank file workaround works because exports are cached. If a file exists, it will be served up rather than showing an error. If we remove the blank file, we can reproduce the error.

Consider loading native JSON locally to see if you can reproduce it.

It would be nice to more gracefully handle 500 errors when exporting.

@pdurbin
Copy link
Member

pdurbin commented Mar 16, 2022

I can't reproduce this in develop now that multi license (PR #7920) has been merged.

That's because the Schema.org JSON-LD output has changed. Instead of the following in 5.9 and below...

  "license": {
    "@type": "Dataset",
    "text": "My custom terms"
  },

... develop/5.10 and above now have a URL like this:

  "license": "http://localhost:8080/api/datasets/:persistentId/versions/1.0/customlicense?persistentId=doi:10.5072/FK2/N19IYT",

To reproduce this on demo (running 5.9):

  • Choose non-CC0 license
  • For "Terms of Use" enter Put "ditto" marks around it. as in the screenshot below.

140801467-0ed45a29-bcd0-4bcd-a257-0701ae77a953

On publish, the page will blow up with a 500 error like this:

Screen Shot 2022-03-16 at 4 28 02 PM

This issue is basically a duplicate of #8224. If we can't reproduce this post 5.9, should we close both? I'll put this in review for discussion.

@kcondon
Copy link
Contributor Author

kcondon commented Mar 23, 2022

@pdurbin @scolapasta The symptoms aren't exactly the same -the dataset is already published for instance, but I do still see an error when attempting to export the schema.org JSON-LD export, with the export page showing: {"status":"ERROR","message":"Export Failed"}

I am not seeing an error in server.log, however.

OK, the above was just a rehearsal seeing as prod is still on v5.9. I'll test again once it's on v5.10

@kcondon kcondon removed their assignment Mar 23, 2022
@kcondon kcondon self-assigned this Mar 23, 2022
@kcondon
Copy link
Contributor Author

kcondon commented Mar 28, 2022

This is working now for this dataset.

@kcondon kcondon closed this as completed Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants