Steps to reproduce:
- PHP 8.2.7; Phorge at 108cbcd09bd39fda0ad24a2ee25afe5aac230e08
- Check that http://phorge.localhost/config/edit/repository.default-local-path/ is set to default /var/repo/
- Make sure that /var/repo/ exists locally
- As a Phorge admin, go to Diffusion at http://phorge.localhost/diffusion/
- Select in upper right corner to go to http://phorge.localhost/diffusion/edit/form/default/
- Select "Create Git Repository" to go to http://phorge.localhost/diffusion/edit/form/default/?vcs=git
- On the Create Repository page, in the Name field, enter gitRepoEmpty
- Select the Create Repository button
- End up on http://phorge.localhost/diffusion/19/manage/
- Select in the left panel (while no directory exists for this code repository)
- Wait a minute for daemons to create the repository
- In a terminal, go to now existing /var/repo/19/
- In a terminal, run git init
- In a terminal, run git checkout -b master
- In a terminal, run touch newFile
- In a terminal, run git add newFile
- In a terminal, run git commit -m "first commit" newFile
- In the browser, on http://phorge.localhost/diffusion/19/manage/ , select on the right and select Schedule Update button
- In the browser, go to http://phorge.localhost/diffusion/19/
- Select the Code tab to go to http://phorge.localhost/diffusion/19/browse/master/
[2023-06-12 00:09:57] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261] arcanist(head=master, ref.master=97e163187418), phorge(head=diffusionBrowseCode, ref.master=108cbcd09bd3, ref.diffusionBrowseCode=108cbcd09bd3) #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/diffusion/controller/DiffusionBrowseController.php:25] #1 <#2> DiffusionBrowseController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284] #2 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41] #3 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751] #4 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296] #5 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203] #6 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
After fixing, get next exception:
[2023-06-12 00:16:49] EXCEPTION: (RuntimeException) strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<arcanist>/src/error/PhutilErrorHandler.php:261] arcanist(head=master, ref.master=97e163187418), phorge(head=diffusionBrowseCode, ref.master=108cbcd09bd3, ref.diffusionBrowseCode=108cbcd09bd3) #0 <#2> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php:40] #1 <#2> DiffusionBrowseQueryConduitAPIMethod::getGitResult(ConduitAPIRequest) called at [<phorge>/src/applications/diffusion/conduit/DiffusionQueryConduitAPIMethod.php:155] #2 <#2> DiffusionQueryConduitAPIMethod::getResult(ConduitAPIRequest) called at [<phorge>/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php:31] #3 <#2> DiffusionBrowseQueryConduitAPIMethod::getResult(ConduitAPIRequest) called at [<phorge>/src/applications/diffusion/conduit/DiffusionQueryConduitAPIMethod.php:110] #4 <#2> DiffusionQueryConduitAPIMethod::execute(ConduitAPIRequest) called at [<phorge>/src/applications/conduit/method/ConduitAPIMethod.php:156] #5 <#2> ConduitAPIMethod::executeMethod(ConduitAPIRequest) called at [<phorge>/src/applications/conduit/call/ConduitCall.php:131] #6 <#2> ConduitCall::executeMethod() called at [<phorge>/src/applications/conduit/call/ConduitCall.php:81] #7 <#2> ConduitCall::execute() called at [<arcanist>/src/future/MethodCallFuture.php:30] #8 <#2> MethodCallFuture::isReady() called at [<arcanist>/src/future/Future.php:63] #9 <#2> Future::updateFuture() called at [<arcanist>/src/future/Future.php:159] #10 <#2> Future::start() called at [<arcanist>/src/future/FutureIterator.php:403] #11 <#2> FutureIterator::moveFutureToWork(integer) called at [<arcanist>/src/future/FutureIterator.php:374] #12 <#2> FutureIterator::updateWorkingSet() called at [<arcanist>/src/future/FutureIterator.php:206] #13 <#2> FutureIterator::next() called at [<arcanist>/src/future/FutureIterator.php:190] #14 <#2> FutureIterator::rewind() #15 <#2> iterator_to_array(FutureIterator) called at [<arcanist>/src/future/FutureIterator.php:84] #16 <#2> FutureIterator::resolveAll() called at [<arcanist>/src/future/Future.php:47] #17 <#2> Future::resolve() called at [<phorge>/src/applications/diffusion/query/DiffusionQuery.php:83] #18 <#2> DiffusionQuery::callConduitWithDiffusionRequest(PhabricatorUser, DiffusionGitRequest, string, array) called at [<phorge>/src/applications/diffusion/controller/DiffusionController.php:241] #19 <#2> DiffusionController::callConduitWithDiffusionRequest(string, array) called at [<phorge>/src/applications/diffusion/controller/DiffusionBrowseController.php:33] #20 <#2> DiffusionBrowseController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284] #21 phlog(RuntimeException) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41] #22 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751] #23 AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296] #24 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203] #25 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35] [2023-06-12 00:16:49] EXCEPTION: (PhutilAggregateException) Encountered a processing exception, then another exception when trying to build a response for the first exception. - RuntimeException: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated - RuntimeException: strlen(): Passing null to parameter #1 ($string) of type string is deprecated at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:316] arcanist(head=master, ref.master=97e163187418), phorge(head=diffusionBrowseCode, ref.master=108cbcd09bd3, ref.diffusionBrowseCode=108cbcd09bd3) #0 <#4> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<phorge>/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php:40] #1 <#4> DiffusionBrowseQueryConduitAPIMethod::getGitResult(ConduitAPIRequest) called at [<phorge>/src/applications/diffusion/conduit/DiffusionQueryConduitAPIMethod.php:155] #2 <#4> DiffusionQueryConduitAPIMethod::getResult(ConduitAPIRequest) called at [<phorge>/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php:31] #3 <#4> DiffusionBrowseQueryConduitAPIMethod::getResult(ConduitAPIRequest) called at [<phorge>/src/applications/diffusion/conduit/DiffusionQueryConduitAPIMethod.php:110] #4 <#4> DiffusionQueryConduitAPIMethod::execute(ConduitAPIRequest) called at [<phorge>/src/applications/conduit/method/ConduitAPIMethod.php:156] #5 <#4> ConduitAPIMethod::executeMethod(ConduitAPIRequest) called at [<phorge>/src/applications/conduit/call/ConduitCall.php:131] #6 <#4> ConduitCall::executeMethod() called at [<phorge>/src/applications/conduit/call/ConduitCall.php:81] #7 <#4> ConduitCall::execute() called at [<arcanist>/src/future/MethodCallFuture.php:30] #8 <#4> MethodCallFuture::isReady() called at [<arcanist>/src/future/Future.php:63] #9 <#4> Future::updateFuture() called at [<arcanist>/src/future/Future.php:159] #10 <#4> Future::start() called at [<arcanist>/src/future/FutureIterator.php:403] #11 <#4> FutureIterator::moveFutureToWork(integer) called at [<arcanist>/src/future/FutureIterator.php:374] #12 <#4> FutureIterator::updateWorkingSet() called at [<arcanist>/src/future/FutureIterator.php:206] #13 <#4> FutureIterator::next() called at [<arcanist>/src/future/FutureIterator.php:190] #14 <#4> FutureIterator::rewind() #15 <#4> iterator_to_array(FutureIterator) called at [<arcanist>/src/future/FutureIterator.php:84] #16 <#4> FutureIterator::resolveAll() called at [<arcanist>/src/future/Future.php:47] #17 <#4> Future::resolve() called at [<phorge>/src/applications/diffusion/query/DiffusionQuery.php:83] #18 <#4> DiffusionQuery::callConduitWithDiffusionRequest(PhabricatorUser, DiffusionGitRequest, string, array) called at [<phorge>/src/applications/diffusion/controller/DiffusionController.php:241] #19 <#4> DiffusionController::callConduitWithDiffusionRequest(string, array) called at [<phorge>/src/applications/diffusion/controller/DiffusionBrowseController.php:33] #20 <#4> DiffusionBrowseController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284] #21 <#3> PhutilErrorHandler::handleError(integer, string, string, integer) called at [<arcanist>/src/error/PhutilErrorHandler.php:261] #22 <#3> file_exists(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:1068] #23 <#3> Filesystem::pathExists(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:1169] #24 <#3> Filesystem::assertExists(NULL) called at [<arcanist>/src/filesystem/Filesystem.php:1020] #25 <#3> Filesystem::isDescendant(NULL, string) called at [<phorge>/src/view/widget/AphrontStackTraceView.php:33] #26 <#3> AphrontStackTraceView::render() called at [<phorge>/src/view/AphrontView.php:222] #27 <#3> AphrontView::producePhutilSafeHTML() called at [<phorge>/src/infrastructure/markup/render.php:115] #28 <#3> phutil_escape_html(AphrontStackTraceView) called at [<phorge>/src/infrastructure/markup/render.php:139] #29 <#3> phutil_escape_html(array) called at [<phorge>/src/infrastructure/markup/render.php:97] #30 <#3> phutil_tag(string, array, array) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:62] #31 <#3> PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751] #32 <#3> AphrontApplicationConfiguration::handleThrowable(RuntimeException) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296] #33 <#2> AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203] #34 <#2> AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35] #35 phlog(PhutilAggregateException) called at [<phorge>/src/aphront/response/AphrontUnhandledExceptionResponse.php:32] #36 AphrontUnhandledExceptionResponse::setException(PhutilAggregateException) called at [<phorge>/webroot/index.php:46]
After fixing, get next expected exceptions (thus not to be handled in this task) about RuntimeException: file_exists(): Passing null to parameter #1 ($filename) of type string is deprecated and CommandException: Command failed with error #128! fatal: detected dubious ownership in repository at '/var/repo/19'