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

[Bug]: PHP 8.1.9: class "logger" does not exist #858

Closed
6 of 9 tasks
joergmschulz opened this issue Sep 27, 2022 · 1 comment · Fixed by #863
Closed
6 of 9 tasks

[Bug]: PHP 8.1.9: class "logger" does not exist #858

joergmschulz opened this issue Sep 27, 2022 · 1 comment · Fixed by #863
Labels
bug good first issue Small tasks with clear documentation about how and in which place you need to fix things in.

Comments

@joergmschulz
Copy link

joergmschulz commented Sep 27, 2022

⚠️ This issue respects the following points: ⚠️

Bug description

in reference to #33531: : using PHP 7.4, maps floods the log with the following message:
`[no app in context] Fehler: OCP\AppFramework\QueryException: Could not resolve logger! Class "logger" does not exist at <>

  1. <>
    OC\AppFramework\Utility\SimpleContainer->OC\AppFramework\Utility{closure}("*** sensitive parameters replaced ***")
  2. /www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 108
    array_map(Closure {}, [ReflectionParam ... "])
  3. /www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 116
    OC\AppFramework\Utility\SimpleContainer->buildClass(ReflectionClass ... "})
  4. /www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php line 133
    OC\AppFramework\Utility\SimpleContainer->resolve("OCA\Maps\List ... r")
  5. /www/nextcloud/lib/private/ServerContainer.php line 161
    OC\AppFramework\Utility\SimpleContainer->query("OCA\Maps\List ... r", true)
  6. /www/nextcloud/lib/private/EventDispatcher/ServiceEventListener.php line 71
    OC\ServerContainer->query("OCA\Maps\List ... r")
  7. /www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 251
    OC\EventDispatcher\ServiceEventListener->__invoke(OCA\DAV\Events\CardUpdatedEvent {}, "OCA\DAV\Events\CardUpdatedEvent", Symfony\Componen ... {})
  8. /www/nextcloud/3rdparty/symfony/event-dispatcher/EventDispatcher.php line 73
    Symfony\Component\EventDispatcher\EventDispatcher->callListeners([Closure {},Closure {}], "OCA\DAV\Events\CardUpdatedEvent", OCA\DAV\Events\CardUpdatedEvent {})
  9. /www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 88
    Symfony\Component\EventDispatcher\EventDispatcher->dispatch(OCA\DAV\Events\CardUpdatedEvent {}, "OCA\DAV\Events\CardUpdatedEvent")
  10. /www/nextcloud/lib/private/EventDispatcher/EventDispatcher.php line 100
    OC\EventDispatcher\EventDispatcher->dispatch("OCA\DAV\Events\CardUpdatedEvent", OCA\DAV\Events\CardUpdatedEvent {})
  11. /www/nextcloud/apps/dav/lib/CardDAV/CardDavBackend.php line 760
    OC\EventDispatcher\EventDispatcher->dispatchTyped(OCA\DAV\Events\CardUpdatedEvent {})
  12. /www/nextcloud/3rdparty/sabre/dav/lib/CardDAV/Card.php line 94
    OCA\DAV\CardDAV\CardDavBackend->updateCard("*** sensitive parameters replaced ***")
  13. /www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1137
    Sabre\CardDAV\Card->put("*** sensitive parameters replaced ***")
  14. /www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 492
    Sabre\DAV\Server->updateFile("*** sensitive parameters replaced ***")
  15. /www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
  16. /www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit("method:PUT", [Sabre\HTTP\Requ ... }])
  17. /www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
  18. /www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
  19. /www/nextcloud/apps/dav/lib/Server.php line 358
    Sabre\DAV\Server->exec()
  20. /www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
  21. /www/nextcloud/remote.php line 166
    require_once("/www/nextcloud/ ... p")

PUT /remote.php/dav/addressbooks/users/joerg.schulz/default/29adc0b0-c7b9-45d0-92b6-483ff052ccdf.vcf
from 172.21.0.1 by joerg.schulz at 2022-09-27T08:08:10+02:00`

Steps to reproduce

1.install maps
2.activate maps
3.log is created
4. on deactivation of maps, this log isn't created any longer

Expected behavior

this message should not appear.

Installation method

Other

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.1

Web server

Nginx

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install of the server?

Updated from a minor version (ex. 22.2.3 to 22.2.4)

Is this bug present after an update or on a fresh install of the app?

No response

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "apps_paths": [
            {
                "path": "\/www\/nextcloud\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/data\/apps\/",
                "url": "\/custom-apps",
                "writable": true
            }
        ],
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "localhost"
        ],
        "dbtype": "pgsql",
        "version": "24.0.5.1",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance": false,
        "allow_user_to_change_display_name": true,
        "appcodechecker": true,
        "appstoreenabled": true,
        "auth.bruteforce.protection.enabled": true,
        "cache_chunk_gc_ttl": "60*60*24",
        "cache_path": "\/data\/cache\/",
        "check_data_directory_permissions": true,
        "check_for_working_htaccess": false,
        "check_for_working_wellknown_setup": true,
        "cipher": "AES-256-CFB",
        "debug": false,
        "default_language": "de",
        "default_locale": "de_DE",
        "defaultapp": "dashboard",
        "default_phone_region": "de",
        "enable_previews": true,
        "filelocking.debug": false,
        "filelocking.enabled": true,
        "filesystem_check_changes": 0,
        "force_language": "FALSE",
        "force_locale": "FALSE",
        "forwarded_for_headers": [
            "HTTP_X_FORWARDED",
            "HTTP_FORWARDED_FOR",
            "HTTP_X_FORWARDED_FOR"
        ],
        "hashingCost": 10,
        "knowledgebaseenabled": false,
        "ldapUserCleanupInterval": 51,
        "log_query": true,
        "log_type": "file",
        "logdateformat": "Y-m-d H:i:s",
        "logfile": "\/www\/logs\/nextcloud\/\/nextcloud.log",
        "logfilemode": 416,
        "login_form_autocomplete": true,
        "loglevel": 2,
        "logtimezone": "Europe\/Berlin",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_send_plaintext_only": false,
        "mail_sendmailmode": "smtp",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpdebug": false,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpport": 2587,
        "mail_smtptimeout": 10,
        "max_filesize_animated_gifs_public_sharing": 10,
        "mysql.utf8mb4": true,
        "overwritehost": "c.faudin.de",
        "overwriteprotocol": "https",
        "part_file_in_storage": true,
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
        "preview_max_filesize_image": 50,
        "preview_max_memory": 1024,
        "preview_max_x": 1024,
        "preview_max_y": 1024,
        "session_keepalive": true,
        "share_folder": "\/",
        "sharing.maxAutocompleteResults": 0,
        "sharing.minSearchStringLength": 0,
        "sharing.enable_share_accept": false,
        "sharing.force_share_accept": false,
        "sharing.enable_share_mail": true,
        "simpleSignUpLink.shown": true,
        "skeletondirectory": "\/data\/templates\/skeleton",
        "sort_groups_by_name": true,
        "sqlite.journal_mode": "DELETE",
        "tempdirectory": "\/data\/tmp\/",
        "theme": "",
        "token_auth_enforced": false,
        "trashbin_retention_obligation": "auto",
        "updatechecker": true,
        "upgrade.disable-web": false,
        "versions_retention_obligation": "auto",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6380,
            "password": "***REMOVED SENSITIVE VALUE***",
            "dbindex": 2
        },
        "mail_smtpauth": true,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "lost_password_link": "https:\/\/ssp.faudin.de\/?action=sendtoken",
        "mail_smtpsecure": "tls",
        "enabledPreviewProviders": [
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MSOfficeDoc",
            "OC\\Preview\\JPEG",
            "OC\\Preview\\PNG",
            "OC\\Preview\\GIF",
            "OC\\Preview\\BMP",
            "OC\\Preview\\XBitmap",
            "OC\\Preview\\MP3",
            "OC\\Preview\\HEIC",
            "OC\\Preview\\Movie",
            "OC\\Preview\\MKV",
            "OC\\Preview\\MOV",
            "OC\\Preview\\MP4",
            "OC\\Preview\\AVI",
            "OC\\Preview\\PNG"
        ],
        "app_install_overwrite": [
            "gpxedit"
        ]
    }
}

