Skip to content

Trying to access array offset on value of type null when looking at empty log on NC 19 #354

Closed

Description

@cdjenkins

Steps to reproduce

  1. Remove nextcloud.log from the file system
  2. Go to logging under administration
  3. See error

Expected behaviour

An empty log should yield a blank screen.

Actual behaviour

I see on entry:
[PHP] Error: Trying to access array offset on value of type null at /var/www/guruinventions.com/nc-19/html/apps/logreader/lib/Controller/LogController.php#100

GET /index.php/apps/logreader/poll?lastReqId=yLCLvoT32FmQSoKo7kJa
from x.x.x.x by admin at 2020-06-13T21:11:27+00:00

Server configuration

Operating system:
Ubuntu server 18.04 LTS

Web server:
Apache 2.4.29

Database:
Mysql 5.7

PHP version:
7.4.7

Nextcloud version: (see Nextcloud admin page)
19.0.0

Where did you install Nextcloud from:
web installer

List of activated apps:
Enabled:

  • accessibility: 1.5.0
  • activity: 2.12.0
  • admin_audit: 1.9.0
  • bruteforcesettings: 1.6.0
  • calendar: 2.0.3
  • cloud_federation_api: 1.2.0
  • comments: 1.9.0
  • contacts: 3.3.0
  • contactsinteraction: 1.0.0
  • dav: 1.15.0
  • federatedfilesharing: 1.9.0
  • federation: 1.9.0
  • files: 1.14.0
  • files_pdfviewer: 1.8.0
  • files_rightclick: 0.16.0
  • files_sharing: 1.11.0
  • files_trashbin: 1.9.0
  • files_versions: 1.12.0
  • files_videoplayer: 1.8.0
  • firstrunwizard: 2.8.0
  • logreader: 2.4.0
  • lookup_server_connector: 1.7.0
  • mail: 1.3.5
  • nextcloud_announcements: 1.8.0
  • notifications: 2.7.0
  • oauth2: 1.7.0
  • password_policy: 1.9.1
  • photos: 1.1.0
  • privacy: 1.3.0
  • provisioning_api: 1.9.0
  • recommendations: 0.7.0
  • richdocuments: 3.7.0
  • serverinfo: 1.9.0
  • settings: 1.1.0
  • sharebymail: 1.9.0
  • spreed: 9.0.1
  • support: 1.2.1
  • survey_client: 1.7.0
  • systemtags: 1.9.0
  • text: 3.0.1
  • theming: 1.10.0
  • twofactor_backupcodes: 1.8.0
  • updatenotification: 1.9.0
  • viewer: 1.3.0
  • workflowengine: 2.1.0
    Disabled:
  • encryption
  • files_external
  • user_ldap

Nextcloud configuration:
{
"system": {
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"nc-dev.guruinventions.com"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"dbtype": "mysql",
"version": "19.0.0.12",
"overwrite.cli.url": "https://nc-dev.guruinventions.com",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true
}
}

Client configuration

Browser:
Chrome Version 83.0.4103.97 (Official Build) (64-bit)
Operating system:
Ubuntu Desktop 18.04 LTS

Logs

Nextcloud log (data/owncloud.log)

{"reqId":"9ICxeixGX3oBBRd3526U","level":3,"time":"2020-06-13T21:14:37+00:00","remoteAddr":"73.26.35.38","user":"admin","app":"PHP","method":"GET","url":"/index.php/apps/logreader/poll?lastReqId=k2m2u80RLahqiRoV0QX8","message":"Trying to access array offset on value of type null at /var/www/guruinventions.com/nc-19/html/apps/logreader/lib/Controller/LogController.php#100","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36","version":"19.0.0.12"}


Browser log

Nothing noticed

Activity

  1. szaimen commented on Apr 16, 2021

    @szaimen

    I've got the same issue.
    Here is the full log:

    {
      "reqId": "f7z8nIwN0z6paGtgqOFc",
      "level": 3,
      "time": "2021-04-16T16:39:17+02:00",
      "remoteAddr": "127.0.0.1",
      "user": "admin",
      "app": "PHP",
      "method": "GET",
      "url": "/apps/logreader/poll?lastReqId=9lOvkR2k20xmEcOaKyqr",
      "message": {
        "Exception": "Error",
        "Message": "Trying to access array offset on value of type null at /var/www/nextcloud/apps/logreader/lib/Controller/LogController.php#100",
        "Code": 0,
        "Trace": [
          {
            "file": "/var/www/nextcloud/apps/logreader/lib/Controller/LogController.php",
            "line": 100,
            "function": "onError",
            "class": "OC\\Log\\ErrorHandler",
            "type": "::"
          },
          {
            "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
            "line": 169,
            "function": "poll",
            "class": "OCA\\LogReader\\Controller\\LogController",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php",
            "line": 100,
            "function": "executeController",
            "class": "OC\\AppFramework\\Http\\Dispatcher",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/AppFramework/App.php",
            "line": 152,
            "function": "dispatch",
            "class": "OC\\AppFramework\\Http\\Dispatcher",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/lib/private/Route/Router.php",
            "line": 309,
            "function": "main",
            "class": "OC\\AppFramework\\App",
            "type": "::"
          },
          {
            "file": "/var/www/nextcloud/lib/base.php",
            "line": 1008,
            "function": "match",
            "class": "OC\\Route\\Router",
            "type": "->"
          },
          {
            "file": "/var/www/nextcloud/index.php",
            "line": 37,
            "function": "handleRequest",
            "class": "OC",
            "type": "::"
          }
        ],
        "File": "/var/www/nextcloud/lib/private/Log/ErrorHandler.php",
        "Line": 91,
        "CustomMessage": "--"
      },
      "userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0",
      "version": "20.0.9.1",
      "id": "6079a19a9abf1"
    }
  2. joshtrichards commented on May 26, 2023

    @joshtrichards
    Member

    I think this has since been addressed. At least I'm unable to reproduce it in NC26. Are either of you?

  3. joshtrichards commented on Jun 8, 2023

    @joshtrichards
    Member

    Fixed by #631 (and possibly others).

  4. susnux commented on Nov 11, 2023

    @susnux
    Contributor

    Thank you @joshtrichards, I am closing this as it is fixed by #631

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions