flat icon indicating copy to clipboard operation
flat copied to clipboard

Issues with git commit when saving a version

Open proycon opened this issue 4 years ago • 3 comments

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.

proycon avatar Mar 09 '21 11:03 proycon

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 avatar Sep 08 '21 14:09 pirolen

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

pirolen avatar Sep 08 '21 14:09 pirolen

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.

pirolen avatar Oct 13 '21 11:10 pirolen

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.

savary avatar Jan 11 '24 14:01 savary

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 avatar Feb 07 '24 14:02 proycon

This should now be resolved in flat v0.11.4

proycon avatar Feb 07 '24 16:02 proycon