[BUG] Parameter must be an array [...] (redis) #102

Closed
opened 2022-05-29 12:38:44 +02:00 by yupthatguy · 5 comments

Issue

When enable in NC 24.0.1 it throws the following error in Admin -> Logging

{"reqId":"YpNKG602QbLeQPL8sg8rdwAACA8","level":3,"time":"2022-05-29T10:25:39+00:00","remoteAddr":"192.168.61.1","user":"affecteduseraccount","app":"PHP","method":"POST","url":"/index.php/settings/apps/enable","message":"count(): Parameter must be an array or an object that implements Countable at /home/adminuser/public_html/lib/private/Memcache/Redis.php#81","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36","version":"24.0.1.1","exception":{"Exception":"Error","Message":"count(): Parameter must be an array or an object that implements Countable at /home/adminuser/public_html/lib/private/Memcache/Redis.php#81","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/home/adminuser/public_html/lib/private/Memcache/Redis.php","line":81,"function":"count"},{"file":"/home/adminuser/public_html/lib/private/App/AppManager.php","line":451,"function":"clear","class":"OC\\Memcache\\Redis","type":"->"},{"file":"/home/adminuser/public_html/lib/private/App/AppManager.php","line":326,"function":"clearAppsCache","class":"OC\\App\\AppManager","type":"->"},{"file":"/home/adminuser/public_html/apps/settings/lib/Controller/AppSettingsController.php","line":456,"function":"enableApp","class":"OC\\App\\AppManager","type":"->"},{"file":"/home/adminuser/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/home/adminuser/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/adminuser/public_html/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/adminuser/public_html/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/adminuser/public_html/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/adminuser/public_html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/adminuser/public_html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"62934a46ebf33"}

Other than this error seems to work fine.

Environment

  • Custom menu version: 2.3.5
  • Nextcloud version: 24.0.1
  • PHP version: php7.4-fpm
  • Web server (Nginx, Apache2):
  • Web browser and version (Firefox 80, Google Chrome 74, etc): chromium 101.0.4951.64
{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "www.example.test",
        "example.test"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "24.0.1.1",
    "overwrite.cli.url": "https:\/\/www.example.test",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "memcache.local": "\\OC\\Memcache\\Redis",
    "filelocking.enabled": true,
    "memcache.locking": "\\OC\\Memcache\\APCu",
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 6379,
        "timeout": 0,
        "password": "***REMOVED SENSITIVE VALUE***"
    },
    "default_phone_region": "CN",
    "log_type": "file",
    "logfile": "\/home\/adminuser\/ncerrors\/error.log",
    "loglevel": 0,
    "logdateformat": "F d, Y H:i:s",
    "log_rotate_size": "100 * 1024 * 1024",
    "trashbin_retention_obligation": "3, 7",
    "mail_smtpmode": "smtp",
    "mail_smtpsecure": "tls",
    "mail_sendmailmode": "smtp",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauthtype": "PLAIN",
    "mail_smtpauth": 1,
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "587",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "maintenance": false,
    "auth.bruteforce.protection.enabled": "false",
    "theme": ""
}

Steps to reproduce

...

Observed Results

...

Expected Results

Clean Error Log
...

## Issue When enable in NC 24.0.1 it throws the following error in Admin -> Logging ``` {"reqId":"YpNKG602QbLeQPL8sg8rdwAACA8","level":3,"time":"2022-05-29T10:25:39+00:00","remoteAddr":"192.168.61.1","user":"affecteduseraccount","app":"PHP","method":"POST","url":"/index.php/settings/apps/enable","message":"count(): Parameter must be an array or an object that implements Countable at /home/adminuser/public_html/lib/private/Memcache/Redis.php#81","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36","version":"24.0.1.1","exception":{"Exception":"Error","Message":"count(): Parameter must be an array or an object that implements Countable at /home/adminuser/public_html/lib/private/Memcache/Redis.php#81","Code":0,"Trace":[{"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::"},{"file":"/home/adminuser/public_html/lib/private/Memcache/Redis.php","line":81,"function":"count"},{"file":"/home/adminuser/public_html/lib/private/App/AppManager.php","line":451,"function":"clear","class":"OC\\Memcache\\Redis","type":"->"},{"file":"/home/adminuser/public_html/lib/private/App/AppManager.php","line":326,"function":"clearAppsCache","class":"OC\\App\\AppManager","type":"->"},{"file":"/home/adminuser/public_html/apps/settings/lib/Controller/AppSettingsController.php","line":456,"function":"enableApp","class":"OC\\App\\AppManager","type":"->"},{"file":"/home/adminuser/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":225,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/home/adminuser/public_html/lib/private/AppFramework/Http/Dispatcher.php","line":133,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/adminuser/public_html/lib/private/AppFramework/App.php","line":172,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/home/adminuser/public_html/lib/private/Route/Router.php","line":298,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/home/adminuser/public_html/lib/base.php","line":1023,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/home/adminuser/public_html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/home/adminuser/public_html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"id":"62934a46ebf33"} ``` Other than this error seems to work fine. ### Environment * Custom menu version: 2.3.5 * Nextcloud version: 24.0.1 * PHP version: php7.4-fpm * Web server (Nginx, Apache2): * Web browser and version (Firefox 80, Google Chrome 74, etc): chromium 101.0.4951.64 ``` { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "www.example.test", "example.test" ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "24.0.1.1", "overwrite.cli.url": "https:\/\/www.example.test", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "memcache.local": "\\OC\\Memcache\\Redis", "filelocking.enabled": true, "memcache.locking": "\\OC\\Memcache\\APCu", "redis": { "host": "***REMOVED SENSITIVE VALUE***", "port": 6379, "timeout": 0, "password": "***REMOVED SENSITIVE VALUE***" }, "default_phone_region": "CN", "log_type": "file", "logfile": "\/home\/adminuser\/ncerrors\/error.log", "loglevel": 0, "logdateformat": "F d, Y H:i:s", "log_rotate_size": "100 * 1024 * 1024", "trashbin_retention_obligation": "3, 7", "mail_smtpmode": "smtp", "mail_smtpsecure": "tls", "mail_sendmailmode": "smtp", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtpauthtype": "PLAIN", "mail_smtpauth": 1, "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "587", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "maintenance": false, "auth.bruteforce.protection.enabled": "false", "theme": "" } ``` ### Steps to reproduce ... ### Observed Results ... ### Expected Results Clean Error Log ...
yupthatguy added the
bug
label 2022-05-29 12:38:44 +02:00
Owner

Hi,

This error doesn't seem to be generated by the custom menu but by the Redis implementation.

Does custom menu work after being enabled?

Hi, This error doesn't seem to be generated by the custom menu but by the Redis implementation. Does custom menu work after being enabled?
Author

It works when enabled... but the error above instantly appears in log... I am not 1,000% sure of my redis config... but you can see my config file is correct and I get all checks passed..and I haven't changed much of anything in Redis config file

I can't remember exactly at the moment (bedtime) but I got an error message regarding the use of "app" was deprecated, so I disabled the app. I thought the message above showed the error, but reviewing again.. I don't see it. I will try locate that specific error message tomorrow..

It works when enabled... but the error above instantly appears in log... I am not 1,000% sure of my redis config... but you can see my config file is correct and I get all checks passed..and I haven't changed much of anything in Redis config file I can't remember exactly at the moment (bedtime) but I got an error message regarding the use of "app" was deprecated, so I disabled the app. I thought the message above showed the error, but reviewing again.. I don't see it. I will try locate that specific error message tomorrow..
Owner

I will publish a fix to remove the deprecated notice of app but this is not a real issue.

I will publish a fix to remove the deprecated notice of app but this is not a real issue.
deblan changed title from [BUG] to [BUG] Parameter must be an array [...] (redis) 2022-05-30 19:14:15 +02:00
Author

Much appreciated... You have a very cool app. I am just perhaps being overly strict about clearling my error log. great work you do.. definitely improves the nextcloud experience.

Much appreciated... You have a very cool app. I am just perhaps being overly strict about clearling my error log. great work you do.. definitely improves the nextcloud experience.
Owner

v2.4.0 is published!

v2.4.0 is published!
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: deblan/side_menu#102
No description provided.