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

SMB storage backend must not contact server in constructor #14837

Closed
PVince81 opened this issue Mar 12, 2015 · 2 comments · Fixed by #14877
Closed

SMB storage backend must not contact server in constructor #14837

PVince81 opened this issue Mar 12, 2015 · 2 comments · Fixed by #14877

Comments

@PVince81
Copy link
Contributor

Steps

  1. Edit "tests/enable_all.php" and add the "files_external" app
  2. Run ./autotest.sh sqlite apps/files_external/tests/mountconfig.php

Expected result

Config tests pass

Actual result

Even though only the constructor of the \OC\Files\SMB class is called, it still tries to make a connection:

.FF..Can't contact server smbhost. Error NT_STATUS_UNSUCCESSFUL
FCan't contact server smbhost. Error NT_STATUS_UNSUCCESSFUL
(...snip...)
FCan't contact server somehost. Error NT_STATUS_UNSUCCESSFUL
FF

Versions

ownCloud 8.1 git master

After debugging I found that the SMB library from @icewind1991 tries to load the timezone from the server.

@icewind1991 can you fix it to do this lazily ?
External storage classes must not attempt any connection from the constructor, because it will cause other (future) problems like when deleting storages, see #11694

@PVince81
Copy link
Contributor Author

It was actually on this branch: #11884

It looks like on master someone removed the name "SMB" to make it work.

Still, would be good to fix this eventually.

@DeepDiver1975
Copy link
Member

@PVince81
@Xenopathic recently replaced the smb storage with Test_Mount_Config_Dummy_Storage
https://github.com/owncloud/core/blob/master/apps/files_external/tests/mountconfig.php#L24

To make the unit tests pass properly - just FYI - lazy ctor is still desired

@DeepDiver1975 DeepDiver1975 added this to the 8.1-current milestone Mar 13, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants