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

Can't rename or delete video after saw it #22923

Closed
BugProg opened this issue Sep 17, 2020 · 2 comments
Closed

Can't rename or delete video after saw it #22923

BugProg opened this issue Sep 17, 2020 · 2 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug

Comments

@BugProg
Copy link

BugProg commented Sep 17, 2020

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

1.Play a video on Nextcloud (browser)
2.Quit the player after 2-3s
3.Rename or delete the video

Expected behaviour

The file should be delete or rename

Actual behaviour

Get error : Can't rename / delete ******.mp4"

Server configuration

Operating system:
Raspbian (I have the same issue at https://demo1.nextcloud.com/) id : NDqoNxem8irRj8MZ

Web server:
Server version: Apache/2.4.38 (Raspbian)

Database:
mysql Ver 15.1 Distrib 10.3.23-MariaDB, for debian-linux-gnueabihf (armv7l) using readline 5.2

PHP version:
PHP 7.3.19-1

Nextcloud version: (see Nextcloud admin page)
19.0.3

Updated from an older Nextcloud/ownCloud or fresh install:
Older Nextcloud

Signing status:

Signing status
No errors have been found.

Are you using external storage, if yes which one: local/smb/sftp/...
local

Are you using encryption: yes/no
no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

Client configuration

Browser:
Chrome

Operating system:
Fedora 32

Logs

[webdav] Fatal: OCP\Lock\LockedException: "Vidéo/087919-000-B_SQ_0_VOF_04707727_MP4-2200_AMM-PTWEB_1GWa41KVE00.mp4" is locked at <>

  1. /var/www/nextcloud/lib/private/Files/View.php line 793
    OC\Files\View->changeLock("/Vidéo/087919-0 ... 4", 2, true)
  2. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php line 142
    OC\Files\View->rename("/Vidéo/087919-0 ... 4", "/Vidéo/xc.mp4")
  3. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 157
    OCA\DAV\Connector\Sabre\Node->setName("xc.mp4")
  4. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 641
    Sabre\DAV\Tree->move("files/adrien/Vi ... 4", "files/adrien/Vidéo/xc.mp4")
  5. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpMove(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
  6. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 474
    Sabre\DAV\Server->emit("method:MOVE", [Sabre\HTTP\Requ ... }])
  7. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 251
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
  8. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 319
    Sabre\DAV\Server->start()
  9. /var/www/nextcloud/apps/dav/lib/Server.php line 320
    Sabre\DAV\Server->exec()
  10. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  11. /var/www/nextcloud/remote.php line 167
    require_once("/var/www/nextcl ... p")

MOVE /remote.php/dav/files/adrien/Vid%C3%A9o/087919-000-B_SQ_0_VOF_04707727_MP4-2200_AMM-PTWEB_1GWa41KVE00.mp4
from 192.168.1.13 by adrien at 2020-09-17T15:41:25+00:00

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

{"reqId":"YYW2HqfYP0RfO5ifl8Nc","level":4,"time":"2020-09-17T15:41:25+00:00","remoteAddr":"192.168.1.13","user":"adrien","app":"webdav","method":"MOVE","url":"/remote.php/dav/files/adrien/Vid%C3%A9o/087919-000-B_SQ_0_VOF_04707727_MP4-2200_AMM-PTWEB_1GWa41KVE00.mp4","message":{"Exception":"OCP\Lock\LockedException","Message":""Vidéo/087919-000-B_SQ_0_VOF_04707727_MP4-2200_AMM-PTWEB_1GWa41KVE00.mp4" is locked","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":793,"function":"changeLock","class":"OC\Files\View","type":"->","args":["/Vidéo/087919-000-B_SQ_0_VOF_04707727_MP4-2200_AMM-PTWEB_1GWa41KVE00.mp4",2,true]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php","line":142,"function":"rename","class":"OC\Files\View","type":"->","args":["/Vidéo/087919-000-B_SQ_0_VOF_04707727_MP4-2200_AMM-PTWEB_1GWa41KVE00.mp4","/Vidéo/xc.mp4"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":157,"function":"setName","class":"OCA\DAV\Connector\Sabre\Node","type":"->","args":["xc.mp4"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":641,"function":"move","class":"Sabre\DAV\Tree","type":"->","args":["files/adrien/Vidéo/087919-000-B_SQ_0_VOF_04707727_MP4-2200_AMM-PTWEB_1GWa41KVE00.mp4","files/adrien/Vidéo/xc.mp4"]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\DAV\CorePlugin","type":"->","args":[{"class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\DAV\Server","type":"->","args":["method:MOVE",[{"class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\DAV\Server","type":"->","args":[{"class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\DAV\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":320,"function":"exec","class":"Sabre\DAV\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\DAV\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/remote.php","line":167,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Files/View.php","Line":1994,"Previous":{"Exception":"OCP\Lock\LockedException","Message":""files/2486b9aa637e4c47e48beeb77159ba90" is locked","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/Storage/Common.php","line":816,"function":"changeLock","class":"OC\Lock\DBLockingProvider","type":"->","args":["files/2486b9aa637e4c47e48beeb77159ba90",2]},{"file":"/var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php","line":616,"function":"changeLock","class":"OC\Files\Storage\Common","type":"->","args":["files/Vidéo/087919-000-B_SQ_0_VOF_04707727_MP4-2200_AMM-PTWEB_1GWa41KVE00.mp4",2,{"class":"OC\Lock\DBLockingProvider"}]},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1988,"function":"changeLock","class":"OC\Files\Storage\Wrapper\Wrapper","type":"->","args":["files/Vidéo/087919-000-B_SQ_0_VOF_04707727_MP4-2200_AMM-PTWEB_1GWa41KVE00.mp4",2,{"class":"OC\Lock\DBLockingProvider"}]},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":793,"function":"changeLock","class":"OC\Files\View","type":"->","args":["/Vidéo/087919-000-B_SQ_0_VOF_04707727_MP4-2200_AMM-PTWEB_1GWa41KVE00.mp4",2,true]},{"file":"/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php","line":142,"function":"rename","class":"OC\Files\View","type":"->","args":["/Vidéo/087919-000-B_SQ_0_VOF_04707727_MP4-2200_AMM-PTWEB_1GWa41KVE00.mp4","/Vidéo/xc.mp4"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":157,"function":"setName","class":"OCA\DAV\Connector\Sabre\Node","type":"->","args":["xc.mp4"]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":641,"function":"move","class":"Sabre\DAV\Tree","type":"->","args":["files/adrien/Vidéo/087919-000-B_SQ_0_VOF_04707727_MP4-2200_AMM-PTWEB_1GWa41KVE00.mp4","files/adrien/Vidéo/xc.mp4"]},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpMove","class":"Sabre\DAV\CorePlugin","type":"->","args":[{"class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":474,"function":"emit","class":"Sabre\DAV\Server","type":"->","args":["method:MOVE",[{"class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":251,"function":"invokeMethod","class":"Sabre\DAV\Server","type":"->","args":[{"class":"Sabre\HTTP\Request"},{"class":"Sabre\HTTP\Response"}]},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":319,"function":"start","class":"Sabre\DAV\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":320,"function":"exec","class":"Sabre\DAV\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\DAV\Server","type":"->","args":[]},{"file":"/var/www/nextcloud/remote.php","line":167,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Lock/DBLockingProvider.php","Line":266},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.102 Safari/537.36","version":"19.0.3.1","id":"5f639de91de58"}

@BugProg BugProg added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Sep 17, 2020
@nodiscc
Copy link

nodiscc commented Nov 13, 2020

Hi, there was a solution in #9001 which didn't work for me (increasing file locking TTL), I just disabled file locking for testing purposes, and it works for me:

$ sudo -u www-data /usr/bin/php /var/www/cloud.example.org/occ config:system:set filelocking.enabled --value=false --type=boolean
System config value filelocking.enabled set to boolean false

https://github.com/nextcloud/server/blob/master/config/config.sample.php#L1722

/**
 * Enables transactional file locking.
 * This is enabled by default.
 *
 * Prevents concurrent processes from accessing the same files
 * at the same time. Can help prevent side effects that would
 * be caused by concurrent operations. Mainly relevant for
 * very large installations with many users working with
 * shared files.
 *
 * Defaults to ``true``
 */
'filelocking.enabled' => true,

Does it fix your problem?

@szaimen
Copy link
Contributor

szaimen commented Jun 17, 2021

Lets track this in nextcloud/viewer#894

@szaimen szaimen closed this as completed Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug
Projects
None yet
Development

No branches or pull requests

3 participants