PHP error Error: Undefined array key "extension"

Hello everybody!
im having this weird error after trying trashbin deletion:
Error: Undefined array key “extension”
does anyone know what is happening?

Server configuration detail

Operating system: Linux 5.15.0-43-generic #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022 x86_64

Webserver: Apache/2.4.52 (Ubuntu) (fpm-fcgi)

Database: mysql 10.6.7

PHP version: 8.0.21

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, imagick, intl, exif, mysqli, pdo_mysql, Phar, posix, readline, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, Zend OPcache

Nextcloud version: 24.0.3 - 24.0.3.2

Updated from an older Nextcloud/ownCloud or fresh install:

Where did you install Nextcloud from: unknown

Signing status

Array ( )

List of activated apps

Enabled:

  • accessibility: 1.10.0
  • activity: 2.16.0
  • bruteforcesettings: 2.4.0
  • circles: 24.0.0
  • cloud_federation_api: 1.7.0
  • comments: 1.14.0
  • contactsinteraction: 1.5.0
  • dashboard: 7.4.0
  • dav: 1.22.0
  • federatedfilesharing: 1.14.0
  • federation: 1.14.0
  • files: 1.19.0
  • files_pdfviewer: 2.5.0
  • files_rightclick: 1.3.0
  • files_sharing: 1.16.2
  • files_trashbin: 1.14.0
  • files_versions: 1.17.0
  • files_videoplayer: 1.13.0
  • firstrunwizard: 2.13.0
  • logreader: 2.9.0
  • lookup_server_connector: 1.12.0
  • nextcloud_announcements: 1.13.0
  • notifications: 2.12.0
  • oauth2: 1.12.0
  • password_policy: 1.14.0
  • photos: 1.6.0
  • privacy: 1.8.0
  • provisioning_api: 1.14.0
  • ransomware_protection: 1.13.0
  • recommendations: 1.3.0
  • serverinfo: 1.14.0
  • settings: 1.6.0
  • sharebymail: 1.14.0
  • support: 1.7.0
  • survey_client: 1.12.0
  • systemtags: 1.14.0
  • text: 3.5.1
  • theming: 1.15.0
  • twofactor_backupcodes: 1.13.0
  • updatenotification: 1.14.0
  • user_status: 1.4.0
  • viewer: 1.8.0
  • weather_status: 1.4.0
  • workflowengine: 2.6.0
    Disabled:
  • admin_audit
  • encryption
  • files_external
  • user_ldap
Configuration (config/config.php)

{
“instanceid”: “REMOVED SENSITIVE VALUE”,
“passwordsalt”: “REMOVED SENSITIVE VALUE”,
“secret”: “REMOVED SENSITIVE VALUE”,
“trusted_domains”: [
“10.1.4.4”,
“removed”,
“removed”
],
“datadirectory”: “REMOVED SENSITIVE VALUE”,
“dbtype”: “mysql”,
“version”: “24.0.3.2”,
“overwrite.cli.url”: “http://10.1.4.4/nextcloud”,
“dbname”: “REMOVED SENSITIVE VALUE”,
“dbhost”: “REMOVED SENSITIVE VALUE”,
“dbport”: “”,
“dbtableprefix”: “oc_”,
“mysql.utf8mb4”: true,
“dbuser”: “REMOVED SENSITIVE VALUE”,
“dbpassword”: “REMOVED SENSITIVE VALUE”,
“installed”: true,
“mail_smtpmode”: “smtp”,
“mail_smtpsecure”: “tls”,
“mail_sendmailmode”: “smtp”,
“mail_from_address”: “REMOVED SENSITIVE VALUE”,
“mail_domain”: “REMOVED SENSITIVE VALUE”,
“mail_smtpauth”: 1,
“mail_smtpauthtype”: “LOGIN”,
“mail_smtphost”: “REMOVED SENSITIVE VALUE”,
“mail_smtpport”: “587”,
“mail_smtpname”: “REMOVED SENSITIVE VALUE”,
“mail_smtppassword”: “REMOVED SENSITIVE VALUE”,
“memcache.local”: “\OC\Memcache\APCu”,
“default_phone_region”: “ES”
}

Cron Configuration: Array ( [backgroundjobs_mode] => cron [lastcron] => 1663270520 )

External storages: files_external is disabled

Encryption: no

User-backends:

OC\User\Database

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

The issue you are facing:

[PHP] Error: Error: Undefined array key “extension” at /var/www/nextcloud/apps/files_trashbin/lib/Helper.php#70 at <>

  1. /var/www/nextcloud/apps/files_trashbin/lib/Helper.php line 70
    OC\Log\ErrorHandler::onError()
  2. /var/www/nextcloud/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php line 73
    OCA\Files_Trashbin\Helper::getTrashFiles()
  3. /var/www/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php line 47
    OCA\Files_Trashbin\Trash\LegacyTrashBackend->listTrashRoot()
  4. <>
    OCA\Files_Trashbin\Trash\TrashManager->OCA\Files_Trashbin\Trash{closure}(“*** sensitive parameters replaced ***”)
  5. /var/www/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php line 48
    array_reduce()
  6. /var/www/nextcloud/apps/files_trashbin/lib/Sabre/TrashRoot.php line 75
    OCA\Files_Trashbin\Trash\TrashManager->listTrashRoot()
  7. /var/www/nextcloud/apps/files_trashbin/lib/Sabre/TrashRoot.php line 88
    OCA\Files_Trashbin\Sabre\TrashRoot->getChildren()
  8. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 78
    OCA\Files_Trashbin\Sabre\TrashRoot->getChild()
  9. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php line 178
    Sabre\DAV\Tree->getNodeForPath()
  10. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 281
    Sabre\DAV\Tree->delete()
  11. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpDelete()
  12. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
  13. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
  14. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
  15. /var/www/nextcloud/apps/dav/lib/Server.php line 352
    Sabre\DAV\Server->exec()
  16. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  17. /var/www/nextcloud/remote.php line 166
    require_once(“/var/www/nextcl … p”)

