Server: Error: Trying to access array offset on value of type int at /var/www/nextcloud/lib/private/Files/Node/Node.php#328

Created on 21 Jul 2020  路  8Comments  路  Source: nextcloud/server

How to use GitHub

  • Please use the 馃憤 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce

  1. Look in Log

Server configuration

Operating system:
Ubuntu 18.04.4 LTS

Web server:
nginx 1.16.1

Database:
psql (PostgreSQL) 10.12 (Ubuntu 10.12-0ubuntu0.18.04.1)

PHP version:
PHP 7.4.8

Nextcloud version: (see Nextcloud admin page)
19.0.1

Updated from an older Nextcloud/ownCloud or fresh install:
Updated from 19.0.0

Where did you install Nextcloud from:
nextcloud.com

Signing status:


Signing status

No errors have been found.

List of activated apps:


App list

Enabled:
  - accessibility: 1.5.0
  - activity: 2.12.0
  - admin_audit: 1.9.0
  - announcementcenter: 3.8.1
  - apporder: 0.10.0
  - bruteforcesettings: 1.6.0
  - calendar: 2.0.3
  - camerarawpreviews: 0.7.4
  - cloud_federation_api: 1.2.0
  - comments: 1.9.0
  - dav: 1.15.0
  - event_update_notification: 1.0.2
  - external: 3.6.0
  - extract: 1.2.4
  - federatedfilesharing: 1.9.0
  - files: 1.14.0
  - files_accesscontrol: 1.9.0
  - files_automatedtagging: 1.9.0
  - files_downloadactivity: 1.8.0
  - files_pdfviewer: 1.8.0
  - files_readmemd: 1.1.4
  - 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
  - groupfolders: 6.0.6
  - impersonate: 1.6.1
  - logreader: 2.4.0
  - lookup_server_connector: 1.7.0
  - metadata: 0.12.0
  - notes: 3.6.0
  - notifications: 2.7.0
  - oauth2: 1.7.0
  - onlyoffice: 4.3.0
  - password_policy: 1.9.1
  - photos: 1.1.0
  - previewgenerator: 2.3.0
  - privacy: 1.3.0
  - provisioning_api: 1.9.0
  - quota_warning: 1.8.0
  - ransomware_protection: 1.7.0
  - recommendations: 0.7.0
  - serverinfo: 1.9.0
  - settings: 1.1.0
  - sharebymail: 1.9.0
  - suspicious_login: 3.1.0
  - systemtags: 1.9.0
  - tasks: 0.13.2
  - text: 3.0.1
  - theming: 1.10.0
  - twofactor_backupcodes: 1.8.0
  - updatenotification: 1.9.0
  - user_retention: 1.2.0
  - viewer: 1.3.0
  - workflowengine: 2.1.0
Disabled:
  - contacts
  - contactsinteraction
  - encryption
  - federation
  - files_external
  - nextcloud_announcements
  - support
  - survey_client
  - user_ldap

Nextcloud configuration:


Config report

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "skeletondirectory": "\/mnt\/ncdata\/__skeleton",
        "dbtype": "pgsql",
        "version": "19.0.1.1",
        "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***\/",
        "htaccess.RewriteBase": "\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "log_type": "file",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "loglevel": 2,
        "logtimezone": "Australia\/Melbourne",
        "mail_smtpmode": "smtp",
        "remember_login_cookie_lifetime": 0,
        "log_rotate_size": "10485760",
        "trashbin_retention_obligation": "auto, 14",
        "versions_retention_obligation": "auto, 365",
        "simpleSignUpLink.shown": false,
        "login_form_autocomplete": true,
        "filelocking.enabled": true,
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": "6379",
            "dbindex": "0",
            "timeout": "1.5"
        },
        "maintenance": false,
        "default_locale": "en_AU",
        "force_locale": "en_AU",
        "default_language": "en",
        "force_language": "en",
        "defaultapp": "activity,files",
        "activity_expire_days": 180,
        "session_lifetime": 14400,
        "session_keepalive": false,
        "lost_password_link": "disabled",
        "auth.webauthn.enabled": false,
        "overwriteprotocol": "https",
        "app_install_overwrite": [
            "activitylog",
            "uploaddetails",
            "drop_account",
            "files_readmemd",
            "afterlogic"
        ],
        "updater.release.channel": "stable",
        "theme": ""
    }
}

Are you using external storage, if yes which one: local/smb/sftp/...
Local storage

Are you using encryption: yes/no
No

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No

Client configuration

Browser:
Firefox 78.0.2 (64-bit)

Operating system:
Linux Mint 19.3

Logs

Nextcloud log (data/nextcloud.log)


Nextcloud log

