Phabricator project.search api broken after 2020.16 release

Phabricator project.search api broken after 2020.16 release

Before upgrading to 2020.16
curl -k -s -X GET https://project.core../api/project.search?api.token=api- | jq -r
{
“result”: {
“data”: [
{
“id”: 1,
“type”: “PROJ”,
“phid”: “PHID-PROJ-n5qslp3doi6aezf2t7ou”,
“fields”: {
“name”: “Tralala”,
“slug”: “tralala”,
“subtype”: “default”,
“milestone”: null,
“depth”: 0,
“parent”: null,
“icon”: {
“key”: “project”,
“name”: “Project”,
“icon”: “fa-briefcase”
},
“color”: {
“key”: “pink”,
“name”: “Pink”
},
“spacePHID”: null,
“dateCreated”: 1589352293,
“dateModified”: 1589352300,
“policy”: {
“view”: “users”,
“edit”: “users”,
“join”: “users”
},
“description”: “Just a dummy project”,
“startdate”: 1589155200,
“enddate”: 1590105600,
“issprint”: true
},
“attachments”: {}
}
],
“maps”: {
“slugMap”: {}
},
“query”: {
“queryKey”: null
},
“cursor”: {
“limit”: 100,
“after”: null,
“before”: null,
“order”: null
}
},
“error_code”: null,
“error_info”: null
}

Phabricator Version Information

Library Version Date Branchpoint
phabricator ff6f24db2bc0 Feb 12 2020 2327578adc94
arcanist 729100955129 Jan 30 2020 21a1828ea06c
phutil 034cf7cc3994 Jan 30 2020 cc2a3dbf5903
sprint aa3119810c14 Jun 25 2019

After upgrading to 2020.16
curl -k -s -X GET https://project.core../api/project.search?api.token=api- | jq -r
{
“result”: null,
“error_code”: “ERR-CONDUIT-CORE”,
“error_info”: “Undefined index: PHID-PROJ-n5qslp3doi6aezf2t7ou”
}

Phabricator Version Information

Library Version Date Branchpoint
phabricator b24bac5afbd4 Fri, May 15 e959f934893c
arcanist a5bfb968cd90 Fri, May 15 e3030ebcad53
sprint aa3119810c14 Jun 25 2019

Already tried upgrading to 2020.17, then 2020.18 and 2020.19 - issue is still present.

We are using the api to retrieve data from Phabricator and integrate with other tools and now we cannot use it anymore.

1 Like

I can’t reproduce this.

Your webserver error log may have a more specific version of the error message (with a stack trace).

My logs don’t show anything strange:

