nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.89k stars 4.02k forks source link

NC21.01 | error PHP for /var/www/nextcloud/apps/files/lib/Helper.php #26743

Closed ghost closed 3 years ago

ghost commented 3 years ago

How to use GitHub

Expected behaviour

no logged error

Actual behaviour

Log full of combination of following 3 lines error PHP

Required parameter $tagManager follows optional parameter $fileIdentifier at var/www/nextcloud/apps/files/lib/Helper.php#220

Required parameter $internalPath follows optional parameter $mountId at /var/www/nextcloud/lib/private/Files/Config/CachedMountFileInfo.php#34

**Error**: Required parameter $tagManager follows optional parameter $fileIdentifier at 
 /var/www/nextcloud/apps/files/lib/Helper.php#220

1. */var/www/nextcloud/lib/composer/composer/ClassLoader.php* *- line 478:*
   OC\Log\ErrorHandler::onError()

2. */var/www/nextcloud/lib/composer/composer/ClassLoader.php* *- line 478:*
   include()

3. */var/www/nextcloud/lib/composer/composer/ClassLoader.php* *- line 346:*
   Composer\Autoload\includeFile()

4. */var/www/nextcloud/apps/files_trashbin/lib/Helper.php* *- line 109:*
   Composer\Autoload\ClassLoader->loadClass()

5. */var/www/nextcloud/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php* *- line 88:*
   OCA\Files_Trashbin\Helper::getTrashFiles()

6. */var/www/nextcloud/lib/private/User/Manager.php* *- line 646:*
   OCA\Files_Trashbin\BackgroundJob\ExpireTrash->OCA\Files_Trashbin\BackgroundJob\{closure}(**"\**\* sensiti ... \*"**)

7. */var/www/nextcloud/apps/files_trashbin/lib/BackgroundJob/ExpireTrash.php* *- line 90:*
   OC\User\Manager->callForSeenUsers()

8. */var/www/nextcloud/lib/private/BackgroundJob/Job.php* *- line 52:*
   OCA\Files_Trashbin\BackgroundJob\ExpireTrash->run()

9. */var/www/nextcloud/lib/private/BackgroundJob/TimedJob.php* *- line 59:*
   OC\BackgroundJob\Job->execute()

10. */var/www/nextcloud/cron.php* *- line 128:*
    OC\BackgroundJob\TimedJob->execute()

Server configuration

