Fix file delete, moved and copy

I have a same issue, after updating to v26.0.2

What unsupported application

Is the Music app

3 Likes

I disabled the Music app, I can now delete folders here as well. I posted a similar issue recently.

2 Likes

Yes, aplication Music

1 Like

As I already commented on another thread:

Although this happens on the callback of the Music app, I believe that the root cause is a bug in Nextcloud.

As a quick-and-dirty monkey patch, you may modify the file lib/private/Files/Cache/QuerySearchHelper.php in your installation. Locate the line
public function getCachesAndMountPointsForSearch(Root $root, string $path, bool $limitToHome = false): array {
and modify it to be
public function getCachesAndMountPointsForSearch($root, string $path, bool $limitToHome = false): array {
i.e. remove the type declaration Root.

2 Likes

Thank you very much. Your suggestion to edit the PHP file worked perfectly. The errors were driving me crazy and I knew it couldn’t be the music app on its own as the issue. Hopefully the Nextcloud developers fix this in the next release of version 26.

Same problem here with Nextcloud 26.0.2. Disabling the music app as described by @SergioMadrid135_S worked perfectly.

Yep, can confirm. Long-time NC user here (≈10y). I installed the Music app a few weeks ago. Recently, folder deletions started to fail. Disabled “Music” and all works again. Pfff, who would have guessed …

1 Like

Thanks for the helpful discussion and analysis here, folks. I’ve logged this as [Bug]: type declaration "Root $root" in method signature of `getCachesAndMountPointsForSearch` causes file move failure · Issue #38634 · nextcloud/server · GitHub.

Alright, that got closed as a dupe. Here’s the real issue: fix: expect interface, not a specific implementation by blizzz · Pull Request #38625 · nextcloud/server · GitHub

I’m curious why it got labeled with the milestone ”Nextcloud 28”, considering it’s a regression.

1 Like

Just another confirmation of the same problem and the same solution. I would like to use the Music app again so hopefully this will be fixed in the next point release.

I could edit lib/private/Files/Cache/QuerySearchHelper.php but its one of those situations where I really shouldn’t have to and I don’t want to make changes that could potentially store up issues in the future.

3 Likes

The bug is also included in nextcloud version 27.

The issue is actively being worked on.

1 Like

Oof, that is a long time to wait… Not to mention 26 and 27 all need that patch. Should be on a point release.

Thanks for this thread, just desactivated this app and no more delete or move errors !!! :heart_eyes:

Same here. Was actively using that app (also because it works well with Subsonic on my phone). Hope it can be fixed soon!

In the meantime you might want to check out Audioplayer. Could be a temporary replacement?

The fix has been backported and is on track to be included in NC 27.0.1 and NC 26.0.4. It should be backported also to 25.0.9 but it will apparently need still some manual work. All of these versions are supposed to be released on 2023-07-20.

Until then, the monkey patch I suggested above in Fix file delete, moved and copy - #12 by paulijar is a really easy alternative for anyone able to use the text editor.

1 Like

Same problem. Removing Music app fixes the problem.

1 Like