Thanks for developing Phabricator! When we open the overview page of a repository that contains git submodules an error is thrown:
This happens with all repos that uses git submodules. Repos without work as expected.
Reproduction Instructions
First create a new Phabricator hosted git repository in Diffusion. Go to the repositorys page (e.g https://phabricator.example.com/source/myprog/). Check that error is not fired. Next clone the repo to a local machine. Add a submodule with
git submodule add ssh://git@phabricator.example.com/sources/greatlib
arc land or git push it to Phabricator. Try to open the overview page again. Now the Unhandled Exception is thrown.
Phabricator/Arcanist Version
We are using Phabricator branch stable on a Ubuntu 18.04 machine with php version 7.2.
Phabricator last commit:
commit 69870a6bc26822b058a8a8f7a568d8dec0baa6b7 (HEAD -> stable, origin/stable)
Author: epriestley <git@epriestley.com>
Date: Mon Jan 25 09:06:02 2021 -0800
As far as we can tell, the problem is in file DiffusionBrowseQueryConduitAPIMethod.php. $path is null, so php can not invoke the method. If we change $path to $path_result (which is a DiffusionRepositoryPath object) we do not get the Unhandled Exception anymore. Here you can find a diff:
diff --git a/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php b/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php
index 4402c2a5d0..ea6a4f98c2 100644
--- a/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php
+++ b/src/applications/diffusion/conduit/DiffusionBrowseQueryConduitAPIMethod.php
@@ -240,7 +240,7 @@ final class DiffusionBrowseQueryConduitAPIMethod
$full_path = $submodule_path->getFullPath();
$key = 'submodule.'.$full_path.'.url';
if (isset($dict[$key])) {
- $path->setExternalURI($dict[$key]);
+ $path_result->setExternalURI($dict[$key]);
}
}
}
We don’t know if this is realy a solution, but it might help you to find the root cause.