Operating system: Debian 10.9 (Linux 4.19.0 #1 SMP Tue Jun 9 12:58:54 MSK 2020 x86_64)

Web server: nginx/1.19.10 (fpm-fcgi)

Database: Mariadb 10.5.9

PHP version: 8.0.3 Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, intl, ldap, exif, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, smbclient, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, libsmbclient, Zend OPcache Nextcloud version: (see Nextcloud admin page)

Updated from an older Nextcloud/ownCloud or fresh install: fresh

Where did you install Nextcloud from: tar

Signing status:

Signing status ``` Login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed paste the results here. ``` No errors have been found.

List of activated apps:

App list ``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your Nextcloud installation folder ``` Enabled: - accessibility: 1.7.0 - admin_audit: 1.11.0 - apporder: 0.12.0 - bruteforcesettings: 2.1.0 - calendar: 2.2.0 - cloud_federation_api: 1.4.0 - contacts: 3.5.1 - dav: 1.17.1 - external: 3.8.1 - federatedfilesharing: 1.11.0 - files: 1.16.0 - files_antivirus: 3.2.0 - files_pdfviewer: 2.1.0 - files_rightclick: 1.0.0 - files_trashbin: 1.11.0 - geoblocker: 0.4.6 - groupfolders: 9.0.0 - impersonate: 1.8.0 - issuetemplate: 0.7.0 - keeweb: 0.6.5 - logreader: 2.6.0 - lookup_server_connector: 1.9.0 - mail: 1.9.5 - notifications: 2.9.0 - oauth2: 1.9.0 - password_policy: 1.11.0 - provisioning_api: 1.11.0 - richdocuments: 4.0.4 - richdocumentscode: 6.4.705 - settings: 1.3.0 - suspicious_login: 4.0.0 - theming: 1.12.0 - twofactor_backupcodes: 1.10.0 - twofactor_totp: 6.0.0 - twofactor_u2f: 6.1.0 - updatenotification: 1.11.0 - user_usage_report: 1.5.0 - viewer: 1.5.0 - workflowengine: 2.3.0 Disabled: - activity - comments - contactsinteraction - dashboard - encryption - federation - files_external - files_sharing - files_versions - files_videoplayer - firstrunwizard - nextcloud_announcements - photos - privacy - recommendations - serverinfo - sharebymail - support - survey_client - systemtags - text - user_ldap - user_status - weather_status

Nextcloud configuration:

Config report ``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder or Insert your config.php content here. Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …) ``` { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "***REMOVED SENSITIVE VALUE***" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "skeletondirectory": "\/var\/data\/nexcloud\/skeleton", "share_folder": "\/09. Geteilte Dateien", "version": "21.0.1.1", "dbtype": "mysql", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "3306", "dbname": "***REMOVED SENSITIVE VALUE***", "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "installed": true, "maintenance": false, "default_language": "de", "default_locale": "de", "default_phone_region": "DE", "defaultapp": "dashboard,files", "knowledgebaseenabled": true, "allow_user_to_change_display_name": false, "enable_previews": true, "enabledPreviewProviders": [ "OC\\Preview\\JPEG", "OC\\Preview\\PNG" ], "preview_max_x": 1024, "preview_max_y": 768, "preview_max_scale_factor": 1, "auth.bruteforce.protection.enabled": true, "quota_include_external_storage": false, "trashbin_retention_obligation": "auto, 7", "versions_retention_obligation": "auto, 7", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_smtpdebug": false, "mail_smtpmode": "smtp", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpsecure": "ssl", "mail_smtpport": "465", "mail_smtptimeout": 15, "mail_smtpauthtype": "LOGIN", "mail_smtpauth": 1, "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "mail_template_class": "\\OC\\Mail\\EMailTemplate", "mail_send_plaintext_only": false, "overwritehost": "***REMOVED SENSITIVE VALUE***", "overwriteprotocol": "https", "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***", "htaccess.RewriteBase": "\/", "log_type": "file", "logfile": "\/var\/data\/nextcloud\/nextcloud.log", "loglevel": 2, "logtimezone": "Europe\/Berlin", "log_rotate_size": 5242880, "cron_log": true, "filesystem_cache_readonly": false, "filesystem_check_changes": 0, "filelocking.enabled": "true", "cache_chunk_gc_ttl": 86400, "memcache.local": "\\OC\\Memcache\\APCu", "memcache.distributed": "\\OC\\Memcache\\Redis", "memcache.locking": "\\OC\\Memcache\\Redis", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 0, "timeout": 0 }, "activity_expire_days": 14, "secret": "***REMOVED SENSITIVE VALUE***", "blacklisted_files": [ ".htaccess", "Thumbs.db", "thumbs.db" ], "minimum.supported.desktop.version": "3.0.0", "updatechecker": true, "updater.release.channel": "stable", "upgrade.disable-web": false, "appstoreenabled": true, "appcodechecker": true, "integrity.check.disabled": false, "login_form_autocomplete": false, "remember_login_cookie_lifetime": 0, "session_lifetime": 1800, "session_keepalive": true, "app_install_overwrite": [ "occweb", "issuetemplate" ], "data-fingerprint": "43d3ef1b92f653c12b2275d82d596256", "twofactor_enforced": "false", "twofactor_enforced_groups": [ "Inhaber" ], "twofactor_enforced_excluded_groups": [], "theme": "", "trusted_proxies": "***REMOVED SENSITIVE VALUE***" }

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

LDAP config ``` With access to your command line run e.g.: sudo -u www-data php occ ldap:show-config from within your Nextcloud installation folder Without access to your command line download the data/owncloud.db to your local computer or access your SQL server remotely and run the select query: SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap'; Eventually replace sensitive data as the name/IP-address of your LDAP server or groups. ```

Client configuration

Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.85 Safari/537.36 Edg/90.0.818.46

Operating system: Windows 10 Pro

Logs

Web server error log

Web server error log ``` Insert your webserver log here ```

Nextcloud log (data/nextcloud.log)

Nextcloud log ``` Insert your Nextcloud log here ``` see above

Browser log

Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
solracsf commented 3 years ago

Duplicate of https://github.com/nextcloud/server/issues/25806