Android: Directory has no space left, but Nextcloud app will not stop trying to upload

Created on 14 Feb 2018  路  22Comments  路  Source: nextcloud/android

Actual behaviour

-Tell us what happens
On latest Android release Nextcloud is attempting to sync over a ton of photos to my 12.0.5 server, which ran out of space, but the app continues to attempt to complete the upload of all remaining files. I couldn鈥檛 figure out how to make the app stop/pause uploading (more space on the server was not available) so I deleted the app.

Expected behaviour

Once the server runs out of space (maybe less than 1% remaining space) the app will pause uploads. If space is not available, the app will not resume uploading.

Steps to reproduce

  1. Upload files to a Directory with no storage space.
bug stale

All 22 comments

@MorrisJobke is there a way we can check the remaining space left on a desired folder, also with external storage, ...?

Webdav query with returns for a random folder "-3" on my test server.

@MorrisJobke is there a way we can check the remaining space left on a desired folder, also with external storage, ...?

Webdav query with returns for a random folder "-3" on my test server.

Ask @icewind1991 or @rullzer

-3 is unlimited quota: https://github.com/nextcloud/server/blob/0eebff152a177dd59ed8773df26f1679f8a88e90/lib/public/Files/FileInfo.php#L60

Ping @icewind1991 or @rullzer :-)

Ping @icewind1991 @rullzer @blizzz, has anybody an idea how to prevent this?

Doesn't the quota element give you this info?

-3 is unlimited quota, but that does not mean that the real remaining space left on hdd is unlimited...?

Ah fair enough.

Mmmm I need to think about this. Because there are actual file backends where we can't check this.

For all file backends where the space is limited it would be helpful if a low disk space warning is shown on the client (e.g. Android app) if the server disk space will fall below let's say 95%. And if the space falls below 99% probably no additional uploads should be allowed any more. 99% and not 100% because worst case the server needs some temp space for keeping the system alive.

@zukunft the quota is shown in the main menu of the Android app. Else as stated by @rullzer sometime even the server software doesn't know :/

@AndyScherzinger Yes, the quota is shown, but I nevertheless got confused because:

  1. Deleting files did not free any space, probably because they have been moved to the trash bin. Why does the Android App not include an "empty trash bin" option?
  2. It was not clear to me, that this quota has been the server side. My first guess was, that the handy was running out of space. If you click on the quota a popup with the remaining size on the server AND the phone would be helpful.

And most painful was, that the App didn't stop uploading. If the server software knows that there is a disk space problem, the Android App should prevent the user from uploading more files.

May suggestion is that at a default level of e.g. 90% usage the server admin gets a warning message. But if he does not react at a level of 95% all users get a warning message, so that they are informed that they might run into a problem if the server admin does not act.

  1. Deleting files did not free any space, probably because they have been moved to the trash bin. Why does the Android App not include an "empty trash bin" option?

It does (at least on my phone). I can't say if the "empty trash bin" depends on the server version. @tobiasKaminsky might know since he implemented the feature.

  1. It was not clear to me, that this quota has been the server side. My first guess was, that the handy was running out of space. If you click on the quota a popup with the remaining size on the server AND the phone would be helpful.

Not sure about this one. Any opinion @tobiasKaminsky @nextcloud/designers ? In my opinion if the device runs out of space than that isn't something the Nextcloud Android app should monitor, notify the user about but the Android OS itself (which it does afaik).

And most painful was, that the App didn't stop uploading. If the server software knows that there is a disk space problem, the Android App should prevent the user from uploading more files.

I agree with this assessment, yes.

May suggestion is that at a default level of e.g. 90% usage the server admin gets a warning message. But if he does not react at a level of 95% all users get a warning message, so that they are informed that they might run into a problem if the server admin does not act.

This is something that you then would have to raise as an issue for the server project

empty trash bin

I tried again with the Nextcloud Android App Version 3.3.2 on an LineageOS 15.1 and the server version 13.0.7-0 on an Univention server 4.3-2 errata344 and I cannot find the "empty trash bin". Maybe I am missing something. Where could it be?

I tried again with the Nextcloud Android App Version 3.3.2 on an LineageOS 15.1 and the server version 13.0.7-0 on an Univention server 4.3-2 errata344 and I cannot find the "empty trash bin". Maybe I am missing something. Where could it be?

This seems to be only available on Nextcloud 14+ instances: https://github.com/nextcloud/android/pull/2588/files#diff-82c7c73602977065d97dd6984ad49d94R359

@tobiasKaminsky: What happens if a phone has 10 GB free and you sync a nextcloud account with a 10 GB limit and you upload e.g. 10 GB to the nextcloud account from a PC and at the same time you record a videos of 7 GB with the phone. I guess, this is what I did and the result have been that nextcloud tried to download the files from the server again and again. I would expect that the nextcloud Android app stops downloading files from the server as soon as the space on the phone falls below a certain limit and creates once a warning message.

In my opinion if the device runs out of space than that isn't something the Nextcloud Android app should monitor, notify the user about but the Android OS itself (which it does afaik).

@AndyScherzinger totally agree with you here. We only show the _Nextcloud_ quota.

@jancborchardt what do you think of @zukunft's comment: https://github.com/nextcloud/android/issues/2175#issuecomment-444556106 ?

  • First, the 10 GB of the server wouldn鈥檛 go to the phone directly.
  • Then, if you want to open a file which would fill up your phone storage space, we could do 2 things:

    • Try to intelligently clean the least recently cached files

    • Show a warning about it

    • Do both, maybe showing a warning like: "File can not be downloaded because phone storage is full. [ Clear downloaded files ]" ref #3342 (file removal dialog / cached files)

To me it looks like the "do both" option is the best.

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!

@nextcloud/android was there an update on this in the meantime? :)

Well, I re-read the whole issue and it mixes up two different things.

  • do not try to upload if server has too little space left
  • do not try to download if phone has too little space left

As the first post and title is about the first issue, please focus on this one.

For this, @rullzer do we have a way to get the real storage left?
So that I can check before upload:

  • if quota is free
  • if space is free

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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ikke-t picture ikke-t  路  3Comments

tobiasKaminsky picture tobiasKaminsky  路  3Comments

JSoko picture JSoko  路  3Comments

tobiasKaminsky picture tobiasKaminsky  路  3Comments

rainer042 picture rainer042  路  3Comments