List of activated Apps

- accessibility: 1.10.0
  - activity: 2.16.0
  - apporder: 0.15.0
  - bbb: 2.3.1
  - bookmarks: 11.0.3
  - bruteforcesettings: 2.4.0
  - calendar: 3.5.0
  - circles: 24.0.1
  - cloud_federation_api: 1.7.0
  - comments: 1.14.0
  - contacts: 4.2.1
  - contactsinteraction: 1.5.0
  - dashboard: 7.4.0
  - dav: 1.22.0
  - deck: 1.7.1
  - drawio: 1.0.3
  - external: 4.0.0
  - federatedfilesharing: 1.14.0
  - files: 1.19.0
  - files_antivirus: 3.3.1
  - files_fulltextsearch: 24.0.1
  - files_fulltextsearch_tesseract: 24.0.0
  - files_linkeditor: 1.1.11
  - 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
  - fulltextsearch: 24.0.0
  - fulltextsearch_elasticsearch: 24.0.1
  - gpxedit: 0.0.14
  - gpxpod: 4.3.0
  - groupfolders: 12.0.1
  - impersonate: 1.11.0
  - logreader: 2.9.0
  - lookup_server_connector: 1.12.0
  - mail: 1.13.8
  - metadata: 0.16.0
  - nextcloud_announcements: 1.13.0
  - notifications: 2.12.1
  - oauth2: 1.12.0
  - photos: 1.6.0
  - polls: 3.8.1
  - previewgenerator: 5.1.0
  - privacy: 1.8.0
  - provisioning_api: 1.14.0
  - rainloop: 7.2.5
  - recommendations: 1.3.0
  - richdocuments: 6.2.0
  - serverinfo: 1.14.0
  - settings: 1.6.0
  - sharebymail: 1.14.0
  - spreed: 14.0.5
  - survey_client: 1.12.0
  - tasks: 0.14.4
  - text: 3.5.1
  - theming: 1.15.0
  - theming_customcss: 1.12.0
  - twofactor_backupcodes: 1.13.0
  - twofactor_email: 2.7.0
  - twofactor_nextcloud_notification: 3.4.0
  - twofactor_totp: 6.4.0
  - updatenotification: 1.14.0
  - user_ldap: 1.14.1
  - user_status: 1.4.0
  - viewer: 1.8.0
  - weather_status: 1.4.0
  - workflowengine: 2.6.0
Disabled:
  - admin_audit: 1.0.0
  - apps
  - data_request: 1.11.0
  - drop_account: 2.1.0
  - encryption: 1.6.0
  - federation: 0.0.4
  - files_clipboard: 0.7.1
  - files_external: 1.0.2
  - files_mindmap: 0.0.26
  - forms: 2.5.1
  - imageconverter: 1.3.2
  - maps: 0.2.1
  - password_policy: 1.0.0
  - socialsharing_email: 2.5.0
  - support: 1.3.0
  - systemtags: 1.0.2
  - talk_simple_poll: 1.3.1

Nextcloud Signing status

No response

Nextcloud Logs

No response

Browser Console

No response

Additional info

No response

@tcitworld
Copy link
Member

All the listeners in https://github.com/nextcloud/maps/tree/master/lib/Listener lack:

use OCP\ILogger;

@tcitworld tcitworld added good first issue Small tasks with clear documentation about how and in which place you need to fix things in. and removed 0. Needs triage labels Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug good first issue Small tasks with clear documentation about how and in which place you need to fix things in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants