Page MenuHomePhabricator

Http502 when submitting or updating a diff
Closed, ResolvedPublic


When submitting or updating a diff, my diff submits successfully, but I get a "502 Bad Gateway" from Nginx. Nginx's error log says "upstream sent too big header while reading response header from upstream" but the real problem seems to be this php error:

ERROR 2: Illegal string offset 'phid' at [/app/phabricator/src/applications/differential/customfield/DifferentialReviewersField.php:246]

After reverting one of changes in D15934, Arcanist gives the appropriate response.

diff --git a/src/applications/differential/customfield/DifferentialReviewersField.php b/src/applications/differential/customfield/DifferentialReviewer
index d23dac5..062099b 100644
--- a/src/applications/differential/customfield/DifferentialReviewersField.php
+++ b/src/applications/differential/customfield/DifferentialReviewersField.php
@@ -242,8 +242,7 @@ final class DifferentialReviewersField
     $config_self_accept_key = 'differential.allow-self-accept';
     $allow_self_accept = PhabricatorEnv::getEnvConfig($config_self_accept_key);
-    foreach ($value as $spec) {
-      $phid = $spec['phid'];
+    foreach ($value as $phid) {
       if (($phid == $author_phid) && !$allow_self_accept) {
         throw new DifferentialFieldValidationException(

Repro steps

I've been reproducing this by creating empty commits and updating an existing diff, but this happens when submitting a diff as well:

$ git commit -m  "null commit to see what's happening" --allow-empty
[phab-update 07c89fe] null commit to see what's happening

$ arc diff
No lint engine configured for this project.
Running unit tests...
No unit test engine is configured for this project.
 SKIP STAGING  No staging area is configured for this repository.
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gateway</h1></center>
<hr><center>nginx/1.4.6 (Ubuntu)</center>
(Run with `--trace` for a full exception trace.)

Version info

phabricator 77d543ba44638a2e43e1b6bb7f75db80b4046409 (Fri, May 20)
arcanist 0249f90a9a4aa42da0823673a6ac8c620251d82a (Fri, May 20)
phutil 7ff4bd8dfb0b58686a72821dd0e9e79e0f5cbbb9 (Fri, May 20)

$ arc version
arcanist 0249f90a9a4aa42da0823673a6ac8c620251d82a (20 May 2016)
libphutil 7ff4bd8dfb0b58686a72821dd0e9e79e0f5cbbb9 (20 May 2016)