Webhook Test Exception

#1

Observed Behavior:
When I run ./bin/webhook call --id 1 or ./bin/webhook call --id 1 --object R4:23012, an exception shows.

Expected Behavior:
Test a webhook.

Phabricator Version:
phabricator
d3df0a49f92a8be2f5b8a030af2f8fa5471cc45d (Tue, Mar 26) (branched from aae7bdbbdd5646457b6014210e6442ac665fe6e3 on origin)

arcanist
4d22e0f89f10b8a7f47f6ee615e0ccf0f354e582 (Fri, Mar 8) (branched from 9830c9316d38988b2dc283ac1a124b73bc8e6c5f on origin)

phutil
564c7b305974827a6163db4747c168e9fa3c500b (Sun, Mar 17) (branched from 34b68955748bb1b2fcbfa86ad69c0e4856d21906 on origin)

php
7.2.14

diff
2.8.1 at /usr/bin/diff

git
2.20.1 (Apple Git-117) at /usr/bin/git

hg
3.8.2 at /usr/local/bin/hg

pygmentize
Not Available

svn
1.10.3 at /usr/bin/svn

Reproduction Steps:

PS:

EXCEPTION: (Exception) Value passed to "phutil_string_cast()" is an array; arrays can not be sensibly cast to strings. at [<phutil>/src/utils/utils.php:1771]arcanist(head=stable, ref.master=bc9b70508edf, ref.stable=4d22e0f89f10), phabricator(head=stable, ref.master=e0cd3062d5ab, ref.stable=d3df0a49f92a), phutil(head=stable, ref.master=d37145bd144e, ref.stable=564c7b305974)
#0 phutil_string_cast(array) called at [<phutil>/src/parser/PhutilURI.php:47]
#1 PhutilURI::__construct(array) called at [<phabricator>/src/infrastructure/env/PhabricatorEnv.php:474]
#2 PhabricatorEnv::getCDNURI(string) called at [<phabricator>/src/applications/people/cache/PhabricatorUserProfileImageCacheType.php:101]
#3 PhabricatorUserProfileImageCacheType::getCacheVersion(PhabricatorUser) called at [<phabricator>/src/applications/people/cache/PhabricatorUserProfileImageCacheType.php:96]
#4 PhabricatorUserProfileImageCacheType::isRawCacheDataValid(PhabricatorUser, string, string) called at [<phabricator>/src/applications/people/query/PhabricatorPeopleQuery.php:572]
#5 PhabricatorPeopleQuery::fillUserCaches(array) called at [<phabricator>/src/applications/people/query/PhabricatorPeopleQuery.php:205]
#6 PhabricatorPeopleQuery::didFilterPage(array) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:285]
#7 PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/phid/type/PhabricatorPHIDType.php:91]
#8 PhabricatorPHIDType::loadObjects(PhabricatorObjectQuery, array) called at [<phabricator>/src/applications/phid/query/PhabricatorObjectQuery.php:153]
#9 PhabricatorObjectQuery::loadObjectsByPHID(array, array) called at [<phabricator>/src/applications/phid/query/PhabricatorObjectQuery.php:73]
#10 PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/phid/query/PhabricatorHandleQuery.php:46]
#11 PhabricatorHandleQuery::loadPage() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:248]
#12 PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/phid/handle/pool/PhabricatorHandlePool.php:73]
#13 PhabricatorHandlePool::loadPHIDs(array) called at [<phabricator>/src/applications/phid/handle/pool/PhabricatorHandleList.php:44]
#14 PhabricatorHandleList::loadHandles() called at [<phabricator>/src/applications/phid/handle/pool/PhabricatorHandleList.php:49]
#15 PhabricatorHandleList::getHandle(string) called at [<phabricator>/src/applications/phid/handle/pool/PhabricatorHandleList.php:130]
#16 PhabricatorHandleList::current()
#17 iterator_to_array(PhabricatorHandleList) called at [<phabricator>/src/applications/transactions/query/PhabricatorApplicationTransactionQuery.php:150]
#18 PhabricatorApplicationTransactionQuery::willFilterPage(array) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:259]
#19 PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/herald/management/HeraldWebhookCallManagementWorkflow.php:79]
#20 HeraldWebhookCallManagementWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:457]
#21 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:349]
#22 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/setup/manage_webhook.php:21]
0 Likes

#2

Have you configured security.alternate-file-domain with an array instead of a string?

The #1 frame of the stack trace at the top is calling PhutilURI::__construct(...) with an array parameter, but this is incorrect, and the code shouldn’t do this unless security.alternate-file-domain (or perhaps some other option) is incorrectly configured with an array.

0 Likes

#3

Thanks for your help!

set phabricator.base-uri from array to string works:

./bin/config set phabricator.base-uri XXXXX

Before:
image

0 Likes

closed #4
0 Likes