OSS-DocumentScanner
OSS-DocumentScanner copied to clipboard
[BUG] webdav - undefined issue
Which app is your issue for
Document Scanner
Version
Android > 1.14.3 Build 119 IOS > 1.12.3 Build 60
What platform are you using?
Android
OS Version
Android 14 IOS 18.3
What happened?
- Webdav server windows server 2016 with iis and tryed with webdav strato hidrive
- try to sync pics or doc
- Issue undefinied
Relevant log output
Log IIS Windows Server 2016
2025-02-08 21:08:31 XXX.XXX.XXX.16 PROPFIND /webdav/Belege - 80 - XXX.XXX.XXX.55 okhttp/4.12.0 - 207 0 0 0
2025-02-08 21:08:31 XXX.XXX.XXX.16 PROPFIND /webdav/Belege - 80 - XXX.XXX.XXX.55 okhttp/4.12.0 - 207 0 0 53
2025-02-08 21:08:31 XXX.XXX.XXX.16 PUT /webdav/Belege/ti26e59tam26p_CR.pdf - 80 -XXX.XXX.XXX.55 okhttp/4.12.0 - 401 0 5 13
2025-02-08 21:10:43 XXX.XXX.XXX.16 PROPFIND /webdav - 80 - XXX.XXX.XXX0.55 okhttp/4.12.0 - 207 0 0 6
2025-02-08 21:11:03 XXX.XXX.XXX.16 PROPFIND /webdav/Belege - 80 - XXX.XXX.XXX.55 okhttp/4.12.0 - 207 0 0 15
from windows client
2025-02-08 21:07:14 1XXX.XXX.XXX.16 PUT /webdav/Belege/Neues+Textdokument.txt - 80 ***\administrator XXX.XXX.XXX.79 Microsoft-WebDAV-MiniRedir/10.0.19045 - 204 0 0 0
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
@reinzi thanks for the report! Is that a new error from latest release? I did a few webdav fixes, might be a regression. I have some reports from this. Do you have a SM-S901B ? I will need to add a few more logs in next release to understand this error. Once it is release i could need you to reproduce it again
@farfromrefug Tanks for und response Indeed i have the s22 Phone but we tryed with an Apple as well with the same result... If u see the logs ... in the put command the User is missing.... maybe??? And Sure i will try to help, if i can...
@reinzi thanks! i just released a new version. Dont think it will fix it but i should get more logs in the report. If you can reproduce the bug and let me know i can check the report
@farfromrefug yes the bug is still there unfortunately the message has not changed either 1.14.4 Build 120
@reinzi i got your report but some logs are missing :s i am having a hard time understanding what s going on. THere is one way to get more info. if you agree you can use https://httptoolkit.com/ (free and open source). Install on your computer and on your device. Connect the 2 . When connected trigger the error again. On your computer you will see the failing request. Please share with me the result from as request as shown in this image https://httptoolkit.com/images/product/http-toolkit-assets/explore-light-opt-1920.WEBP You can do it privately using my mail in app support in here https://play.google.com/store/apps/details?id=com.akylas.weather
@reinzi could you check, if you have a / behind your server address in your config in oss?
@farfromrefug
@reinzi great can you share with me the response of that request? i need to see the "text" response it returns. This is what the app is trying to "parse" and fails.
If it would help, my guesses are:
- You have configured the authentication in OSS wrong (not matching? you got an 401 error there)
- you have a / behind your address which ends up in // which is a not found place which you are thus unauthorized to access (which was the case for me)
So it is just an error not correctly displayed in OSS but a 'miss' in the configuration.
@cd-FileX it is actually almost certainly a bug. Only the put request is failing all others are passing which suggest his configuration is good
Ah, yeah... Overthinking that, we are at your conclusion
again, sorry... windows 10 client to windows 2016 server (webdav) with AD
path: http://XXX.XXX.XXX.16/webdav user: i tryed: domain\user, just user pw: shoud be the password dir: Belege
2025-02-13 15:27:22 XXX.XXX.XXX.16 PROPFIND /webdav - 80 DOMAIN\USER XXX.XXX.XXX.79 Microsoft-WebDAV-MiniRedir/10.0.19045 - 207 0 0 0 2025-02-13 15:27:22 XXX.XXX.XXX.16 DELETE /webdav/Belege/Neues+Textdokument.txt - 80 DOMAIN\USER XXX.XXX.XXX.79 Microsoft-WebDAV-MiniRedir/10.0.19045 - 200 0 0 46
this work bretty fine... same user other divice > Android with OSS 2025-02-13 15:29:05 XXX.XXX.XXX.16 PROPFIND /webdav/ - 80 - XXX.XXX.XXX. okhttp/4.12.0 - 401 2 5 0 ^^^there is no DAOMAIN\USER !!!
401 > The HTTP 401 Unauthorized client error status response code indicates that the request has not been applied because it lacks valid authentication credentials for the target resource. <<< or maybe none?
fromtoolkit
Serverfehler
^^^this just the response from the server if there is no valid usercredential....
@reinzi OK indeed the error is that you did not add /Belege at the end of the remote url. Please do.
I will inverstigate if all webdav impl work the same way and if i can add it for you
@farfromrefug thats wrong... nothing change.... here with Belege
#Software: Microsoft Internet Information Services 10.0 #Version: 1.0 #Date: 2025-02-14 07:39:57 #Fields: date time s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs(User-Agent) cs(Referer) sc-status sc-substatus sc-win32-status time-taken 2025-02-14 07:39:24 XXX.XXX.XXX.16 PROPFIND /webdav/Belege - 80 - XXX.XXX.XXX.55 okhttp/4.12.0 - 401 2 5 78 2025-02-14 07:39:33 XXX.XXX.XXX.16 PROPFIND /webdav/Belege - 80 - XXX.XXX.XXX.55 okhttp/4.12.0 - 401 2 5 15 2025-02-14 07:39:36 XXX.XXX.XXX..16 PROPFIND /webdav/Belege - 80 - XXX.XXX.XXX.55 okhttp/4.12.0 - 401 2 5 0 2025-02-14 07:39:36 XXX.XXX.XXX.16 PROPFIND /webdav/Belege - 80 - XXX.XXX.XXX..55 okhttp/4.12.0 - 401 2 5 0 2025-02-14 07:39:43 XXX.XXX.XXX..16 PROPFIND /webdav/Belege - 80 - XXX.XXX.XXX.55 okhttp/4.12.0 - 401 2 5 0 2025-02-14 07:39:43 XXX.XXX.XXX.16 PROPFIND /webdav/Belege - 80 - XXX.XXX.XXX..55 okhttp/4.12.0 - 401 2 5 15
^^^no USER
it shoud be like: DATE TIME XXX.XXX.XXX.16 PROPFIND /webdav/Belege - 80 DOMAIN\USER XXX.XXX.XXX.55 ....
@reinzi not sure about how your webdav server works and thus how you need to set it up. But it should work. What you can try is setup your webdav server with https://github.com/zhanghai/MaterialFiles. If you get it to work try to apply the same config to my app. If it then does not work with the same config then it is a bug! Then i ll have to find a way to reproduce it (though i donnt have any windows machine around)
@reinzi might have found something else. Just realized some people are using (not sure if it is your case) remote sync folders which already contain folders which are not "documents". The app, right now, would assume that the remote sync folder used is ONLY for OSS-DocumentScanner, and thus would trigger an error. In the next version, those folders will be ignored. It will also contains more fixes. Hope this will be better for you
Hi there, ran into the same error - I can confirm my Webdav server works in other apps (Solid Explorer, Davx, even S3Drive via rclone).
@arichiardi i think this is a server error that i dont parse and shows correctly. In the next version the return "content" when a error appears will be shown directly. This should help investigate those. In sentry i see some with 401 or 523
Thanks @farfromrefug I don't have the time now to download and compile the app but if you have a pre-release you want me to try please send it over and I'll do it!
I have the same issue. I use oss scanner on an old qnap ts-220 using the webdav protocol. The password of the sync setup is not saved. If I try to check the sync setup I need to re-enter the password. I also use joplin notes with webdav on the same server without issues. My 2c Tony
@arichiardi @sweetman-zz @reinzi @cd-FileX here is a test build https://github.com/Akylas/OSS-DocumentScanner/releases/tag/webdav_test. In this one when there is the undefined error it should now report the actual error returned by webdav.
So you know it is a build with sentry enabled so that i can get more feedback.
It is a build signed with the same key as fdroid/github. You cant install it over playstore install.
Tried right away and I still see the issue, 1.14.5 121.
I still see the Undefined issue. Am I on the right build?
@arichiardi thats weird. Could you try after 9:30pm today (in one hour)? My sentry server starts at 9pm. With the sentry issue i should be able to see what s going on.
Thanks! Trying again now.
@arichiardi i see the report but sadly it does not help much. By any chance could any of you create an account for me on your webdav so that i could test? Or maybe better. Can any of you share a way to install a webdav server with the same config as yours ? Best would be on ubuntu. I am thinking i dont connect correctly on those webdav servers. It works fine here on nextcloud, but might be different on different servers
@farfromrefug I am using caddy and its webdav modules for that.
I think the easiest is for me to create an account for you. How do I contact you in private 😄 My email is here on github and I have an associated gpg key to it.
@farfromrefug today I played a bit more with it. Basically when I go to Sync and set things up and I have "Auto Sync" enabled it is always asking me for a password. No matter how many times I put it in.
The other odd thing I noticed is that if I disable "Auto Sync" I actually see the files in my Webdev server!
The error still shows up on start but at list files are there 😅