buxx / trsync

Tracim synchronization tool
MIT License
13 stars 2 forks source link

bug: directory content not uploaded to Tracim server #82

Open yvan-algoo opened 1 month ago

yvan-algoo commented 1 month ago

Hi again Bux :-),

I ran trsync manually with a simple command:

./trsync ~/Tracim/ <Tracim FQDN> <space ID> <username>

I then moved from the trsync client a directory called docs-tech to ~/Tracim. When looking on the Tracim server, the directory has indeed been created but not its content (a few text files). Here is the log of trsync:

[2024-09-23T18:55:10Z INFO  trsync::run2] Proceed event Local(DiskEventWrap("docs-tech", Created("docs-tech")))
[2024-09-23T18:55:10Z INFO  trsync::operation::operator] Proceed event : Local(DiskEventWrap("docs-tech", Created("docs-tech")))
[2024-09-23T18:55:11Z INFO  trsync::remote::watcher] remote event : content.created.folder (159504)
[2024-09-23T18:55:11Z INFO  trsync::run2] Proceed event Remote(Created(ContentId(159504)))
[2024-09-23T18:55:11Z INFO  trsync::operation::operator] Ignore event (planned ignore) : Remote(Created(ContentId(159504)))

Process was still running but printed nothing after this line.

Here are the corresponding apache log on the server:

172.18.0.1 - - [23/Sep/2024:18:55:11 +0000] "POST /api/workspaces/682/contents HTTP/1.1" 200 1143 "-" "-"
172.18.0.1 - - [23/Sep/2024:18:55:11 +0000] "GET /api/workspaces/682/contents/159504 HTTP/1.1" 302 486 "-" "-"
172.18.0.1 - - [23/Sep/2024:18:55:11 +0000] "GET /api/workspaces/682/folders/159504 HTTP/1.1" 200 1201 "https://server_fqdn/api/workspaces/682/contents/159504" "-"
172.18.0.1 - - [23/Sep/2024:18:55:11 +0000] "GET /ui/login HTTP/1.1" 200 11083 "-" "Go-http-client/1.1"
172.18.0.1 - - [23/Sep/2024:18:55:11 +0000] "GET /api/workspaces/682/contents/159504 HTTP/1.1" 302 487 "-" "-"
172.18.0.1 - - [23/Sep/2024:18:55:11 +0000] "GET /api/workspaces/682/folders/159504 HTTP/1.1" 200 1201 "https://server_fqdn/api/workspaces/682/contents/159504" "-"

I then stopped and restarted trsync with the same command: files were uploaded immediately. In trsync logs, the following lines appear for each file:

[2024-09-23T19:06:14Z INFO  trsync::operation::operator] Proceed event : Local(DiskEventWrap("docs-tech/foo.md", Created("docs-tech/foo.md")))                                       
[2024-09-23T19:06:15Z INFO  trsync::remote::watcher] remote event : content.created.file (159508)                                                                                        [2024-09-23T19:06:15Z INFO  trsync::remote::watcher] remote event : content.modified.file (159508)                                                                                       
[2024-09-23T19:06:15Z INFO  trsync::remote::watcher] remote event : content.modified.file (159508)
[2024-09-23T19:06:33Z INFO  trsync::run2] Proceed event Remote(Created(ContentId(159508)))                                                                                               
[2024-09-23T19:06:33Z INFO  trsync::operation::operator] Ignore event (planned ignore) : Remote(Created(ContentId(159508)))                                                              [2024-09-23T19:06:33Z INFO  trsync::run2] Proceed event Remote(Updated(ContentId(159508)))                                                                                               
[2024-09-23T19:06:34Z INFO  trsync::operation::operator] Ignore event (planned ignore) : Remote(Updated(ContentId(159508)))                                                              [2024-09-23T19:06:34Z INFO  trsync::run2] Proceed event Remote(Updated(ContentId(159508)))                                                                                               
[2024-09-23T19:06:34Z INFO  trsync::operation::operator] Proceed event : Remote(Updated(ContentId(159508)))

./trsync --version: basic 0.3.2

Thanks, Yvan

buxx commented 1 month ago

Look a bug. I take a look.