[SOLVED] Upload error with Nextcloud Android App (after Upgrade server from 20 to 21.0.1)


Nextcloud version 21.0.1
On Virtualbox VM
    VM OS: Unbuntu server 20.04
    PHP 7.4, Apache 2.4.41
VM host : Windows 10
Phone : Samsgun S20 FE (same problem with Samsung S7)
Nextcloud Android App : 3.15.1

The issue you are facing:

The file upload with nextcloud App always returns error since I upgrade the server to 21.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  • In the nextcloud Android App, try to upload a file :
    => the upload ends with an error “Erreur de permission
    => the file is in the list of sending error (“Erreur d’envoi”)

  • On server, the file is uploaded
    => nextcloud.log has 1 new error line :

rmdir(/media/host_data/Nemehy/uploads/8450f248f4dfbbfc49029f2a9cb82a43): Text file busy at /var/www/html/MyNextcloudSite/lib/private/Files/Storage/Local.php#127

Full log line : First Load - Pastebin.com

  • In the Nextcloud App, try to upload again the same file : the file is in conflict. Then, try to solve the conflict by selecting the local file
    => the upload ends with erreur “service en maintenance

  • On server, nextcloud.log has 3 new error lines :

fopen(/media/host_data/Nemehy/uploads/8450f248f4dfbbfc49029f2a9cb82a43/0000000000000000-0000000003191808): failed to open stream: No such file or directory at /var/www/html/MyNextcloudSite/lib/private/Files/Storage/Local.php#353
Could not open file

The 3 entire log lines : 2nd Upload - Pastebin.com

Note :

The upload works with the web application, and the windows application
I have no problem with the Android App and the previous installation (nextcloud 20 on ubuntu server 18.04)

Someone has any idea?

Thank you by advance

I use the correction given in this post :

and it works !

vi /var/www/nextcloud/lib/private/Files/Storage/Local.php
Go to line 127

            unset($it); // <---- Add this line before RETURN. --------------
            return rmdir($this->getSourcePath($path));

For the files in the error list (history), I only delete the sending tasks in the error list.