proycon / flat

FoLiA Linguistic Annotation Tool -- Flat is a web-based linguistic annotation environment based around the FoLiA format (http://proycon.github.io/folia), a rich XML-based format for linguistic annotation. Flat allows users to view annotated FoLiA documents and enrich these documents with new annotations, a wide variety of linguistic annotation types is supported through the FoLiA paradigm.
GNU General Public License v3.0
111 stars 15 forks source link

Issues with git commit when saving a version #169

Closed proycon closed 9 months ago

proycon commented 3 years ago

Reported by @pirolen:

When I try to save versions, I get the error message “save failed: Unable to connect to the document server: Not Found [editor/revert]". I used to get this same error when I was running FLAT with the django development server.

A possibly related excerpt from the log:

2021-03-01 21:36:40 - Saving /home/flatuser/flateditor/foliadocuments/piro/FA-us140test_mwt_004.folia.xml -
2021-03-01 21:36:40 - Doing git commit for /home/flatuser/flateditor/foliadocuments/piro/FA-us140test_mwt_004.folia.xml --
2021-03-01 21:36:40 - ERROR during git add/commit of /home/flatuser/flateditor/foliadocuments/piro/FA-us140test_mwt_004.folia.xml in /home/flatuser/flateditor/foliadocuments
2021-03-01 21:36:40 - Unloading piro/FA-us140test_mwt_004

I'll have to investigate whether there is a bug here. At the very least the message from foliadocserve to FLAT is confusing.

pirolen commented 3 years ago

I seem to still have this issue with my current configuration (nginx). It also seems that undoing does not work, the History dialog box stays empty :-(

Screenshot 2021-09-08 at 13 41 58

Screenshot 2021-09-08 at 16 21 55

pirolen commented 3 years ago

I am attaching today's foliadocserver logs. foliaserverlog.txt

pirolen commented 3 years ago

Do you think I could send more logs, or any other info, which would be helpful in understanding what causes the error?

It would be great if saving versions and revoking annotations would work, then I could offer FLAT to an annotator to start testing it.

savary commented 10 months ago

We have the issue: when adding an annotation and clicking "save" we get the error message "save failed: Unable to connect to the document server: Not Found [editor/revert]". We checked though that the file is still saved on disk with the modification. So it seems that the error message is spurious.

proycon commented 9 months ago

I can indeed replicate the issue. Even the git commit succeeds but foliadocserve fails to return a correct reply. I'll prepare a fix.

Debug excerpt:

2024-02-07 14:52:48 - Saving /data/flat.docroot/flat/bbb2.folia.xml - test
2024-02-07 14:52:48 - Doing git commit for /data/flat.docroot/flat/bbb2.folia.xml -- add on t by proc.flat.d1ac54fc -- edit on t -- test                                                                                                        
[master e65a067] add on t by proc.flat.d1ac54fc edit on t test                                                                                                                                                                                  
 1 file changed, 7 insertions(+), 1 deletion(-)                                                                                                                                                                                                 
127.0.0.1 - - [07/Feb/2024:14:52:48] "GET /save/flat/bbb2/?message=test HTTP/1.1" 404 749 "" "Python-urllib/3.11"                                                                                                                               
Forbidden: /editor/flat/bbb2/save/                                                                                                                                                                                                              
10.0.2.100 - - [07/Feb/2024:14:52:48 +0000] "GET /editor/flat/bbb2/save/?message=test HTTP/1.1" 403 67 "http://localhost:8080/editor/flat/bbb2/" "Mozilla/5.0 (X11; Linux x86_64; rv:122.0) Gecko/20100101 Firefox/122.0" "-"
[pid: 71|app: 0|req: 100/262] 10.0.2.100 () {56 vars in 996 bytes} [Wed Feb  7 15:52:48 2024] GET /editor/flat/bbb2/save/?message=test => generated 67 bytes in 11 msecs (HTTP/1.1 403) 3 headers in 100 bytes (1 switches on core 0)
proycon commented 9 months ago

This should now be resolved in flat v0.11.4