Trying to access array offset on value of type null at (also type int) errors

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2):18RC1
Operating system and version (eg, Ubuntu 17.04):CentOS 7.8
Apache or nginx version (eg, Apache 2.4.25): nginx 1.17.7
PHP version (eg, 7.1):7.4.1

The issue you are facing:

I see errors in the log, but everything feels ok.

Is this the first time you’ve seen this error? (Y/N):y

Steps to replicate it:

  1. Login
  2. At least when clicking images
  3. The errors appears

The output of your Nextcloud log in Admin > Logging:

{"reqId":"v8ovkg3mSiJ8tYdslmtk","level":3,"time":"2020-01-06T19:48:15+00:00","remoteAddr":"x","user":"admin","app":"PHP","method":"GET","url":"/apps/photos/","message":"Trying to access array offset on value of type null at /home/nginx/domains/public/3rdparty/leafo/scssphp/src/Compiler.php#5230","userAgent":"Mozilla/5.0 (X11; CrOS x86_64 12607.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.86 Safari/537.36","version":"18.0.0.8","id":"5e1391948523d"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '13',
  'passwordsalt' => 'Mountain salt',
  'secret' => 'service',
  'trusted_domains' => 
  array (
    0 => 'domains',
  ),
  'datadirectory' => '/home/nginx/domains/data',
  'dbtype' => 'mysql',
  'version' => '18.0.0.8',
  'overwrite.cli.url' => 'https://domains',
  'dbname' => 'next',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'cloud',
  'dbpassword' => 'qwerty',
  'installed' => true,
  'updater.release.channel' => 'beta',
 'memcache.local' => '\OC\Memcache\Redis',
 'filelocking.enabled' => 'true',
 'memcache.locking' => '\OC\Memcache\Redis',
 'redis' => array(
     'host' => '/var/run/redis/redis.sock',
     'port' => 0,
 'timeout' => 0.0,
      ),
'log_rotate_size' => 1048576,
);

The output of your Apache/nginx/system log in /var/log/____:

21.12.33.99 - user [06/Jan/2020:21:48:05 +0200] "PROPFIND /remote.php/webdav/ HTTP/1.1" 401 355 "-" "Mozilla/5.0 (Android) Nextcloud-android/3.9.2"
21.12.33.99 - - [06/Jan/2020:21:48:05 +0200] "GET /apps/logreader/poll?lastReqId=WnzznQNw3LUIoR38j46i HTTP/2.0" 200 289 "-" "Mozilla/5.0 (X11; CrOS x86_64 12607.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.86 Safari/537.36"
21.12.33.99 - - [06/Jan/2020:21:48:09 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 200 679 "-" "Mozilla/5.0 (X11; CrOS x86_64 12607.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.86 Safari/537.36"
21.12.33.99 - - [06/Jan/2020:21:48:15 +0200] "GET /apps/logreader/poll?lastReqId=QyoMlZEXPwMcPzXQ0rj8 HTTP/2.0" 200 442 "-" "Mozilla/5.0 (X11; CrOS x86_64 12607.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.86 Safari/537.36"
21.12.33.99 - - [06/Jan/2020:21:48:15 +0200] "GET /apps/photos/ HTTP/2.0" 200 5539 "-" "Mozilla/5.0 (X11; CrOS x86_64 12607.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.86 Safari/537.36"
21.12.33.99 - - [06/Jan/2020:21:48:15 +0200] "GET /apps/logreader/poll?lastReqId=v8ovkg3mSiJ8tYdslmtk HTTP/2.0" 499 0 "-" "Mozilla/5.0 (X11; CrOS x86_64 12607.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.86 Safari/537.36"
21.12.33.99 - - [06/Jan/2020:21:48:16 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0" 200 679 "-" "Mozilla/5.0 (X11; CrOS x86_64 12607.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.86 Safari/537.36"
21.12.33.99 - - [06/Jan/2020:21:48:16 +0200] "GET /cron.php HTTP/2.0" 200 40 "-" "Mozilla/5.0 (X11; CrOS x86_64 12607.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.86 Safari/537.36"
21.12.33.99 - - [06/Jan/2020:21:48:16 +0200] "SEARCH /remote.php/dav/ HTTP/2.0" 207 2693 "-" "Mozilla/5.0 (X11; CrOS x86_64 12607.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.86 Safari/537.36"
21.12.33.99 - - [06/Jan/2020:21:48:16 +0200] "GET /core/preview?fileId=10&x=256&y=256&a=false&v=e6964d1db7de4e7870c246aaeab3cfaa HTTP/2.0" 304 0 "-" "Mozilla/5.0 (X11; CrOS x86_64 12607.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.86 Safari/537.36"
21.12.33.99 - - [06/Jan/2020:21:48:16 +0200] "GET /core/preview?fileId=11&x=256&y=256&a=false&v=346e4f6520c6706a900674bc15c35e54 HTTP/2.0" 304 0 "-" "Mozilla/5.0 (X11; CrOS x86_64 12607.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.86 Safari/537.36"
21.12.33.99 - - [06/Jan/2020:21:48:16 +0200] "GET /core/preview?fileId=12&x=256&y=256&a=false&v=65134b3fda249dc55b4a69005aab5261 HTTP/2.0" 404 2 "-" "Mozilla/5.0 (X11; CrOS x86_64 12607.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.86 Safari/537.36"
21.12.33.99 - - [06/Jan/2020:21:48:16 +0200] "GET /core/preview?fileId=8&x=256&y=256&a=false&v=969aead87c41dc793d25ce517e8eb29c HTTP/2.0" 304 0 "-" "Mozilla/5.0 (X11; CrOS x86_64 12607.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.86 Safari/537.36"
21.12.33.99 - - [06/Jan/2020:21:48:16 +0200] "GET /core/preview?fileId=9&x=256&y=256&a=false&v=a8f1d42407a0c35c81af4e9780e948da HTTP/2.0" 304 0 "-" "Mozilla/5.0 (X11; CrOS x86_64 12607.58.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.86 Safari/537.36"
There are also `{"reqId":"1ocr1zneNOLFbHSfnhwX","level":3,"time":"2020-01-07T22:33:26+00:00","remoteAddr":"x","user":"admin","app":"PHP","method":"GET","url":"/apps/text/session/create?fileId=425&guestName=null&forceRecreate=false","message":"Trying to access array offset on value of type int at /home/nginx/domains/public/lib/private/Files/Node/Node.php#327","userAgent":"Mozilla/5.0 (Linux; Android 9; SM-G950F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.93 Mobile Safari/537.36","version":"18.0.0.8","id":"5e1508f66be74"}```

Is it PHP 7.4 or something else causing the errors?

I’m seeing the same in my nextcloud log.

Anyone have an idea of where to start looking?

My PHP and PHP-FPM logs are clean.

bump. Still getting these errors filling my nextcloud log.

anyone solve this yet?

The same error with me, but my web login does not work, phone app works.

Migrated from old server to new one, also new clean install does not work.

I found that this is a known problem, but it will not be fixed until Nextcloud 19 (scheduled for 5/21/20). there’s a supposed patch on github, but folks (including me) have not had success with it fixing this problem.