server
server copied to clipboard
[Bug]: File Version Restore is Not Working
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug, not a question or a configuration/webserver/proxy issue.
- [X] This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
When file shared with other users with full permissions initial version of file cannot restored.
Example
https://github.com/nextcloud/server/assets/67455295/72855892-d149-4582-97db-74c2fa0da19f
Steps to reproduce
- Share a file with multiple user that have full permission and try to restore initial version of file
Expected behavior
Initial version of file must be restored without any problem.
Installation method
None
Nextcloud Server version
28
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- [ ] Default user-backend (database)
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
No response
Nothing in the logs? ALso, open the browser console and see what happens.
I am experiencing this issue in 27.1.6. The only error in the log is below.
Restoring/Downloading any intermediate Version works as expected, this issue is only with the Initial Version.
I have also attached the browser console log. console-export-2024-2-1_12-2-51.txt
`[webdav] Error: Error: Call to a member function getEncryptedVersion() on bool at <
- /var/www/html/apps/files_versions/lib/Versions/LegacyVersionsBackend.php line 177 OCA\Files_Versions\Storage::rollback("/myfile.ods", 1706804806, ["OC\User\User"])
- /var/www/html/apps/files_versions/lib/Versions/VersionManager.php line 103 OCA\Files_Versions\Versions\LegacyVersionsBackend->rollback(["OCA\Files_Ver ... "])
- /var/www/html/apps/files_versions/lib/Versions/VersionManager.php line 185 OCA\Files_Versions\Versions\VersionManager->OCA\Files_Versions\Versions{closure}("*** sensitive parameters replaced ***")
- /var/www/html/apps/files_versions/lib/Versions/VersionManager.php line 103 OCA\Files_Versions\Versions\VersionManager::handleAppLocks(["Closure"])
- /var/www/html/apps/files_versions/lib/Sabre/VersionFile.php line 118 OCA\Files_Versions\Versions\VersionManager->rollback(["OCA\Files_Ver ... "])
- /var/www/html/apps/files_versions/lib/Sabre/RestoreFolder.php line 76 OCA\Files_Versions\Sabre\VersionFile->rollBack()
- /var/www/html/3rdparty/sabre/dav/lib/DAV/Tree.php line 160 OCA\Files_Versions\Sabre\RestoreFolder->moveInto("target", "versions/0jsg/versions/162/1706804806", ["OCA\Files_Ver ... "])
- /var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 612 Sabre\DAV\Tree->move("versions/0jsg/versions/162/1706804806", "versions/0jsg/restore/target")
- /var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89 Sabre\DAV\CorePlugin->httpMove(["Sabre\HTTP\Request"], ["Sabre\HTTP\Response"])
- /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 472 Sabre\DAV\Server->emit("method:MOVE", [["Sabre\HTTP\ ... ]])
- /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 253 Sabre\DAV\Server->invokeMethod(["Sabre\HTTP\Request"], ["Sabre\HTTP\Response"])
- /var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php line 321 Sabre\DAV\Server->start()
- /var/www/html/apps/dav/lib/Server.php line 365 Sabre\DAV\Server->exec()
- /var/www/html/apps/dav/appinfo/v2/remote.php line 35 OCA\DAV\Server->exec()
- /var/www/html/remote.php line 172 require_once("/var/www/html/a ... p")
MOVE /remote.php/dav/versions/0jsg/versions/162/1706804806 from 172.16.0.1 by 0jsg at 2024-02-01T16:34:14+00:00`
Are you both using encryption?
In my case, Administration > Security > Server-side encryption is turned off. I have attached the output of occ config:list. occ_config_list.txt
Are you both using encryption?
Encryption is off.
From Log I saw this error.
Error Call to a member function getEncryptedVersion() on bool
Log
Hello, could you confirm that the issue is not with shared files, but files that are initially empty when created?
This does appear to be the case in my testing.