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

Federated Shares can't accepted if music app is enabled #778

Closed
T0mWz opened this issue Jul 20, 2020 · 4 comments · Fixed by owncloud/core#37834
Closed

Federated Shares can't accepted if music app is enabled #778

T0mWz opened this issue Jul 20, 2020 · 4 comments · Fixed by owncloud/core#37834
Labels

Comments

@T0mWz
Copy link

T0mWz commented Jul 20, 2020

Since ownCloud 10.4.1 we run into a bug that federated shares cannot be accepted, when the Music player is enabled.
It seems that the user session is broken, so that the user session element is no longer correctly passed.

How to reproduce

  1. Create a new federated share from an another owncloud to an owncloud 10.4.1 with music player enabled.
  2. Try to accept the share via the notification pop-up or via "Shared-with-you" option in the menu at the left side.
@paulijar
Copy link
Collaborator

Thanks for the report, I was able to reproduce the issue.

However, I still don't quite understand, what is going on here. What seems to happen, is that the file system access of the files_sharing app somehow gets broken when the back-end of the Music app is initialized. When accepting the share fails, there is this kind of error in owncloud.log:

{"reqId":"x8pO5zDRVmmDQPz9tSy7","level":3,"time":"2020-07-20T20:17:32+00:00","remoteAddr":"xxx.xxx.xxx.xxx","user":"xxxx","app":"PHP","method":"POST","url":"\/owncloud_10.4\/ocs\/v1.php\/apps\/files_sharing\/api\/v1\/remote_shares\/pending\/7?format=json","message":"Error: Call to a member function file_exists() on null at \/var\/www\/html\/owncloud_10.4\/apps\/files_sharing\/lib\/Helper.php#285"}

In the Music app initialization, the significant line of code is this:

$c->getServer()->getRootFolder()

There, we obtain the RootFolder instance, which is subsequently used to register the file system hooks. But registering the hooks is not important for this bug. To make the problem surface, it is enough to have that one call $c->getServer()->getRootFolder() anywhere in the bootstrapping code of the Music app. But I have no idea, why is this happening.

@cdamken
Copy link

cdamken commented Aug 19, 2020

hi @T0mWz and @paulijar I notice the problem when I updated the music app, I used the previous version with 10.4.1 and I didn't see the problem. When I upgraded the server to 10.5 and the new music app I thought the problem was from the server.

Probably @karakayasemi could help us to find out where is the problem.

I have and issue in ownCloud already (https://github.com/owncloud/enterprise/issues/4136)

So far the workaround is to disable the music app, and it works the federated shares again. but I hope we can find a solution faster so we can use both apps.

@paulijar
Copy link
Collaborator

@cdamken Quite odd if you only see the problem in 10.5 because for me, the problem definitely is present on ownCloud 10.4.1 but not on 10.2.

As I see this, the problem has to be in the core or the sharing app. To make the problem surface, it is enough to have the call

$c->getServer()->getRootFolder() 

in the bootsrapping code of any application. As this is the documented way to register filesystem hooks, it really shouldn't cause any issues.

I reported this issue for the core in owncloud/core#37719 but unfortunately no-one has reacted to the report in any way.

@karakayasemi
Copy link

@paulijar Sorry for the late reply. Actually, I saw your core issue earlier and started to debug to detect the cause. Probably, the problem started to occur with this pr which is released with server v10.3: owncloud/core#35396
But, the cause of the problem seems in bootstrapping process of the core.

Since the bootsrapping/wiring process can affect whole application, I am trying to solve the issue with minimal complication risk. I will open a fix pr soon and I have some solution alternatives so far but need to investigate more to ensure from solution. Thank you for reporting and feedbacks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants