-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[Bug]: "Call to a member function getType() on bool" on External Storage #35364
Comments
I encounter this error while making this PR #36075 to support s3 storage classes. When setting an invalid storage class, the file is not created. Instead of catching and showing the storage error, the actual code try to refresh the information of the newly created file, which was not created ... The error happen in this short code (apps/dav/lib/Connector/Sabre/Node.php):
At line 115, The low level storage error should be catched and displayed instead of trying to refresh informations of a file that was not created. @cahebebe, in my case there was a previous log from the objectstore indicating the error and I suppose you have some misconfiguration or another bug in there. |
Changing the log level I found the following issues and mistakes:
Thanks @fmenabe for the recommendations. |
Fixes nextcloud/server#35364 Also adds note about S3 endpoint naming to make consistent with Primary Storage change made in nextcloud#10595 Signed-off-by: Josh Richards <[email protected]>
Fixes nextcloud/server#35364 Also adds note about S3 endpoint naming to to External Storage make consistent with Primary Storage change made in nextcloud#10595 Signed-off-by: Josh Richards <[email protected]>
Fixed in #36120 (during some other clean-up) and released in NC26. @cahebebe Since NC uses aws-sdk-php to access S3 object stores, even 3rd-party S3 object stores have to be used in a way that is compliant with AWS S3. AWS doesn't generally accept patches for compatibility with third-party S3 platforms that aren't 100% compliant with AWS S3. Many years ago AWS S3 supported underscores, but has not for at least 5 years. Even the Google doc you cited in your PR discourages the use of underscores (in the "considerations" section) because they aren't valid DNS hostnames. It would not surprise me in the least if Google dropped support for underscores at some point as well. I'd say don't use the underscore. :-)
I'll add a note to the doc sections for both External Storage and Primary Storage for S3 that bucket names must be AWS S3 compliant regardless of one's S3 provider/platform. |
Additional follow-up: That's a good catch @cahebebe regarding ACL vs Uniform. At that link Google is a bit vague about it, but does says it's required if using the XML API (which is, effectively, the S3 compatibility API). Google references it here a bit more explicitly finally mentioning S3: https://cloud.google.com/storage/docs/access-control/lists
I hadn't seen that before. I really wish Google documented all their S3 caveats in a bit more centralized manner. |
Bug description
When I try to store a file in a External storage y got a error message "Call to a member function getType() on bool", I've tried in diferent locations inside it and I got the same message, also in the Nextcloud Client for Windows shows an error too.
Steps to reproduce
Expected behavior
Should upload and show the uploaded file.
Installation method
Community VM appliance
Operating system
RHEL/CentOS
PHP engine version
PHP 7.4
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
Updated to a major version (ex. 22.2.3 to 23.0.1)
Are you using the Nextcloud Server Encryption module?
No response
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
Nextcloud Logs
Additional info
No response
The text was updated successfully, but these errors were encountered: