buttercup / buttercup-mobile

:iphone: React-Native mobile application for Buttercup
https://buttercup.pw
GNU General Public License v3.0
391 stars 69 forks source link

Buttercup won't open new vault on webDAV server #352

Closed ValoXya closed 2 months ago

ValoXya commented 4 months ago

Hy there I've got this strange error on the mobile version. Once I want to add a new Vault file coming from webDAV server, there is a error says : Connection test failed but with the very same informations on my laptop it's working. No VPN used. That on iOS version (iOS17) I suppose there is difference between mobile app and desktop version to handle connection ?

Thank you :)

ChIcKeN78 commented 4 months ago

Hy there I've got this strange error on the mobile version. Once I want to add a new Vault file coming from webDAV server, there is a error says : Connection test failed but with the very same informations on my laptop it's working. No VPN used. That on iOS version (iOS17) I suppose there is difference between mobile app and desktop version to handle connection ?

Thank you :)

I have the same issue. i can add some more details if needed :-)

Thank you!

jaymeanchante commented 4 months ago

I have the same issue. My details: Hardware: iPhone SE Software iOS: 17.3.1 Buttercup: 2.6.1 WebDAV server: https://cloud.disroot.org/remote.php/webdav Error: Connection failed - WebDAV connection test failed

I have just installed the desktop app under Windows 11 and I could access my vault without a problem.

Omni1111 commented 4 months ago

I have the same issue,Using iPhone 15 Pro,IOS 17.3.1

perry-mitchell commented 4 months ago

I can reproduce. Not sure what the issue is, as I've changed nothing recently regarding this functionality. Probably some Apple update.

Additionally, as with all of the repos and documentation on Buttercup's Github, we expect that comments and issues are in English.

smxsm commented 3 months ago

Same here ... I had to re-add a Webdav vault since the password has changed, but I cannot connect anymore with the new login data on iOS 17 - message: "Connection test failed" 😒

smxsm commented 3 months ago

I was running the project locally in the xcode iOS simulator today to debug the problem and this is what I saw in the xcode console when the error occured... it seems to be caused by an "404 not found" error - and the cause seems to be that the "url" parameter has the server url twice, separated by a space ("%20"):

image

The simulator was running with iOS 17.2, so it seems to be a general problem, not an iOS 17.4 error ... could this be a bug introduced in one of the last buttercup releases?

I'll try to find the place where the url is set wrong ...

Update: not sure if that is the real cause ... but it duplicates the url value when copy/pasting into the field ... happens in simulator and native on my iPhone - you can see it when scrolling the field value.

After manually clearing up the url value, adding the webdav vault worked in the simulator with iOS 17.4, but not on my iPhone with 17.3.1 - I'm updating my iPhone to 17.4.1. now and try again, paying attention to the pasted value in the url field ... I'll update this comment later πŸ•

perry-mitchell commented 3 months ago

Interesting @smxsm ! Thanks for the research. I'll hopefully have time to address this next.. hopefully this week.

smxsm commented 3 months ago

Weird ... still does not work in my iPhone, even after updating to 17.4.1 and manually cleaning the doubled URL in the input field (but it DOES work in the xcode simulator after cleaning the URL, also with 17.4.) - so there must be another problem on the iPhone unfortunately 😒

Update: today it is NOT working on the (same) Simulator anymore ... this is so weird ... If I add the actual error message to the output, it says: image

image

I can't find a reference to "document" in the buttercup or webdav JS code though ... do you have any idea why this is happening? The only place I can find is here, but I can't find any reference to that function throughout the code ... https://github.com/perry-mitchell/webdav-client/blob/17059d99e40a82f921ae5d665a3a3af454d3f403/source/tools/encode.ts#L5

image
smxsm commented 3 months ago

Ok, the solution is ... if I update your webdav-client lib to the latest 5.5.0 release everything works and I can add new Webdav vaults in the iOS simulator again ... image

That's why it worked saturday night, too ... I tried that already, but had to reset my changes since I had broken the xcode project somehow.

So if you create a new Buttercup Mobile release with webdav-client 5.5.0 everything should be fine on iOS and Android again I guess πŸ˜ƒ
image

But I still have to manually clean the URL input value after pasting the URL and remove the duplicate URL from the text input. Maybe you can look into that, I couldn't find the reason for it - it does NOT happen for the pasted password, only for the URL.

perry-mitchell commented 3 months ago

Thanks @smxsm - Great find! I'll try to implement and release this asap.

I'm currently down a mac, and can't actually release right now because of that. I'm waiting on a new macbook so once that arrives I can push it out. ETA in the next couple of weeks, unfortunately.

smxsm commented 3 months ago

You're welcome πŸ‘πŸΌ Let me know if I can help with the build ... but I guess you'll have to do it yourself because of the signing and appstore submission, right?

perry-mitchell commented 3 months ago

Yeah, I'm afraid so. Not a great situation but didn't expect it either.

If I ever get the time I'll set up an automated pipeline -> testflight.

gravistech412 commented 3 months ago

I'm having the same issue on Android. BC V 2.6.1

julianpoemp commented 3 months ago

same issue on Android v2.6.1

v0ltmn commented 3 months ago

sooooo waiting for new app release! %)

perry-mitchell commented 3 months ago

Sorry for the wait here. Had not intended on being so long without a machine to easily release with. If it shows no sign of showing up early this coming week I'll try to release the android side from a Linux setup, and iOS later.

QuinsZouls commented 2 months ago

@perry-mitchell

Did you tried virtualized MAC OS with a Linux KVM?

There's a lot of scripts out there for this.

Also you can create iOS builds on a VM.

julianpoemp commented 2 months ago

@perry-mitchell have you received your mac os computer yet? If no, can you please build a version for android on Linux? This issue is very critical. I know you try your best.

perry-mitchell commented 2 months ago

I'll try to get to it this weekend, but I've just started a new job and I'm honestly pretty exhausted, so I can't guarantee anything.

perry-mitchell commented 2 months ago
image

Got it working locally, will try releasing a fix this week

perry-mitchell commented 2 months ago

Released 2.6.2 on iOS/Android. Pending review.

ValoXya commented 2 months ago

Thank you so much πŸ₯‡

julianpoemp commented 2 months ago

@perry-mitchell the update was released on AppStore, but not on Google PlayStore. Does it take longer to be reviewed?

smxsm commented 2 months ago

Thank you, everything is working again on iOS πŸ‘πŸΌ

perry-mitchell commented 2 months ago

@julianpoemp It was released to both at the same time. I release to iOS first, but Android was only an hour behind. It's entirely up to them after I release, and review times are extremely volatile.

There were new agreements I had to accept on the play store so they might have caused the review to take longer.

julianpoemp commented 2 months ago

WebDAV with Buttercup v2.27 on Android works. Thank you @perry-mitchell ! πŸŽ‰