zorn-v / nextcloud-social-login

GNU Affero General Public License v3.0
198 stars 137 forks source link

Some error occurred while saving settings #424

Closed cyanogenic closed 10 months ago

cyanogenic commented 10 months ago

Server:

I got an error message when I try to save my custom OAuth2 settings. image

Here's the Nextcloud logs:

{
  "reqId": "5voMbXku28YDcrW3RKkH",
  "level": 3,
  "time": "2023-08-31T08:46:50+00:00",
  "remoteAddr": "x.x.x.x",
  "user": "********",
  "app": "index",
  "method": "POST",
  "url": "/apps/sociallogin/settings/save-admin",
  "message": "array_keys(): Argument #1 ($array) must be of type array, null given in file '/var/www/nextcloud/apps/sociallogin/lib/Controller/SettingsController.php' line 56",
  "userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36",
  "version": "27.0.2.1",
  "exception": {
    "Exception": "Exception",
    "Message": "array_keys(): Argument #1 ($array) must be of type array, null given in file '/var/www/nextcloud/apps/sociallogin/lib/Controller/SettingsController.php' line 56",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
        "line": 183,
        "function": "dispatch",
        "class": "OC\\AppFramework\\Http\\Dispatcher",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Route/Router.php",
        "line": 315,
        "function": "main",
        "class": "OC\\AppFramework\\App",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/base.php",
        "line": 1071,
        "function": "match",
        "class": "OC\\Route\\Router",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/index.php",
        "line": 36,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
    "Line": 169,
    "Previous": {
      "Exception": "TypeError",
      "Message": "array_keys(): Argument #1 ($array) must be of type array, null given",
      "Code": 0,
      "Trace": [
        {
          "file": "/var/www/nextcloud/apps/sociallogin/lib/Controller/SettingsController.php",
          "line": 56,
          "function": "array_keys"
        },
        {
          "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 230,
          "function": "saveAdmin",
          "class": "OCA\\SocialLogin\\Controller\\SettingsController",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
          "line": 137,
          "function": "executeController",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
          "line": 183,
          "function": "dispatch",
          "class": "OC\\AppFramework\\Http\\Dispatcher",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/lib/private/Route/Router.php",
          "line": 315,
          "function": "main",
          "class": "OC\\AppFramework\\App",
          "type": "::"
        },
        {
          "file": "/var/www/nextcloud/lib/base.php",
          "line": 1071,
          "function": "match",
          "class": "OC\\Route\\Router",
          "type": "->"
        },
        {
          "file": "/var/www/nextcloud/index.php",
          "line": 36,
          "function": "handleRequest",
          "class": "OC",
          "type": "::"
        }
      ],
      "File": "/var/www/nextcloud/apps/sociallogin/lib/Controller/SettingsController.php",
      "Line": 56
    },
    "CustomMessage": "--"
  }
}
aep commented 10 months ago

can confirm this is broken in 5.5.0 but 5.4.3 works fine

cyanogenic commented 10 months ago

can confirm this is broken in 5.5.0 but 5.4.3 works fine

Yes.

zorn-v commented 10 months ago

Check v5.5.1

cyanogenic commented 10 months ago

Check v5.5.1

Now it's working, thanks a lot!