100.96.17.216 - - [18/May/2020:12:42:41 +0000] “GET / HTTP/1.1” 200 5435
100.96.17.216 - - [18/May/2020:12:42:46 +0000] “GET /conduit HTTP/1.1” 302 20
100.96.17.216 - - [18/May/2020:12:42:46 +0000] “GET /conduit/ HTTP/1.1” 200 12557
100.96.17.216 - - [18/May/2020:12:42:47 +0000] “GET /res/1589594910T/defaultX/phabricator/98e6504a/rsrc/externals/javelin/core/init.js HTTP/1.1” 200 2801
100.96.17.216 - - [18/May/2020:12:42:47 +0000] “GET /res/1589594910T/defaultX/phabricator/ba768cdb/core.pkg.css HTTP/1.1” 200 111247
100.96.17.216 - - [18/May/2020:12:42:47 +0000] “GET /res/1589594910T/defaultX/phabricator/845355f4/core.pkg.js HTTP/1.1” 200 128929
100.96.17.216 - - [18/May/2020:12:42:47 +0000] “GET /file/data/5t2ixkblbji6aobfqezd/PHID-FILE-b3dw6fv6xsla3k5uuurp/logo HTTP/1.1” 200 2702
100.96.17.216 - - [18/May/2020:12:42:47 +0000] “GET /file/data/c3p7xdqe62tca6pg4yua/PHID-FILE-jafpdzhnhja7ewvsdeyr/868e67-alphanumeric_aleo-white_V.png-255%2C255%2C255%2C0.4.png HTTP/1.1” 200 4268
100.96.17.216 - - [18/May/2020:12:42:47 +0000] “GET /res/phabricator/8f846797/rsrc/externals/font/lato/lato-regular.woff2 HTTP/1.1” 200 79154
100.96.17.216 - - [18/May/2020:12:42:47 +0000] “GET /res/phabricator/389fcdb1/rsrc/externals/font/lato/lato-bold.woff2 HTTP/1.1” 200 77326
100.96.17.216 - - [18/May/2020:12:42:47 +0000] “GET /res/phabricator/351fd46a/rsrc/externals/font/fontawesome/fontawesome-webfont.woff2?v=4.7.0 HTTP/1.1” 200 77169
100.96.17.216 - - [18/May/2020:12:42:58 +0000] “GET /conduit/method/project.search/ HTTP/1.1” 200 12387
100.96.17.216 - - [18/May/2020:12:42:59 +0000] “GET /res/1589594910T/defaultX/phabricator/ce2cfc41/rsrc/css/application/conduit/conduit-api.css HTTP/1.1” 200 158
100.96.17.216 - - [18/May/2020:12:42:59 +0000] “GET /res/1589594910T/defaultX/phabricator/98e6504a/rsrc/externals/javelin/core/init.js HTTP/1.1” 200 2801
100.96.17.216 - - [18/May/2020:12:42:59 +0000] “GET /res/1589594910T/defaultX/phabricator/ba768cdb/core.pkg.css HTTP/1.1” 200 111247
100.96.17.216 - - [18/May/2020:12:42:59 +0000] “GET /res/1589594910T/defaultX/phabricator/845355f4/core.pkg.js HTTP/1.1” 200 128929
100.96.17.216 - - [18/May/2020:12:42:59 +0000] “GET /file/data/5t2ixkblbji6aobfqezd/PHID-FILE-b3dw6fv6xsla3k5uuurp/logo HTTP/1.1” 200 2702
100.96.17.216 - - [18/May/2020:12:42:59 +0000] “GET /file/data/c3p7xdqe62tca6pg4yua/PHID-FILE-jafpdzhnhja7ewvsdeyr/868e67-alphanumeric_aleo-white_V.png-255%2C255%2C255%2C0.4.png HTTP/1.1” 200 4268
100.96.17.216 - - [18/May/2020:12:42:59 +0000] “GET /res/phabricator/351fd46a/rsrc/externals/font/fontawesome/fontawesome-webfont.woff2?v=4.7.0 HTTP/1.1” 200 77169
100.96.17.216 - - [18/May/2020:12:42:59 +0000] “GET /res/phabricator/8f846797/rsrc/externals/font/lato/lato-regular.woff2 HTTP/1.1” 200 79154
100.96.17.216 - - [18/May/2020:12:42:59 +0000] “GET /res/phabricator/389fcdb1/rsrc/externals/font/lato/lato-bold.woff2 HTTP/1.1” 200 77326
100.96.17.216 - - [18/May/2020:12:42:59 +0000] “GET /res/phabricator/fffc0d8c/rsrc/externals/font/lato/lato-italic.woff2 HTTP/1.1” 200 83826
100.96.17.216 - - [18/May/2020:12:43:04 +0000] “POST /api/project.search HTTP/1.1” 200 6270
100.96.17.216 - - [18/May/2020:12:43:05 +0000] “GET /res/1589594910T/defaultX/phabricator/98e6504a/rsrc/externals/javelin/core/init.js HTTP/1.1” 200 2801
100.96.17.216 - - [18/May/2020:12:43:05 +0000] “GET /res/1589594910T/defaultX/phabricator/ce2cfc41/rsrc/css/application/conduit/conduit-api.css HTTP/1.1” 200 158
100.96.17.216 - - [18/May/2020:12:43:05 +0000] “GET /res/1589594910T/defaultX/phabricator/ba768cdb/core.pkg.css HTTP/1.1” 200 111247
100.96.17.216 - - [18/May/2020:12:43:05 +0000] “GET /res/1589594910T/defaultX/phabricator/845355f4/core.pkg.js HTTP/1.1” 200 128929
100.96.17.216 - - [18/May/2020:12:43:05 +0000] “GET /res/phabricator/8f846797/rsrc/externals/font/lato/lato-regular.woff2 HTTP/1.1” 200 79154
100.96.17.216 - - [18/May/2020:12:43:05 +0000] “GET /res/phabricator/351fd46a/rsrc/externals/font/fontawesome/fontawesome-webfont.woff2?v=4.7.0 HTTP/1.1” 200 77169
100.96.17.216 - - [18/May/2020:12:43:05 +0000] “GET /res/phabricator/389fcdb1/rsrc/externals/font/lato/lato-bold.woff2 HTTP/1.1” 200 77326
100.96.17.216 - - [18/May/2020:12:43:05 +0000] “GET /file/data/c3p7xdqe62tca6pg4yua/PHID-FILE-jafpdzhnhja7ewvsdeyr/868e67-alphanumeric_aleo-white_V.png-255%2C255%2C255%2C0.4.png HTTP/1.1” 200 4268
100.96.17.216 - - [18/May/2020:12:43:05 +0000] “GET /file/data/5t2ixkblbji6aobfqezd/PHID-FILE-b3dw6fv6xsla3k5uuurp/logo HTTP/1.1” 200 2702

That is the access log and not the error log of your server. You need to look at the error log at the time of an failed conduit request.

[Tue May 19 08:41:06.616252 2020] [authz_core:debug] [pid 286] mod_authz_core.c(818): [client 100.96.17.216:39046] AH01626: authorization result of Require all granted: granted
[Tue May 19 08:41:06.616282 2020] [authz_core:debug] [pid 286] mod_authz_core.c(818): [client 100.96.17.216:39046] AH01626: authorization result of : granted
100.96.17.216 - - [19/May/2020:08:41:06 +0000] “POST /api/project.search HTTP/1.1” 200 6271
[Tue May 19 08:41:06.894319 2020] [authz_core:debug] [pid 308] mod_authz_core.c(818): [client 100.96.17.216:39090] AH01626: authorization result of Require all granted: granted
[Tue May 19 08:41:06.894355 2020] [authz_core:debug] [pid 308] mod_authz_core.c(818): [client 100.96.17.216:39090] AH01626: authorization result of : granted
[Tue May 19 08:41:06.910533 2020] [authz_core:debug] [pid 221] mod_authz_core.c(818): [client 100.96.17.216:39098] AH01626: authorization result of Require all granted: granted
[Tue May 19 08:41:06.910532 2020] [authz_core:debug] [pid 220] mod_authz_core.c(818): [client 100.96.17.216:39094] AH01626: authorization result of Require all granted: granted
[Tue May 19 08:41:06.910563 2020] [authz_core:debug] [pid 220] mod_authz_core.c(818): [client 100.96.17.216:39094] AH01626: authorization result of : granted
[Tue May 19 08:41:06.910578 2020] [authz_core:debug] [pid 222] mod_authz_core.c(818): [client 100.96.17.216:39096] AH01626: authorization result of Require all granted: granted
[Tue May 19 08:41:06.910625 2020] [authz_core:debug] [pid 222] mod_authz_core.c(818): [client 100.96.17.216:39096] AH01626: authorization result of : granted
[Tue May 19 08:41:06.910638 2020] [authz_core:debug] [pid 221] mod_authz_core.c(818): [client 100.96.17.216:39098] AH01626: authorization result of : granted
100.96.17.216 - - [19/May/2020:08:41:06 +0000] “GET /res/1589594910T/defaultX/phabricator/ce2cfc41/rsrc/css/application/conduit/conduit-api.css HTTP/1.1” 200 158
100.96.17.216 - - [19/May/2020:08:41:06 +0000] “GET /res/1589594910T/defaultX/phabricator/98e6504a/rsrc/externals/javelin/core/init.js HTTP/1.1” 200 2801
100.96.17.216 - - [19/May/2020:08:41:06 +0000] “GET /res/1589594910T/defaultX/phabricator/ba768cdb/core.pkg.css HTTP/1.1” 200 111247
100.96.17.216 - - [19/May/2020:08:41:06 +0000] “GET /res/1589594910T/defaultX/phabricator/845355f4/core.pkg.js HTTP/1.1” 200 128929
[Tue May 19 08:41:07.164045 2020] [authz_core:debug] [pid 224] mod_authz_core.c(818): [client 100.96.17.216:39150] AH01626: authorization result of Require all granted: granted
[Tue May 19 08:41:07.164075 2020] [authz_core:debug] [pid 224] mod_authz_core.c(818): [client 100.96.17.216:39150] AH01626: authorization result of : granted
[Tue May 19 08:41:07.176200 2020] [authz_core:debug] [pid 223] mod_authz_core.c(818): [client 100.96.17.216:39154] AH01626: authorization result of Require all granted: granted
[Tue May 19 08:41:07.176309 2020] [authz_core:debug] [pid 223] mod_authz_core.c(818): [client 100.96.17.216:39154] AH01626: authorization result of : granted
[Tue May 19 08:41:07.189704 2020] [authz_core:debug] [pid 299] mod_authz_core.c(818): [client 100.96.17.216:39158] AH01626: authorization result of Require all granted: granted, referer: https://project.core/res/1589594910T/defaultX/phabricator/ba768cdb/core.pkg.css
[Tue May 19 08:41:07.189704 2020] [authz_core:debug] [pid 286] mod_authz_core.c(818): [client 100.96.17.216:39162] AH01626: authorization result of Require all granted: granted, referer: https://project.core/res/1589594910T/defaultX/phabricator/ba768cdb/core.pkg.css
[Tue May 19 08:41:07.189742 2020] [authz_core:debug] [pid 286] mod_authz_core.c(818): [client 100.96.17.216:39162] AH01626: authorization result of : granted, referer: https://project.core/res/1589594910T/defaultX/phabricator/ba768cdb/core.pkg.css
[Tue May 19 08:41:07.189743 2020] [authz_core:debug] [pid 299] mod_authz_core.c(818): [client 100.96.17.216:39158] AH01626: authorization result of : granted, referer: https://project.core/res/1589594910T/defaultX/phabricator/ba768cdb/core.pkg.css
[Tue May 19 08:41:07.199163 2020] [authz_core:debug] [pid 308] mod_authz_core.c(818): [client 100.96.17.216:39160] AH01626: authorization result of Require all granted: granted, referer: https://project.core/res/1589594910T/defaultX/phabricator/ba768cdb/core.pkg.css
[Tue May 19 08:41:07.199198 2020] [authz_core:debug] [pid 308] mod_authz_core.c(818): [client 100.96.17.216:39160] AH01626: authorization result of : granted, referer: https://project.core/res/1589594910T/defaultX/phabricator/ba768cdb/core.pkg.css
100.96.17.216 - - [19/May/2020:08:41:07 +0000] “GET /res/phabricator/351fd46a/rsrc/externals/font/fontawesome/fontawesome-webfont.woff2?v=4.7.0 HTTP/1.1” 200 77169
100.96.17.216 - - [19/May/2020:08:41:07 +0000] “GET /res/phabricator/8f846797/rsrc/externals/font/lato/lato-regular.woff2 HTTP/1.1” 200 79154
100.96.17.216 - - [19/May/2020:08:41:07 +0000] “GET /res/phabricator/389fcdb1/rsrc/externals/font/lato/lato-bold.woff2 HTTP/1.1” 200 77326
100.96.17.216 - - [19/May/2020:08:41:07 +0000] “GET /file/data/c3p7xdqe62tca6pg4yua/PHID-FILE-jafpdzhnhja7ewvsdeyr/868e67-alphanumeric_aleo-white_V.png-255%2C255%2C255%2C0.4.png HTTP/1.1” 200 4268
100.96.17.216 - - [19/May/2020:08:41:07 +0000] “GET /file/data/5t2ixkblbji6aobfqezd/PHID-FILE-b3dw6fv6xsla3k5uuurp/logo HTTP/1.1” 200 2702

1 Like

That’s the source of your error. You have to find this error (with the subsequent stack trace) in your php error log.

Already enabled it but nothing goes to the log…

#added to php.ini
display_errors = On
display_startup_errors = On
error_log = /opt/bitnami/php/logs/php_error.log
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

Would DarkConsole output help in any way?

Update:

Seems this happens to upgraded existing phabricators, not on new provisioned ones.
Also tried bin/storage dump without indexes and reimport data into a new clean storage.default-namespace with no luck.