Closed SimeonEhrig closed 5 days ago
Yes, I can verify this is happening to me as well. This error message repeatedly appears in the Nextcloud logs.
LockedException "Notes" is locked
Controller failed with OCP\Lock\LockedException
This is happening to me as well using the same setup as above. The bug was introduced in commit a5bec1a.
After commenting out the faulty code in the source code of the installed Notes App, everything works as expected again.
Unfortunately it is unclear why this fix was introduced and why no tests failed.
Can confirm, reverting https://github.com/nextcloud/notes/commit/a5bec1a47db987313aaec793cc6c4f8ec6b48eb7 does help, just in my case the shared-to user needed to temporarily set a different folder before I could re-share the original. Might be normal behavior caused by me deleting the share before, in an attempt to fix the issue.
Similar setup as OP, Notes 4.9.4.
Can confirm.. This is a regression for me :/
Thanks for reporting it, got same problem, and did use the same revert of https://github.com/nextcloud/notes/commit/a5bec1a47db987313aaec793cc6c4f8ec6b48eb7 to fix it I do share my "Notes" folder with my wife, and it was not working anymore, it was creating endlessly "Notes (2)", "Notes (3)", ... , up to "Notes (19)" FYI, we are mainly using the "Nextcloud Notes" Android app where we had the problem using the "Steps To Reproduce" reported above
Best Regards
All of my storage is external since my nextcloud docker container is ephemeral, so all storage is "shared" by group rules, even the user's home directory. So I can't use Notes any more.
The current implementation using Folder->getNonExistingName() couldn't have passed even superficial testing in a shared folder. The program flow goes like this: If the chosen notes folder exists but is shared, it may not be used and a new one is created (with an incrementing number appended). Once it has been created, the existence check confirms that it exists, which now makes it forbidden since only non-existing folders are allowed, that's the point of getNonExistingName(). Therefore it fails to use the just created folder and a new (higher numbered) folder is created, and the cycle repeats forever.
So whenever NoteUtil->getOrCreateFolder is called (apparently quite frequently, on every note file save attempt), it creates a new empty copy of the forbidden existing folder. This goes on forever and creates hundreds of empty folders in minutes. Obviously, getNonExistingName is being used incorrectly.
Is there a reason for the apparent intention not to use existing shared folders?
Indeed, it's still broken, I've tried both options, with and without the code
if ($folder->isShared()) {
$folderName = $this->root->getNonExistingName($path);
$folder = $this->root->newFolder($folderName);
}
it simply stays broken. I can't use the Notes app anymore together with my partner. At the legitimate user, who is sharing the folder, everything works fine. The one who is using the shared folder, gets these other folders 'Notes (2)' etc.
Any response on this problem? Looks like a lot of people have the same problem and nobody knows, what the code should do, which causes the problem.
It is a little bit annoying, yesterday was a new release and there is still no response from a developer :-( At the moment, this means I have to fix the bug locally from time to time :-(
I have the same problem. First my parter had an issue, then I've changed the permission, she started to share with me, and now I cannot use Notes app on my phone.
Updated to 4.10.0. The issue is still the same and the workaround (reverting a5bec1a47db987313aaec793cc6c4f8ec6b48eb7) still works.
I can confirm this too, it is really annoying when using shared folders.
@juliushaertl: What was your motivation in #1260 ? Can we revert this? There is already a PR for this: #1296
I have this issue too.
The whole point of Nextcloud is private sharing. If we cannot share notes in a folder, surely this is a fundamental break in the point of Nextcloud notes existing?
Is there no reason we cannot merge in https://github.com/nextcloud/notes/pull/1296 as it is a fix?
How's the current status?
How's the current status?
Wait for response from @juliushaertl who wrote the line of code. His GitHub status mentioned, that he was in vacations until this week.
This is an important Issue, since it breaks the posebility for guest accounts to use Notes. Guests can only write in folders shared with them. Background: https://help.nextcloud.com/t/guests-cannot-create-notes/195053/6
@juliushaertl Can you please give us feedback?
If we know the solution, it's just to restore a single line of removed code, and have a PR - why on earth is this being left broken?
I think the "problematic" line of code is related to this security advisory: https://github.com/nextcloud/security-advisories/security/advisories/GHSA-wfqv-cx85-7rjx
So what we use as a feature (sharing notes), is probably seen as security bug for them...
The solution isn't just to break legitimate use though without explanation and just have buggy behaviour - a solution would be to have some kind of dialog asking the user if they want to use an existing folder already shared
I share the
Notes
between two accounts. The first account is my main account. The second account is a dedicated account for my smartphone. Up to version 4.9.3, everything works fine. I could create and edit markdown files on my PC and sync it via Nextcloud client to the main account, use the web interface of my main account for editing notices and read and write notices on my smartphone with the nextcloud notes app syncing over the dedicated android account.Since version 4.9.4. The android app and the notice app of the android account is not working anymore. The notice app on the main account is still working.
I think, this is related to this PR: https://github.com/nextcloud/notes/pull/1263
Steps to reproduce
Notes
folder of the account A with account BExpected behaviour
The notices should be shared and the web interface and the android app should work with account A and B in the same way.
Actual behaviour
Account B creates an new notes folder (
Notes (2)
) and stores the notes there.Server
Please complete the following information.
Nextcloud configuration:
Client
Please complete the following information.