Skip to content

Deleted files not working after upgrade to Nextcloud 15 #13005

Closed

Description

@maghog

Can't access files in trash bin after upgrade to NC 15.

TypeError: Argument 2 passed to OCA\Files_Trashbin\Trash\TrashItem::__construct() must be of the type string, null given, called in /var/www/nextcloud/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php on line 62

Nextcloud 15.0.0
Ubuntu 16.04
PHP 7.0.32

Activity

  1. added
    0. Needs triage
    on Dec 11, 2018
  2. Wizlonex commented on Dec 16, 2018

    @Wizlonex

    I have this error too, and I too can't access my Trashcan. I get a circle of death when I try to access the deleted files, and the log entry is repeated.

    TypeError: Argument 2 passed to OCA\Files_Trashbin\Trash\TrashItem::__construct() must be of the type string, null given, called in /var/www/html/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php on line 62

    Nextcloud 15.0.0
    Ubuntu 16.04 (running in an LXC container)
    PHP 7.2

    I was unable to fix this by restarts / re-logging in etc., so I deleted the account and re-created it. That works again. Not a great solution, but it's working again SO FAR.

    UPDATED: Same error re-surfaced, so it's looking to be quite a chronic problem. Deleting accounts and re-opening is not much fun, so I am stuck with this until a fix is issued.

  3. christophfroehlich commented on Dec 19, 2018

    @christophfroehlich

    This seems to be related with #13160 and happens here, too.

  4. Freshdouble commented on Dec 19, 2018

    @Freshdouble

    As a workarround you can delete the trashbin with the occ command.
    For Ubuntu und other Debian based systems that should be:
    sudo -u www-data php occ trashbin:cleanup --all-users

    If you don't want to loose your files in the trashbin you can backup, the data folder, or more specific you only have to backup the files_trashbin folder, in each user directory in the data folder.

  5. Wizlonex commented on Dec 20, 2018

    @Wizlonex

    Very useful to know that - will save me deleting accounts and getting them re-created - thanks Freshdouble.

  6. maghog commented on Dec 20, 2018

    @maghog
    Author

    Thanks, works as a workaround...

  7. pozdeiev commented on Jan 10, 2019

    @pozdeiev

    New Nextcloud 15, same thing.

  8. janLo commented on Jan 12, 2019

    @janLo

    I have the same Problem when I deleted or moved files in a synchronized folder. Doing this directly in the web ui works fine.

  9. added and removed
    0. Needs triage
    on Jan 15, 2019
  10. dnclain commented on Jan 18, 2019

    @dnclain

    Same problem here with Nextcloud 15.0.2 with the error :
    TypeError: Return value of OCA\Files_Trashbin\Sabre\AbstractTrash::getSize() must be of the type integer, float returned
    Thanks a lot for the workaround.

  11. AfroUSApl commented on Jan 22, 2019

    @AfroUSApl

    This helped me on my Nextcloud 15.0.2

    iocage console nextcloud

    occ trashbin:cleanup --all-users

    The process control (PCNTL) extensions are required in case you want to interrupt long running commands - see http://php.net/manual/en/book.pcntl.php
    The current PHP memory limit is below the recommended value of 512MB.
    Remove deleted files for all users
    Remove deleted files for users on backend Database
    User1

  12. janLo commented on Jan 23, 2019

    @janLo

    This helps only temporary. As soon as there are files moved again in a synchronized folder it happens again.

  13. added
    1. to develop
    on Jan 24, 2019
  14. icewind1991 commented on Jan 29, 2019

    @icewind1991
    Member

    can you see if #13886 fixes the problem

  15. maghog commented on Jan 30, 2019

    @maghog
    Author

    Yes #13886 fix the problem.
    Thanks!

  16. atsag commented on Feb 21, 2019

    @atsag

    Unfortunately I face the same problem with what @dnclain mentioned above. I updated manually from 15.0.2 to 15.0.4, and the error message after a "spinning circle" request for the trash bin starts with"message":{"Exception":"TypeError","Message":"Return value of OCA\Files_Trashbin\Sabre\AbstractTrash::getSize() must be of the type integer, float returned","Code":0,"Trace":[{"file":"/path_to/nextcloud/3rdparty/sabre/dav/lib/DAV/PropFind.php","line":98,"function":"getSize","class":"OCA\Files_Trashbin\Sabre\AbstractTrash","type":"->","args":[]}`

  17. rpellerin commented on Mar 4, 2019

    @rpellerin

    I've got the same exact problem as @atsag on 15.0.5

  18. hannesbe commented on Mar 5, 2019

    @hannesbe

    Ditto @atsag here on 15.0.5

    I accidently removed a bunch of files and no (easy) way to undo this.
    Is there an alternate way / workaround to restore deleted directories (preserving directory structure) from trash?

  19. Gelsleichter commented on Aug 5, 2019

    @Gelsleichter

    Same thing here, I want to recover from bin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1. to developbugfeature: trashbinhighregression

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions