After an upgrade to the latest version of Phabricator, some users are running into an exception message when viewing specific diffs:
Unhandled Exception ("RuntimeException") Trying to access array offset on value of type null
When dismissing the message itself the user noticed that one of the files in the changeset seemed to be missing changes that they’d diffed.
From the logfiles:
2020/05/25 17:04:34 [error] 24732#24732: *12120 FastCGI sent in stderr: "PHP message: [2020-05-25 13:04:34] EXCEPTION: (RuntimeException) Trying to access array offset on value of type null at [<arcanist>/src/error/PhutilErrorHandler.php:263] PHP message: arcanist(head=master, ref.master=e3030ebcad53), phabricator(head=master, ref.master=2262bfcd1cbb) PHP message: #0 <#2> PhutilErrorHandler::handleError called at [<phabricator>/src/applications/differential/parser/DifferentialChangesetParser.php:1330] PHP message: #1 <#2> DifferentialChangesetParser::renderModifiedCoverage called at [<phabricator>/src/applications/differential/controller/DifferentialChangesetViewController.php:268] PHP message: #2 <#2> DifferentialChangesetViewController::handleRequest called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:288] PHP message: #3 phlog called at [<phabricator>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41] PHP message: #4 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:752] PHP message: #5 AphrontApplicationConfiguration::handleThrowable called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:300] PHP message: #6 AphrontApplicationConfiguration::processRequest called at [<phabricator>/src/aphront/configuration/AphrontApplicationConfiguration.php:208] PHP message: #7 AphrontApplicationConfiguration::runHTTPRequest called at [<phabricator>/webroot/index.php:35]" while reading response header from upstream, client: <ip address>, server: phabricator.<domain>.com, request: "POST /differential/changeset/ HTTP/1.1", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "phabricator.<domain>.com"
Seems like the actual issue is along the lines of this similar error: Exceptions when viewing diffs
Downgrading to PHP 7.2 resolves the error completely. The user noticed that once the downgrade was in place the file that seemed to be missing changes was now visibly correct without having to run
arc diff again, which was also fantastic.
- Run Phabricator on PHP 7.4
- Visit an affected diff
What constitutes an “affected” diff is still a bit of a mystery to me, though. Out of the better part of a hundred in-flight diffs we only had one report of this.
- phabricator -
2262bfcd1cbba fresh pull of the a529efa5b855
- arcanist - e3030ebcad53