floccusaddon / floccus

:cloud: Sync your bookmarks privately across browsers and devices
https://floccus.org
Mozilla Public License 2.0
5.89k stars 241 forks source link

WebDAV stopped working on Android with 5.0.2 #1455

Closed kolinger closed 11 months ago

kolinger commented 11 months ago

Which version of floccus are you using?

5.0.2

Sync method

WebDAV

Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.

Android 10

Which version of Nextcloud Bookmarks are you using? (if relevant)

No response

Which version of Nextcloud? (if relevant)

No response

What kind of WebDAV server are you using? (if relevant)

nginx

Describe the Bug

Sync doesn't work and floccus shows "Check your network connection and your profile details" even when network works fine and profile details are correct (I can connect to WebDAV server via other app without issue). Profile details were checked and were imported from previous version where exact details work fine.

Details from console:

NullPointerException happens in underlying HTTP library at WebDav.ts/downloadFileNative. No input for Http.request is null so this is strange.

2023-12-09T17:16:46.947Z Error Caught 
native.js:5907 2023-12-09T17:16:46.947Z { [Error: NullPointerException] code: undefined }
native.js:93776 Error: NullPointerException
    at returnResult ((index):915:32)
    at win.androidBridge.onmessage ((index):890:21)
native.js:88639 Error: E017: Network error: Check your network connection and your profile details
    at NetworkError.FloccusError [as constructor] (native.js:87811:28)
    at new NetworkError (native.js:87980:28)
    at WebDavAdapter.<anonymous> (native.js:93777:31)
    at step (native.js:93218:23)
    at Object.throw (native.js:93199:53)
    at rejected (native.js:93191:65)

Expected Behavior

Sync should work and floccus shouldn't show misleading network error when null pointer is happening.

To Reproduce

WebDav on Android should do the trick.

Debug log provided

marcelklehr commented 11 months ago

Mmh, this might be a capacitor bug :(

kolinger commented 11 months ago

Likely since nothing what floccus passed is null or invalid, URL is valid, auth header is valid and rest are strings so there is no reason to get NullPointerException yet it happens even after reinstall and after downgrade exact code works just fine with identical profile details.

marcelklehr commented 11 months ago

I think I even fixed the bug once when testing some custom java code, but thought I had inadvertantly introduced it with my modifications. I'll publish a patch tomorrow

github-actions[bot] commented 11 months ago

Hello :wave:

Thank you for taking the time to open this issue with floccus. I know it's frustrating when software causes problems. You have made the right choice to come here and open an issue to make sure your problem gets looked at and if possible solved. I'm Marcel and I created floccus and have been maintaining it ever since. I currently work for Nextcloud which leaves me with less time for side projects like this one than I used to have. I still try to answer all issues and if possible fix all bugs here, but it sometimes takes a while until I get to it. Until then, please be patient. Note also that GitHub is a place where people meet to make software better together. Nobody here is under any obligation to help you, solve your problems or deliver on any expectations or demands you may have, but if enough people come together we can collaborate to make this software better. For everyone. Thus, if you can, you could also have a look at other issues to see whether you can help other people with your knowledge and experience. If you have coding experience it would also be awesome if you could step up to dive into the code and try to fix the odd bug yourself. Everyone will be thankful for extra helping hands! One last word: If you feel, at any point, like you need to vent, this is not the place for it; you can go to the forum, to twitter or somewhere else. But this is a technical issue tracker, so please make sure to focus on the tech and keep your opinions to yourself.

I look forward to working with you on this issue Cheers :blue_heart:

kolinger commented 11 months ago

WebDAV works again with 7133d28 👍

marcelklehr commented 11 months ago

Wow, you're building from source? Are you looking to contribute? :)

kolinger commented 11 months ago

I do experiment with source but I'm no JS programmer, all my experience is in other languages (Python, PHP, Java, Go, C++, ...) so I don't even understand how this whole Vue thing works. I'm more server-side person thus this JS magic limits my ability to contribute. Right know I just trying to understand how things works with this platform.