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

Invalid JSON being sent back #2459

Closed
chrisseto opened this issue Aug 14, 2015 · 4 comments
Closed

Invalid JSON being sent back #2459

chrisseto opened this issue Aug 14, 2015 · 4 comments
Labels
Type: Bug a defect
Milestone

Comments

@chrisseto
Copy link

The JSON I'm referencing for this issue is located here
This is the data being returned at the time of this issue being created:

{"status":"OK","data":{"id":75394,"versionNumber":1,"versionMinorNumber":0,"versionState":"RELEASED","productionDate":"Production Date","lastUpdateTime":"2015-07-12T20:22:56Z","releaseTime":"2015-07-12T20:22:56Z","createTime":"2015-07-12T19:58:01Z","metadataBlocks":{"citation":{"displayName":"Citation Metadata","fields":[{"typeName":"title","multiple":false,"typeClass":"primitive","value":"Replication Data for: Hajcak & Foti (2008, Psychological Science)"},{"typeName":"author","multiple":true,"typeClass":"compound","value":[{"authorName":{"typeName":"authorName","multiple":false,"typeClass":"primitive","value":"Lewis, Melissa"},"authorAffiliation":{"typeName":"authorAffiliation","multiple":false,"typeClass":"primitive","value":"Reed College"}},{"authorName":{"typeName":"authorName","multiple":false,"typeClass":"primitive","value":"Pitts, Michael"},"authorAffiliation":{"typeName":"authorAffiliation","multiple":false,"typeClass":"primitive","value":"Reed College"}}]},{"typeName":"datasetContact","multiple":true,"typeClass":"compound","value":[{"datasetContactName":{"typeName":"datasetContactName","multiple":false,"typeClass":"primitive","value":"Lewis, Melissa"},"datasetContactAffiliation":{"typeName":"datasetContactAffiliation","multiple":false,"typeClass":"primitive","value":"Center for Open Science"},"datasetContactEmail":{"typeName":"datasetContactEmail","multiple":false,"typeClass":"primitive","value":"meli.lewis@gmail.com"}}]},{"typeName":"dsDescription","multiple":true,"typeClass":"compound","value":[{"dsDescriptionValue":{"typeName":"dsDescriptionValue","multiple":false,"typeClass":"primitive","value":"This is a replication of Hajcak & Foti 2008 for the Center for Open Science's Reproducibility Project."}}]},{"typeName":"subject","multiple":true,"typeClass":"controlledVocabulary","value":["Other","Medicine, Health and Life Sciences","Social Sciences"]},{"typeName":"depositor","multiple":false,"typeClass":"primitive","value":"Lewis, Melissa"},{"typeName":"dateOfDeposit","multiple":false,"typeClass":"primitive","value":"2015-07-12"}]}},"files":[{"label":"p1.eeg","version":1,"datasetVersionId":75394,"datafile":{"id":2693204,"name":"p1.eeg","contentType":"application/octet-stream","filename":"14e83d592d5-7f8df9c99e08","originalFormatLabel":"UNKNOWN","md5":"93cde7ca2e92a1f0a71f63706852e78a"}}]}

When run through a JSON parser I get the error
screen shot 2015-08-14 at 16 03 12

Adding a single } at the end fixed all the parsing.

The content-length header for the response was 2337 but the actual length of the data sent back was 2336 indicating that the final } got lost somewhere.

@pdurbin
Copy link
Member

pdurbin commented Aug 14, 2015

Wow. Crazy. The weird thing is that is seems to happen about half the time on "kirk" ...

curl -s -k https://kirk.lts.harvard.edu/api/datasets/2693203/versions/:latest-published | jq .
parse error: Unfinished JSON term

... but never on "picard". I discussed with @landreev and he's going to see if restarting kirk helps.

@pdurbin pdurbin added the Type: Bug a defect label Aug 14, 2015
@pdurbin
Copy link
Member

pdurbin commented Aug 14, 2015

Ok, after @landreev restarted "kirk" and now I can't reproduce the problem. Very strange to be losing bytes like that!

"kirk" and "picard" are configured the same way. Both are now fronted by Apache per #2180 for the record but I don't know if that's a factor or not.

Passing to QA. Thanks, @chrisseto!

@pdurbin pdurbin added this to the 4.2 milestone Aug 14, 2015
@chrisseto
Copy link
Author

@pdurbin, looks to be fixed, thanks for getting back so fast!

@kcondon
Copy link
Contributor

kcondon commented Sep 3, 2015

Closing based on user results.

@kcondon kcondon closed this as completed Sep 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug a defect
Projects
None yet
Development

No branches or pull requests

3 participants