Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unavailable External Storage (server-side) prevents Nextcloud App from working (maintenance mode) #5981

Open
ytausch opened this issue Apr 30, 2020 · 6 comments

Comments

@ytausch
Copy link

ytausch commented Apr 30, 2020

Steps to reproduce

  1. Add a external WebDAV storage that is unavailable in a normal user account
  2. Login with a newly installed Nextcloud App

Expected behaviour

  • Everything should work normally - when opening the unavailable storage, a helpful message should appear

Actual behaviour

  • No folder sync happens - instead the app displays a "maintenance mode" message.

Can you reproduce this problem on https://try.nextcloud.com?

  • Not possible as I cannot add external storage there.

Environment data

Android version: 8.0.0

Device model: Samsung SM-A520F

Stock or customized system: Stock

Nextcloud app version: latest from Google Play (3.11.1)

Nextcloud server version: 18.0.3

Reverse proxy: nginx-proxy (Docker)

@ytausch ytausch added the bug label Apr 30, 2020
@tobiasKaminsky
Copy link
Member

@nextcloud/server-triage without having this checked, but as Android "only" displays the list we get from server, might this be a problem on server side?

@ytausch how does web behave?

@ytausch
Copy link
Author

ytausch commented Apr 30, 2020

Web works fine. It displays an error message when opening the unavailable external storage folder.

@MorrisJobke
Copy link
Member

MorrisJobke commented May 4, 2020

@nextcloud/server-triage without having this checked, but as Android "only" displays the list we get from server, might this be a problem on server side?

@tobiasKaminsky Maybe try to create a external storage, mount it to root and then make it unavailable in the external storage itself (stop ftp/sftp for example). Check then if the Android app supports this.

@tobiasKaminsky
Copy link
Member

I did this:

  • created an external mount on my server1 to server2
  • disabled server2
  • webdav request shows:
<d:response>
    <d:href>/nc/remote.php/webdav/Nextcloud/</d:href>
    <d:propstat>
      <d:prop>
        <d:resourcetype>
          <d:collection/>
        </d:resourcetype>
        <oc:favorite>0</oc:favorite>
        <nc:is-encrypted>0</nc:is-encrypted>
        <nc:mount-type>external</nc:mount-type>
        <oc:id>-0000001ocjycgrudn78</oc:id>
        <d:getetag>&quot;&quot;</d:getetag>
        <oc:permissions>MG</oc:permissions>
        <oc:share-types/>
        <oc:owner-id>tobi</oc:owner-id>
        <d:quota-used-bytes>0</d:quota-used-bytes>
        <nc:sharees/>
      </d:prop>
      <d:status>HTTP/1.1 200 OK</d:status>
    </d:propstat>

Question: how does web UI knows that it not available (entry marked red)
Then I can prevent entering this folder.

image

Accessing it gives:

<?xml version="1.0" encoding="utf-8"?>
<d:error
  xmlns:d="DAV:"
  xmlns:s="http://sabredav.org/ns">
  <s:exception>Sabre\DAV\Exception\ServiceUnavailable</s:exception>
  <s:message>Storage is temporarily not available</s:message>
</d:error>

--> I will parse this response and show it as error message.

@MorrisJobke
Copy link
Member

So there are two ways:

  • either you call /status.php to check for the maintenance mode - there shouldn't be too often a 503 anyways and status.php is quite cheap
  • another option would be that we add another HTTP header that indicates if the system is in maintenance mode

@tobiasKaminsky
Copy link
Member

I would like to go with option 2 as this is just a more cleaner behaviour, and also other clients can more easily adopt this.

@joshtrichards joshtrichards changed the title Unavailable external storage (WebDAV) prevents Nextcloud App from working (maintenance mode) Unavailable Sxternal Storage (server-side) prevents Nextcloud App from working (maintenance mode) Oct 10, 2023
@joshtrichards joshtrichards changed the title Unavailable Sxternal Storage (server-side) prevents Nextcloud App from working (maintenance mode) Unavailable External Storage (server-side) prevents Nextcloud App from working (maintenance mode) Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants