orgzly-revived / orgzly-android-revived

Outliner for taking notes and managing to-do lists
https://www.orgzlyrevived.com
GNU General Public License v3.0
677 stars 42 forks source link

WebDAV sync stopped working with v1.8.27-beta.2 #329

Open e11bits opened 2 months ago

e11bits commented 2 months ago

Please complete the following information:

Device:  Oppo Reno 12
Android Version: 14 (Color OS 14.1)
Orgzly Revived Version: v1.8.27-beta.2
Sync repository type (directory/Dropbox/WebDAV/Git):  WebDAV (Apache 2.4)

I setup the sync to the WebDAV repo with Orgzly v1.8.26 and the sync worked as expected (only the root org files were synced). Now with v1.8.27-beta.2 the sync always fails:

Sync failed: Error contacting https://dav.myserver.com/data/org/ (403)

In the settings I have the URL as: webdavs://dav.myserver.com/data/org and the working credentials.

The directory structure on the WebDAV dir is something like this:

image

What I can see on the server:

log with v1.8.27-beta.2: "PROPFIND /data/org HTTP/2.0" 401 381 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org HTTP/2.0" 301 240 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org/ HTTP/1.1" 301 162 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org/ HTTP/2.0" 401 381 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org/ HTTP/2.0" 207 782 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org/.orgzlyignore HTTP/2.0" 404 196 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org HTTP/2.0" 301 240 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org/ HTTP/1.1" 301 162 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org/ HTTP/2.0" 401 381 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org/ HTTP/2.0" 403 266 "-" "okhttp/4.10.0-RC1"

log with v1.8.26: "PROPFIND /data/org HTTP/2.0" 401 381 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org HTTP/2.0" 301 240 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org/ HTTP/1.1" 301 162 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org/ HTTP/2.0" 401 381 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org/ HTTP/2.0" 207 782 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org/.orgzlyignore HTTP/2.0" 404 196 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org HTTP/2.0" 301 240 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org/ HTTP/1.1" 301 162 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org/ HTTP/2.0" 401 381 "-" "okhttp/4.10.0-RC1" "PROPFIND /data/org/ HTTP/2.0" 207 10265 "-" "okhttp/4.10.0-RC1"

amberin commented 2 months ago

@e11bits Thanks, the server logs are useful. Have you tried looking at Orgzly's logcat output, with e.g. Logcat Reader?

I'm trying to think why the server would react with a 403. Do you know for sure that the Webdav server allows clients to access the subdirectories? (Can you access those directories successfully from another device?)

e11bits commented 2 months ago

I'm using Emacs to push the org files to the WebDAV server, which in turn is using gvfs. I can use nautilus to traverse the whole tree (also uses gvfs).

And it also works with cadaver for me:

~$ cadaver https://dav.myserver.com/data
dav:/data/> ls
Listing collection `/data/': succeeded.
Coll:   org                                    0  Sep 25 16:25
dav:/data/> cd org
dav:/data/org/> ls
Listing collection `/data/org/': succeeded.
Coll:   iefeife                                0  Sep 25 16:24
Coll:   fies                                   0  Sep 25 16:24
Coll:   eifeier                                0  Sep 25 16:24
Coll:   ncncncnn                               0  Sep 25 16:24
Coll:   ieiedeel                               0  Sep 25 16:24
Coll:   zmwpalskdj2xhejt                       0  Sep 25 16:24
Coll:   ezasd                                  0  Sep 25 16:24
        agendas.org                        10441  Sep 25 16:24
        checksums.dat                       1152  Sep 25 16:25
        jdjdjd.org                         17911  Sep 25 16:24
        index.org                           1072  Sep 25 16:25
        mobileorg.org                          1  Sep 25 16:21
        nsnn.org                            7183  Sep 25 16:24
dav:/data/org/> cd iefeife 
dav:/data/org/iefeife/> ls
Listing collection `/data/org/iefeife/': succeeded.
        iefeife.org                        12233  Sep 25 16:24
        ghjsjjg.org                         6910  Sep 25 16:24

Have you tried looking at Orgzly's logcat output, with e.g. Logcat Reader?

No, sorry! This would be something I would have to figure out how to do first.

amberin commented 2 months ago

Logcat Reader is a simple app, you just install it, search for some string, then once you find the PID of Orgzly, you can filter logs on that.

e11bits commented 2 months ago

Installed Logcat Reader but saw no logs from Orgzly nor anything that seemed related.

amberin commented 1 month ago

Version 1.8.27 is now released. Subfolder support is off by default and must be toggled on, so you should be fine for now. I am hoping that we can get more eyes on this issue as more WebDAV users try subfolders (or confirmation that it works as expected for others).