nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.51k stars 4.08k forks source link

If credentials are not saved for external storage it shows server is in maintenance mode #24337

Open Emi94 opened 5 years ago

Emi94 commented 5 years ago

Actual behaviour

When accessing an external storage from the android app that doesn't have the credentials saved it shows that the server is in maintenance mode. If I go from a browser, access the external storage, enter the credentials (to be saved) I can afterwards access the folder from the android app as well.

Expected behaviour

The android app should ask for the credentials if they are not saved.

Steps to reproduce

  1. Add an external storage to Nextcloud, SMB type in my case and authentication "user entered, stored in database"
  2. Access the external storage from the android app first.

Environment data

Android version: OxygenOS 9.0.4 (based on android 9)

Device model: OnePlus 6

Stock or customized system: Stock

Nextcloud app version: 3.5.1

Nextcloud server version: 15.0.5

PS: not sure if this is present on the ios app as I don't have an iphone to test.

nextcloud-android-bot commented 5 years ago

GitMate.io thinks possibly related issues are https://github.com/nextcloud/android/issues/1976 (External sites are not shown.), https://github.com/nextcloud/android/issues/2809 (Favorites of External Storages not showing), https://github.com/nextcloud/android/issues/2199 (Visualise external storages), https://github.com/nextcloud/android/issues/2336 (Can't view External Storage in APP), and https://github.com/nextcloud/android/issues/468 (Nextcloud app doesn't show all files and directories on an external storage).

stale[bot] commented 5 years ago

This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

tobiasKaminsky commented 5 years ago

@nextcloud/server-triage how can we handle this?

MorrisJobke commented 5 years ago

@nextcloud/server-triage how can we handle this?

Most likely this additional request for credentials needs to be pushed somehow as status code and then either send the user to the web UI or do the request on your side which could get tricky.

tobiasKaminsky commented 5 years ago

So when entering such a folder server gives back "authorization required" and this pops up a username/password field, and this is then used for this specific folder.

And Android would store this…? Or is this a one time action? How is this handled on web ui?

MorrisJobke commented 5 years ago

And Android would store this…? Or is this a one time action? How is this handled on web ui?

It needs to be stored on the server. I guess there is some special API endpoint that takes this. In the web UI this is all handled via JS that is injected and does this. And therefore it is not really standardized/documented.

tobiasKaminsky commented 5 years ago

Ah, ok :-) Then…if you find the time, this should be documented and implemented in server and after that clients can do this. I guess this is also a problem for windows/iOS? If so, then I'll open up an issue on server to track this?

MorrisJobke commented 5 years ago

@icewind1991 @rullzer Any idea how to properly do this on the storage level? Currently it is a non-standardized way with some JS interferences to allow this.

tobiasKaminsky commented 4 years ago

@nextcloud/server-triage this is still the case, and on client side we cannot do anything right now

charredchar commented 4 years ago

I came across this issue today trying to access a few shares through the Android app. I wanted to add a note for anyone else looking for a solution until it is fixed, the comments here gave me an idea for testing. I managed to "get it to work" by changing the external storage from "Log-in credentials, save in session" to "Log-in credentials, save in database." I am using LDAP though so ymmv but this is, at least for me, a work around until a real fix can be found.

tobiasKaminsky commented 4 years ago

@nextcloud/server-triage any idea? At least a proper error message, so that clients can handle this correct, would be fine. Please note that this currently affects all clients!

tobiasKaminsky commented 4 years ago

Moved to server. Once this is done, we can handle it accordingly on all clients.

szaimen commented 3 years ago

I suppose this is still valid on NC21.0.2?

tobiasKaminsky commented 3 years ago

Yes, I fear this needs some discussion first…

szaimen commented 3 years ago

cc @icewind1991 @nextcloud/server-triage

ghost commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.

tobiasKaminsky commented 3 years ago

This is a valid bug, so I removed "needs info" so that bot does not close it.

szaimen commented 1 year ago

Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!

tobiasKaminsky commented 1 year ago

As no one developed this, it will stay the same.

joshtrichards commented 1 year ago

Sounds like the docs are incorrect or in need of clarity here in the mean time:

https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/external_storage/auth_mechanisms.html#password-based-mechanisms

Based on this report "User entered, store in database" needs a caveat that it doesn't work with mobile/desktop clients until the username/password are manually entered by the user once via the web interface (at that point the credentials are saved in the database for future use).

joshtrichards commented 2 months ago

Related: #22547