{"reqId":"w32iJjkKwN5JPt2QlTwQ","level":3,"time":"2020-07-21T14:50:04+10:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"Trying to access array offset on value of type int at /var/www/nextcloud/lib/private/Files/Node/Node.php#328","userAgent":"--","version":"19.0.1.1","id":"5f167d34bb41a"}

Browser log


Browser log

DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_sharing/js/dist/files_sharing.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_versions/js/files_versions.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/text/js/viewer.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/comments/js/comments.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_sharing/js/dist/files_sharing_tab.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files/js/dist/sidebar.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/groupfolders/build/3.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_trashbin/js/files_trashbin.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/viewer/js/viewer.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/groupfolders/build/2.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files/js/dist/files-app-settings.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/core/js/dist/main.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_videoplayer/js/main.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_sharing/js/dist/main.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/notifications/js/notifications.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_sharing/js/dist/collaboration.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/groupfolders/build/files.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/core/js/dist/systemtags.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/text/js/files.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_readmemd/js/main.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/systemtags/js/systemtags.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/recommendations/js/main.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_versions/js/files_versions.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_sharing/js/dist/files_sharing.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/comments/js/comments.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files/js/dist/sidebar.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_sharing/js/dist/files_sharing_tab.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_sharing/js/dist/additionalScripts.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/text/js/viewer.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/viewer/js/viewer.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_trashbin/js/files_trashbin.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files/js/dist/files-app-settings.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/groupfolders/build/2.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/groupfolders/build/3.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_sharing/js/dist/main.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/notifications/js/notifications.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/core/js/dist/main.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/text/js/files.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_videoplayer/js/main.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_readmemd/js/main.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/groupfolders/build/files.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/recommendations/js/main.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/systemtags/js/systemtags.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_sharing/js/dist/collaboration.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_sharing/js/dist/files_sharing.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/core/js/dist/systemtags.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_versions/js/files_versions.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_sharing/js/dist/additionalScripts.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/comments/js/comments.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/text/js/viewer.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files/js/dist/sidebar.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/viewer/js/viewer.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_sharing/js/dist/files_sharing_tab.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files_trashbin/js/files_trashbin.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/groupfolders/build/3.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/files/js/dist/files-app-settings.js.map: Unexpected token < in JSON at position 0
DevTools failed to load SourceMap: Could not parse content for https://***REMOVED SENSITIVE VALUE***/apps/groupfolders/build/2.js.map: Unexpected token < in JSON at position 0

0. Needs triage bug needs info

All 8 comments

Mind to apply https://github.com/nextcloud/server/issues/19010#issuecomment-576683752 and share the stack trace?

PS if I do 19010 how do I share stack trace?

You should see another line in your log.

Okay thanks, I'll be gutsy and give it a go changing core files to help fix this! First timer... so fingers crossed. 馃

Changes made now, standby for logs. I'll update as soon as I notice one.

This is what I've got now:

{"reqId":"klxgdV86kT6p2S2NMlE4","level":3,"time":"2020-07-22T13:10:07+10:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":{"Exception":"LogicException","Message":"$path is a integer: 13","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Files/Node/Folder.php","line":60,"function":"isValidPath","class":"OC\\Files\\Node\\Node","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/Folder.php","line":138,"function":"getFullPath","class":"OC\\Files\\Node\\Folder","type":"->"},{"function":"get","class":"OC\\Files\\Node\\Folder","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Helper/LazyFolder.php","line":72,"function":"call_user_func_array"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Helper/LazyFolder.php","line":144,"function":"__call","class":"OCA\\GroupFolders\\Helper\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Mount/MountProvider.php","line":184,"function":"get","class":"OCA\\GroupFolders\\Helper\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Mount/MountProvider.php","line":124,"function":"getFolder","class":"OCA\\GroupFolders\\Mount\\MountProvider","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/VersionsBackend.php","line":160,"function":"getMount","class":"OCA\\GroupFolders\\Mount\\MountProvider","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":62,"function":"getAllVersionedFiles","class":"OCA\\GroupFolders\\Versions\\VersionsBackend","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/Versions/GroupVersionsExpireManager.php","line":57,"function":"expireFolder","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},{"file":"/var/www/nextcloud/apps/groupfolders/lib/BackgroundJob/ExpireGroupVersions.php","line":40,"function":"expireAll","class":"OCA\\GroupFolders\\Versions\\GroupVersionsExpireManager","type":"->"},{"file":"/var/www/nextcloud/lib/private/BackgroundJob/Job.php","line":62,"function":"run","class":"OCA\\GroupFolders\\BackgroundJob\\ExpireGroupVersions","type":"->"},{"file":"/var/www/nextcloud/lib/private/BackgroundJob/TimedJob.php","line":57,"function":"execute","class":"OC\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":126,"function":"execute","class":"OC\\BackgroundJob\\TimedJob","type":"->"}],"File":"/var/www/nextcloud/lib/private/Files/Node/Node.php","Line":332,"CustomMessage":"--"},"userAgent":"--","version":"19.0.1.1","id":"5f17b04fe05f5"}

Should be fixed by: https://github.com/nextcloud/groupfolders/pull/942

Unfortunately there is no release of groupfolders app with this fix yet.

Hi
I have a similar issue but I am unsure if there is an appropriate bug report already, my log is getting flooded with the below message.
Do I need to open a bug report for this separately?

Trying to access array offset on value of type null at /var/www/nextcloud/lib/private/Files/Cache/Scanner.php#418

Nextcloud 19.0.1
PHP 7.4
Ubuntu 20.04

Closing in favour of https://github.com/nextcloud/groupfolders/issues/907 (which is also closed. fix is merged, next step is a release, already pinged the right people).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mfechner picture mfechner  路  3Comments

brylie picture brylie  路  3Comments

ghost picture ghost  路  3Comments

mama21mama picture mama21mama  路  3Comments

blackcrack picture blackcrack  路  3Comments