Missing some icons when S3 is primary storage
Steps to reproduce
- Install Nextcloud fresh from archive
- Configure with local database (in this case Postgres)
- Delete all files from Nextcloud
- Edit config.php to add:
'objectstore' => array(
'class' => '\\OC\\Files\\ObjectStore\\S3',
'arguments' => array(
'bucket' => 'bucketname',
'autocreate' => true,
'key' => 'key',
'secret' => 'secret',
'hostname' => 'host',
'port' => 443,
'use_ssl' => true,
'region' => 'region',
),
),
- Reload the Files app
Expected behaviour
Files app loads as expected
Actual behaviour
Files app is missing lots of icons, and a lot of CSP blocks show up:

Server configuration
Operating system: Arch Linux
Web server: Caddy; also reproduced with Apache
Database: Postgres
PHP version: 7.3.11
Nextcloud version: 17.0.0.9
Updated from an older Nextcloud/ownCloud or fresh install: Fresh
Where did you install Nextcloud from: Archive
Signing status:
Signing status
Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.
Results
=======
- core
- EXTRA_FILE
- .bash_history
Raw output
==========
Array
(
[core] => Array
(
[EXTRA_FILE] => Array
(
[.bash_history] => Array
(
[expected] =>
[current] => 99d3e4ff40d35171bf90fc1fa61cce3f49667866f6a0c962650830258c852e2033fa6f1cc1448d5a335113cc70bcc2977f27f7a309db4e4d2179126148f9ee73
)
)
)
)
List of activated apps:
App list
Enabled:
- accessibility: 1.3.0
- activity: 2.10.1
- bruteforcesettings: 1.4.0
- cloud_federation_api: 1.0.0
- comments: 1.7.0
- dav: 1.13.0
- federatedfilesharing: 1.7.0
- federation: 1.7.0
- files: 1.12.0
- files_pdfviewer: 1.6.0
- files_rightclick: 0.14.2
- files_sharing: 1.9.0
- files_trashbin: 1.7.0
- files_versions: 1.10.0
- files_videoplayer: 1.6.0
- firstrunwizard: 2.6.0
- gallery: 18.4.0
- logreader: 2.2.0
- lookup_server_connector: 1.5.0
- nextcloud_announcements: 1.6.0
- notifications: 2.5.0
- oauth2: 1.5.0
- password_policy: 1.7.0
- privacy: 1.1.0
- provisioning_api: 1.7.0
- recommendations: 0.5.0
- serverinfo: 1.7.0
- sharebymail: 1.7.0
- support: 1.0.1
- survey_client: 1.5.0
- systemtags: 1.7.0
- text: 1.1.0
- theming: 1.8.0
- twofactor_backupcodes: 1.6.0
- updatenotification: 1.7.0
- viewer: 1.1.0
- workflowengine: 1.7.0
Disabled:
- admin_audit
- encryption
- files_external
- user_ldap
Nextcloud configuration:
Config report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"cloudtest2.k7dxs.net"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "17.0.0.9",
"overwrite.cli.url": "https:\/\/cloudtest2.k7dxs.net",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"objectstore": {
"class": "\\OC\\Files\\ObjectStore\\S3",
"arguments": {
"bucket": "cloudtest2.k7dxs.net",
"autocreate": true,
"key": "nope",
"secret": "nope",
"hostname": "s3.us-west-1.wasabisys.com",
"port": 443,
"use_ssl": true,
"region": "us-west-1"
}
}
}
}
Are you using external storage, if yes which one: S3
Are you using encryption: No
Are you using an external user-backend, if yes which one: No
Client configuration
Browser: Firefox
Operating system: Arch Linux
Logs
Web server error log
Web server error log
Nov 02 03:06:13 localhost caddy[3999]: 2019/11/02 03:06:13 [INFO] 45.79.104.152 - No such site at :80 (Remote: 134.236.252.28, Referer: )
Nov 02 03:19:35 localhost caddy[3999]: 02/Nov/2019:03:19:35 +0000 [ERROR 502 /] http2: stream closed
Nov 02 03:19:35 localhost caddy[3999]: 02/Nov/2019:03:19:35 +0000 [ERROR 502 /] http2: stream closed
Nov 02 03:19:36 localhost caddy[3999]: 02/Nov/2019:03:19:36 +0000 [ERROR 502 /] http2: stream closed
Nov 02 03:36:09 localhost caddy[3999]: 02/Nov/2019:03:36:09 +0000 [ERROR 502 /] http2: stream closed
Nov 02 03:36:11 localhost caddy[3999]: 02/Nov/2019:03:36:11 +0000 [ERROR 502 /] http2: stream closed
Nov 02 03:43:43 localhost caddy[3999]: 2019/11/02 03:43:43 [INFO] 45.79.104.152 - No such site at :80 (Remote: 193.108.50.162, Referer: )
Nov 02 03:44:26 localhost caddy[3999]: 02/Nov/2019:03:44:26 +0000 [ERROR 502 /] http2: stream closed
Nov 02 03:44:26 localhost caddy[3999]: 02/Nov/2019:03:44:26 +0000 [ERROR 502 /] http2: stream closed
Nov 02 03:44:26 localhost caddy[3999]: 02/Nov/2019:03:44:26 +0000 [ERROR 502 /] http2: stream closed
Nov 02 03:45:25 localhost caddy[3999]: 02/Nov/2019:03:45:25 +0000 [ERROR 502 /] http2: stream closed
Nov 02 03:45:25 localhost caddy[3999]: 02/Nov/2019:03:45:25 +0000 [ERROR 502 /] http2: stream closed
Nov 02 03:45:25 localhost caddy[3999]: 02/Nov/2019:03:45:25 +0000 [ERROR 502 /] http2: stream closed
Nextcloud log (data/nextcloud.log)
Nextcloud log
Absolutely nothing from the past half hour other than the "fallback implementation of intl" message; which I have since resolvedBrowser log
Browser log
See above
Info for anyone who is still seeing requests blocked by CSP in Firefox (even without any extensions) - this appears to be a bug in Firefox.
Details are here https://bugzilla.mozilla.org/show_bug.cgi?id=1591807
https://github.com/nextcloud/server/issues/12724#issuecomment-548361148
Are you able to reproduce the same with chromium browsers?
I just rebuilt the environment to test on Chromium, and I am not seeing the same CSP blocks, but I am still missing icons on Chromium. The odd thing is in my original test, almost every icon was missing, but this time, on both Chromium and Firefox, only the All Files, Recent, and Shares icons are missing.
Related to #17783 I think.
I too use S3 as primary.
Every browser I try on mobile or desktop results in the CSP errors and the page takes over a minute to load. Once its loaded, no JS or styling is applied to the instance.
EDIT: Solved... see my comment in above issue
Having the exact same issue here on a testing instance, tried @ohmybrew "solution", but didn't help, problem remains.
The odd thing is in my original test, almost every icon was missing, but this time, on both Chromium and Firefox, only the All Files, Recent, and Shares icons are missing.
Same here:

I don't know if https://github.com/nextcloud/server/issues/19009 is related but it happens at the same time.
Having a similar issue https://github.com/nextcloud/server/issues/19748
I've solved the issue by setting up the block:
'objectstore' => array(
'class' => '\\OC\\Files\\ObjectStore\\S3',
'arguments' => array(
'bucket' => 'bucketname',
'autocreate' => true,
'key' => 'key',
'secret' => 'secret',
'hostname' => 'host',
'port' => 443,
'use_ssl' => true,
'region' => 'region',
),
),
in config.php BEFORE installing Nextcloud.
So
- Download and extract Nextcloud
- Edit
config.phpand place the block inside - Install Nextcloud with
occhttps://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html#command-line-installation-label
in config.php BEFORE installing Nextcloud.
Some people also use a own file objectstore.config.php in the config folder. The file must end with .config.php.
@acs-ferreira Getting this error when trying to setup S3 as primary NC version latest on a digital ocean ubuntu 18 apache2 PHP 7.2
AAA{
"reqId": "yEwiJelsN5HFBiHo57rf",
"level": 3,
"time": "",
"remoteAddr": ",
"user": "",
"app": "core",
"method": "GET",
"url": "/nextcloud/index.php/apps/files/",
"message": {
"Exception": "OCP\\Files\\NotPermittedException",
"Message": "Could not create path",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/lib/private/Files/SimpleFS/SimpleFolder.php",
"line": 84,
"function": "newFile",
"class": "OC\\Files\\Node\\Folder",
"type": "->",
"args": [
"merged-template-prepend.js"
]
},
{
"file": "/var/www/nextcloud/lib/private/Template/JSCombiner.php",
"line": 179,
"function": "newFile",
"class": "OC\\Files\\SimpleFS\\SimpleFolder",
"type": "->",
"args": [
"merged-template-prepend.js"
]
},
{
"file": "/var/www/nextcloud/lib/private/Template/JSCombiner.php",
"line": 105,
"function": "cache",
"class": "OC\\Template\\JSCombiner",
"type": "->",
"args": [
"/var/www/nextcloud/core/js",
"merged-template-prepend.js",
{
"__class__": "OC\\Files\\SimpleFS\\SimpleFolder"
}
]
},
{
"file": "/var/www/nextcloud/lib/private/Template/JSResourceLocator.php",
"line": 115,
"function": "process",
"class": "OC\\Template\\JSCombiner",
"type": "->",
"args": [
"/var/www/nextcloud",
"core/js/merged-template-prepend.json",
"core"
]
},
{
"file": "/var/www/nextcloud/lib/private/Template/JSResourceLocator.php",
"line": 71,
"function": "cacheAndAppendCombineJsonIfExist",
"class": "OC\\Template\\JSResourceLocator",
"type": "->",
"args": [
"/var/www/nextcloud",
"core/js/merged-template-prepend.json"
]
},
{
"file": "/var/www/nextcloud/lib/private/Template/ResourceLocator.php",
"line": 78,
"function": "doFind",
"class": "OC\\Template\\JSResourceLocator",
"type": "->",
"args": [
"js/merged-template-prepend"
]
},
{
"file": "/var/www/nextcloud/lib/private/TemplateLayout.php",
"line": 346,
"function": "find",
"class": "OC\\Template\\ResourceLocator",
"type": "->",
"args": [
[
"core/js/dist/main",
"js/merged-template-prepend",
"search/js/search",
"core/l10n/en",
"js/backgroundjobs",
"files_pdfviewer/l10n/en",
"files_pdfviewer/js/previewplugin",
"files_sharing/l10n/en",
"files_sharing/js/dist/main",
"files_videoplayer/l10n/en",
"files_videoplayer/js/main",
"notifications/l10n/en",
"notifications/js/notifications",
"search/l10n/en",
"search/js/searchprovider",
"js/files/fileinfo",
"js/files/client",
"files/l10n/en",
"files/js/merged-index",
"files_sharing/js/dist/collaboration",
"spreed/l10n/en",
"spreed/js/collections",
"text/l10n/en",
"text/js/files",
"federatedfilesharing/l10n/en",
"federatedfilesharing/js/external",
"files_rightclick/l10n/en",
"files_rightclick/js/script",
"files_rightclick/js/files",
"onlyoffice/l10n/en",
"onlyoffice/js/desktop",
"onlyoffice/js/main",
"recommendations/l10n/en",
"recommendations/js/main",
"js/dist/systemtags",
"systemtags/l10n/en",
"systemtags/js/systemtags",
"comments/l10n/en",
"comments/js/comments",
"files_versions/l10n/en",
"files_versions/js/files_versions",
"files_sharing/js/dist/files_sharing",
"files_sharing/js/dist/additionalScripts",
"viewer/l10n/en",
"viewer/js/viewer",
"files/js/dist/sidebar",
"files/js/fileinfomodel",
"activity/l10n/en",
"activity/js/activity-sidebar",
"files_sharing/js/dist/files_sharing_tab",
"spreed/js/talk-files-sidebar",
"spreed/js/talk-files-sidebar-loader",
"files_trashbin/l10n/en",
"files_trashbin/js/files_trashbin",
"firstrunwizard/l10n/en",
"firstrunwizard/js/about"
]
]
},
{
"file": "/var/www/nextcloud/lib/private/TemplateLayout.php",
"line": 174,
"function": "findJavascriptFiles",
"class": "OC\\TemplateLayout",
"type": "::",
"args": [
[
"core/js/dist/main",
"js/merged-template-prepend",
"search/js/search",
"core/l10n/en",
"js/backgroundjobs",
"files_pdfviewer/l10n/en",
"files_pdfviewer/js/previewplugin",
"files_sharing/l10n/en",
"files_sharing/js/dist/main",
"files_videoplayer/l10n/en",
"files_videoplayer/js/main",
"notifications/l10n/en",
"notifications/js/notifications",
"search/l10n/en",
"search/js/searchprovider",
"js/files/fileinfo",
"js/files/client",
"files/l10n/en",
"files/js/merged-index",
"files_sharing/js/dist/collaboration",
"spreed/l10n/en",
"spreed/js/collections",
"text/l10n/en",
"text/js/files",
"federatedfilesharing/l10n/en",
"federatedfilesharing/js/external",
"files_rightclick/l10n/en",
"files_rightclick/js/script",
"files_rightclick/js/files",
"onlyoffice/l10n/en",
"onlyoffice/js/desktop",
"onlyoffice/js/main",
"recommendations/l10n/en",
"recommendations/js/main",
"js/dist/systemtags",
"systemtags/l10n/en",
"systemtags/js/systemtags",
"comments/l10n/en",
"comments/js/comments",
"files_versions/l10n/en",
"files_versions/js/files_versions",
"files_sharing/js/dist/files_sharing",
"files_sharing/js/dist/additionalScripts",
"viewer/l10n/en",
"viewer/js/viewer",
"files/js/dist/sidebar",
"files/js/fileinfomodel",
"activity/l10n/en",
"activity/js/activity-sidebar",
"files_sharing/js/dist/files_sharing_tab",
"spreed/js/talk-files-sidebar",
"spreed/js/talk-files-sidebar-loader",
"files_trashbin/l10n/en",
"files_trashbin/js/files_trashbin",
"firstrunwizard/l10n/en",
"firstrunwizard/js/about"
]
]
},
{
"file": "/var/www/nextcloud/lib/private/legacy/template.php",
"line": 184,
"function": "__construct",
"class": "OC\\TemplateLayout",
"type": "->",
"args": [
"error",
""
]
},
{
"file": "/var/www/nextcloud/lib/private/Template/Base.php",
"line": 132,
"function": "fetchPage",
"class": "OC_Template",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/legacy/template.php",
"line": 333,
"function": "printPage",
"class": "OC\\Template\\Base",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/index.php",
"line": 65,
"function": "printExceptionErrorPage",
"class": "OC_Template",
"type": "::",
"args": [
{
"__class__": "OCP\\Files\\NotPermittedException"
},
500
]
}
],
"File": "/var/www/nextcloud/lib/private/Files/Node/Folder.php",
"Line": 185,
"CustomMessage": "--"
},
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/82.0.4063.0 Safari/537.36 Edg/82.0.439.1",
"version": "18.0.1.3"
}AAA
If this was a configuration problem, shouldn't it be present in every host under the same server? I've just tested installing 10 instances in the same server, sharing the same S3 provider (different buckets) and i'm having this problem on 60% of them (6 of 10).
In one of them, i've catched this:
{
"reqId": "6N3VqIRqk1F3sGtuFLIS",
"level": 3,
"time": "2020-04-25T14:12:28+02:00",
"remoteAddr": "176.167.7.168",
"user": "testing",
"app": "PHP",
"method": "GET",
"url": "/css/icons/icons-vars.css?v=1587816740",
"message": "fopen(http://10.1.0.2:8081/testing/urn%3Aoid%3A201): failed to open stream: HTTP request failed! HTTP/1.1 500 Internal Server Error\r\n at /var/www/testing/lib/private/Files/ObjectStore/S3ObjectTrait.php#72",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:75.0) Gecko/20100101 Firefox/75.0",
"version": "18.0.4.2"
}
So shouldn't these files be stored locally instead of on the S3 bucket?
I have the same behaviour as described here: https://github.com/nextcloud/server/issues/17781#issuecomment-578462958
If you need more information I'm willing to provide them :)
It looks like it was also related to my reverse proxy (traefik) I change my config.php to:
before:
'overwrite.cli.url' => 'http://nextcloud.domain.de',
after:
'overwrite.cli.url' => 'https://nextcloud.domain.de',
and added
'overwriteprotocol' => 'https',
'overwritehost' => 'nextcloud.domain.de',
After the restart It was able to load all icons:

If this was a configuration problem, shouldn't it be present in every host under the same server? I've just tested installing 10 instances in the same server, sharing the same S3 provider (different buckets) and i'm having this problem on 60% of them (6 of 10).
Which cache backends were/are you using (e.g memcache.local, memcache.locking, memcache.distributed)? Ever since I switched away from APCu the problem is gone. It turns out that APCu is pretty unreliable (due to some other issues) and support for it may be dropped in the future.
Is this Issue still valid in NC21.0.2? If not, please close this issue. Thanks! :)
It's still valid.
@sebastiansterk we are using s3, and we don't have this issue. Could you elaborate on how to reproduce? (If not, let's close this one)
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.