DELETE /remote.php/dav/trashbin/AnaiT/trash/ELE_C_SC021_v08.d0
from 10.1.3.64 by AnaiT at 2022-09-15T19:45:26+00:00

Is this the first time you’ve seen this error? (Y/N): YES

Steps to replicate it:

  1. i restart the php-fpm with service php8.0-fpm restart

The output of your Nextcloud log in Admin > Logging:


{"reqId":"yWFxSHE0yNDvPGzRy7Wu","level":3,"time":"2022-09-15T19:45:26+00:00","remoteAddr":"10.1.3.64","user":"AnaiT","app":"PHP","method":"DELETE","url":"/remote.php/dav/trashbin/AnaiT/trash/ELE_C_SC021_v08.d0","message":"Undefined array key \"extension\" at /var/www/nextcloud/apps/files_trashbin/lib/Helper.php#70","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36","version":"24.0.3.2","exception":{"Exception":"Error","Message":"Undefined array key \"extension\" at /var/www/nextcloud/apps/files_trashbin/lib/Helper.php#70","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Helper.php","line":70,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php","line":73,"function":"getTrashFiles","class":"OCA\\Files_Trashbin\\Helper","type":"::"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php","line":47,"function":"listTrashRoot","class":"OCA\\Files_Trashbin\\Trash\\LegacyTrashBackend","type":"->"},{"function":"OCA\\Files_Trashbin\\Trash\\{closure}","class":"OCA\\Files_Trashbin\\Trash\\TrashManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php","line":48,"function":"array_reduce"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Sabre/TrashRoot.php","line":75,"function":"listTrashRoot","class":"OCA\\Files_Trashbin\\Trash\\TrashManager","type":"->"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Sabre/TrashRoot.php","line":88,"function":"getChildren","class":"OCA\\Files_Trashbin\\Sabre\\TrashRoot","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":78,"function":"getChild","class":"OCA\\Files_Trashbin\\Sabre\\TrashRoot","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":178,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":281,"function":"delete","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpDelete","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":352,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":166,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}
{"reqId":"yWFxSHE0yNDvPGzRy7Wu","level":3,"time":"2022-09-15T19:45:26+00:00","remoteAddr":"10.1.3.64","user":"AnaiT","app":"PHP","method":"DELETE","url":"/remote.php/dav/trashbin/AnaiT/trash/ELE_C_SC021_v08.d0","message":"Undefined array key \"extension\" at /var/www/nextcloud/apps/files_trashbin/lib/Helper.php#70","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36","version":"24.0.3.2","exception":{"Exception":"Error","Message":"Undefined array key \"extension\" at /var/www/nextcloud/apps/files_trashbin/lib/Helper.php#70","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Helper.php","line":70,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php","line":73,"function":"getTrashFiles","class":"OCA\\Files_Trashbin\\Helper","type":"::"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php","line":47,"function":"listTrashRoot","class":"OCA\\Files_Trashbin\\Trash\\LegacyTrashBackend","type":"->"},{"function":"OCA\\Files_Trashbin\\Trash\\{closure}","class":"OCA\\Files_Trashbin\\Trash\\TrashManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Trash/TrashManager.php","line":48,"function":"array_reduce"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Sabre/TrashRoot.php","line":75,"function":"listTrashRoot","class":"OCA\\Files_Trashbin\\Trash\\TrashManager","type":"->"},{"file":"/var/www/nextcloud/apps/files_trashbin/lib/Sabre/TrashRoot.php","line":88,"function":"getChildren","class":"OCA\\Files_Trashbin\\Sabre\\TrashRoot","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":78,"function":"getChild","class":"OCA\\Files_Trashbin\\Sabre\\TrashRoot","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php","line":178,"function":"getNodeForPath","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":281,"function":"delete","class":"Sabre\\DAV\\Tree","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpDelete","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/lib/Server.php","line":352,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->"},{"file":"/var/www/nextcloud/remote.php","line":166,"args":["/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/nextcloud/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"}}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):


<?php
$CONFIG = array (
  'instanceid' => 'oc9e',
  'passwordsalt' => 'iSoPmSJB',
  'secret' => 'qMlcbG',
  'trusted_domains' =>
  array (
    0 => '10.1.4.4',
    1 => 'aniet',
    2 => 'a2',
  ),
  'datadirectory' => '/home/produccion/FTP/data',
  'dbtype' => 'mysql',
  'version' => '24.0.3.2',
  'overwrite.cli.url' => 'http://10.1.4.4/nextcloud',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'next',
  'dbpassword' => 'M8a',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'tls',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'ia',
  'mail_domain' => 'hellm',
  'mail_smtpauth' => 1,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '587',
  'mail_smtpname' => '',
  'mail_smtppassword' => '',
  'memcache.local' => '\OC\Memcache\APCu',
  'default_phone_region' => 'ES',
);