You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Delete: call_user_func_array() expects parameter 1 to be a valid callback #29167
deleting a folder from the local W10 client connected via oC client to 10.0.3
monitor 10.0.3 oC log activities
Expected behaviour
No errors should be logged
Actual behaviour
"user":"xyz","app":"PHP","method":"DELETE","url":"\/remote.php\/dav\/files\/xyz\/abc,"message":"call_user_func_array() expects parameter 1 to be a valid callback, class 'OCA\\Files_Sharing\\External\\Storage' does not have a method 'getFullPath' at \/var\/www\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php#501"
Server configuration
Operating system: Ubuntu 16.04
Web server: nginx
Database: mysql
PHP version: 7.0
ownCloud version: 10.0.3
Updated from an older ownCloud or fresh install: updated
Where did you install ownCloud from: tar
Signing status (ownCloud 9.0 and above): no errors
From that what I see is, that you delete a file on the W10 machine, it gets deleted on both sides of the federation too. But I have currently no clue if there are other sideffects...
Till now I hope and pray 😄
When I try to delete a folder shared using federated share, no logs are found in the log file. Unfortunately I am not able to reproduce the issue. I am using a Linux machine for testing.
encryption wrapper is not applied on local shared storages, because a local shared storage is simply a wrapper around a home storage which itself already has its own encryption wrapper (unrelated to this issue, just mentioning for the sake of understanding)
So it seems that in @mmattel's setup, the received federated share doesn't have any encryption wrapper applied, which is correct. This is likely the reason why the error happens: it is trying to call a method that only exists on this wrapper, it iterates over all wrappers until it reaches the actually wrapper storage OCA\\Files_Sharing\\External\\Storage (this is the DAV federated share storage implementation) and does not find the method getFullPath.
Now the question is why @sharidas is not able to reproduce locally. He's going to debug further to find what conditions are making the code skips the getFullPath part in his local env. Hopefully once we find the one condition we'll be able to reproduce it.
Since its a federated share, I found while debugging that the issue is hit when the code reaches https://github.com/owncloud/core/blob/v10.0.3/lib/private/Encryption/EncryptionWrapper.php#L121 and then nothing happens for a while. And later user can see the traces above.
The next time when I delete... No traces and the delete happens successfully.
Another observation matrics ( this was purely experimental ) nothing significant found and couldn't reproduce the error: Owncloud2 (version 10.0.3 beta) and Owncloud3 (version 10.0.2)
Owncloud2 is non-encrypted local storage. Owncloud3 is also non-encrypted storage.
Now try to add Owncloud3 as external storage to Owncloud2.
Create a file in Owncloud2 and delete. No log entry found
Create a file in Owncloud3 and delete. No log entry found
Owncloud2 is non-encrypted local storage. Owncloud3 is encrypted with user specific key
Now try to add Owncloud3 as external storage to Owncloud2.
Create a file in Owncloud3 from Owncloud2. This will cause problem while file creation. Exception thrown and file creation fails.
Owncloud2 is encrypted and Owncloud3 is not encrypted
Now try to add Owncloud3 as external storage to Owncloud2.
Create a file in Owncloud3 from Owncloud2 causes problem. Exception thrown and the file creation fails.
Finally I got this piece of information in the log {"reqId":"Kk9ZKdERbIqr25W2wcWs","level":3,"time":"2017-10-24T10:16:13+00:00","remoteAddr":"127.0.0.1","user":"user1","app":"PHP","method":"DELETE","url":"\/testing\/remote.php\/webdav\/test\/abc.txt","message":"call_user_func_array() expects parameter 1 to be a valid callback, class 'OCA\\Files_Sharing\\External\\Storage' does not have a method 'getFullPath' at \/home\/sujith\/test\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php#501"}
Activity
PVince81 commentedon Oct 10, 2017
Weird, I grepped the code for "getFullPath" and that method only exists as protected method in the encryption storage wrapper.
I found this, likely related: https://github.com/owncloud/core/blob/v10.0.3/lib/private/Files/Storage/Wrapper/Encryption.php#L786. This is a recent addition.
@sharidas please have a look.
Not sure about a proper solution... I suggest avoiding
getFullPath.Making
getFullPathpublic would be an idea, but not so clean a solution.PVince81 commentedon Oct 10, 2017
@mmattel did the deletion still go through or did it abort ?
PVince81 commentedon Oct 10, 2017
setting to p1 as this could be critical, needs confirmation
mmattel commentedon Oct 10, 2017
From that what I see is, that you delete a file on the W10 machine, it gets deleted on both sides of the federation too. But I have currently no clue if there are other sideffects...
Till now I hope and pray 😄
sharidas commentedon Oct 10, 2017
When I try to delete a folder shared using federated share, no logs are found in the log file. Unfortunately I am not able to reproduce the issue. I am using a Linux machine for testing.
PVince81 commentedon Oct 10, 2017
@mmattel is the federated share from an external storage ?
mmattel commentedon Oct 10, 2017
@PVince81
W10 -- 10.0.3 -- 10.0.2 -- Storage backend from that what I know is local
Will check it and respond
@sharidas
Do you delete via browser or client?
I delete via client
sharidas commentedon Oct 10, 2017
Tried federated share, with external storage SFTP, the delete operation isn't hitting
call_user_func_array.sharidas commentedon Oct 10, 2017
I delete via browser.
mmattel commentedon Oct 10, 2017
Just tried it again:
(create file = local in the filesystem W10 machine which syncs via the client)
W10 -- 10.0.3 -- local storage
Create file, wait for sync file, delete file after successful sync, monitor log - no entry
W10 -- 10.0.3 -- 10.0.2
Create file, wait for sync file, delete file after successful sync, monitor log - entry
PVince81 commentedon Oct 10, 2017
Had a chat with @sharidas with some more clues:
So it seems that in @mmattel's setup, the received federated share doesn't have any encryption wrapper applied, which is correct. This is likely the reason why the error happens: it is trying to call a method that only exists on this wrapper, it iterates over all wrappers until it reaches the actually wrapper storage
OCA\\Files_Sharing\\External\\Storage(this is the DAV federated share storage implementation) and does not find the methodgetFullPath.Now the question is why @sharidas is not able to reproduce locally. He's going to debug further to find what conditions are making the code skips the
getFullPathpart in his local env. Hopefully once we find the one condition we'll be able to reproduce it.mmattel commentedon Oct 10, 2017
Just tried to delete via browser, same error gets logged
sharidas commentedon Oct 11, 2017
This looks a bit tricky to me below is another observation to share:
a) Local storage is not encrypted && External storage ( which is another oC installation ) is encrypted
Create a folder in extrenal oC storage and try to federated share with the local storage's non admin user.
Now debugger will never fall on line https://github.com/owncloud/core/blob/v10.0.3/lib/private/Files/Storage/Wrapper/Encryption.php#L786 . The reason is we created an empty directory ( see the if condition : https://github.com/owncloud/core/blob/v10.0.3/lib/private/Files/Storage/Wrapper/Encryption.php#L772 )
b) Now create a folder and file inside it. Lets say test/foo.txt in External oC storage. And do a federated share. Now the result was bit weird:
sharidas commentedon Oct 24, 2017
Another observation matrics ( this was purely experimental ) nothing significant found and couldn't reproduce the error:
Owncloud2 (version 10.0.3 beta) and Owncloud3 (version 10.0.2)
Now back to fed shares.
sharidas commentedon Oct 24, 2017
Finally I got this piece of information in the log
{"reqId":"Kk9ZKdERbIqr25W2wcWs","level":3,"time":"2017-10-24T10:16:13+00:00","remoteAddr":"127.0.0.1","user":"user1","app":"PHP","method":"DELETE","url":"\/testing\/remote.php\/webdav\/test\/abc.txt","message":"call_user_func_array() expects parameter 1 to be a valid callback, class 'OCA\\Files_Sharing\\External\\Storage' does not have a method 'getFullPath' at \/home\/sujith\/test\/owncloud\/lib\/private\/Files\/Storage\/Wrapper\/Wrapper.php#501"}sharidas commentedon Oct 24, 2017
Created PR: #29337
lock commentedon Aug 1, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.