QualitativeDataRepository / AnnoREP-Frontend

Frontend for the AnnoREP tool to Restructure, Edit, and Publish annotations
https://anno-rep.org
MIT License
1 stars 1 forks source link

All interactions with Hypothesis fail #164

Closed adam3smith closed 7 months ago

adam3smith commented 7 months ago

System and Software

Page or Route

Description

Uploading a manuscript with new annotations to be extracted fails, as does exporting annotations. When trying to upload with new annotations for a project with existing annotations: Error! Cannot read property 'filter' of undefined Deleting annotations from data project 29374 failed. image

When trying to upload with new annotations where no previous annotations exist: image

Notes

Here's Jim's initial troubleshooting:

I don't see any nginx issue - the 400 error does appear to be from the client - I see it in the logs in docker. I'm wondering if there's an issue with the recent library updates to the client. The not of type 'object' error seems to suggest the json payload is wrong. It appears valid but what is actually sent is the stringified version - https://github.com/QualitativeDataRepository/AnnoREP-Frontend/blob/4344c944be32afc[…]3e717f9f126/pages/api/hypothesis/%5Bid%5D/export-annotations.ts - I wonder if that used to be allowed but now one has to just send the json itself. (One of the library updates was related to axios.) I don't know for sure - have found some things that say stringify isn't necessary, but I haven't found something saying it breaks things. I can try making that change if To isn't around, but it's all new code to me and I mostly guessing.

tohuynh commented 7 months ago

With the #165 merged, I tested three scenarios on stage: exports annotations, upload manuscript and start new annotations, upload manuscript and don't start with new annotations. All seems to work.

adam3smith commented 7 months ago

Yup, working again here, too, please merge to prod as well. Appreciate the quick action on this.

adam3smith commented 7 months ago

tested and confirmed fix on prod