Page MenuHomePhorge

Exception trying to access non-existing EditEngine
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Phorge at 5444e1c885c337ede0f1fb4ad1916ae0b49b1413, PHP 8.3.6 (both irrelevant)
  2. Pretend to be a webcrawler and for reasons beyond any forms of logic, go to non-existing http://phorge.localhost/transactions/editengine/nonexistingstring/
  3. Pretend to be a human and check your error logs:
[2024-04-19 09:33:20] EXCEPTION: (Error) Call to a member function setViewer() on null at [<phorge>/src/applications/transactions/controller/PhabricatorEditEngineConfigurationListController.php:17]
arcanist(head=master, ref.master=ef73b12b580e), phorge(head=master, ref.master=5444e1c885c3)
  #0 phlog(Error) called at [<phorge>/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
  #1 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, Error) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:751]
  #2 AphrontApplicationConfiguration::handleThrowable(Error) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:296]
  #3 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #4 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
[2024-04-19 09:33:20] EXCEPTION: (PhutilAggregateException) Encountered a processing exception, then another exception when trying to build a response for the first exception.
    - TypeError: PhabricatorEditEngineConfigurationEditEngine::setTargetEngine(): Argument #1 ($target_engine) must be of type PhabricatorEditEngine, null given, called in /var/www/html/phorge/phorge/src/applications/transactions/controller/PhabricatorEditEngineConfigurationListController.php on line 68
    - Error: Call to a member function setViewer() on null at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:316]
arcanist(head=master, ref.master=ef73b12b580e), phorge(head=master, ref.master=5444e1c885c3)
  #0 <#4> PhabricatorEditEngineConfigurationListController::handleRequest(AphrontRequest) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:284]
  #1 <#3> PhabricatorEditEngineConfigurationEditEngine::setTargetEngine(NULL) called at [<phorge>/src/applications/transactions/controller/PhabricatorEditEngineConfigurationListController.php:68]
  #2 <#3> PhabricatorEditEngineConfigurationListController::buildApplicationCrumbs() called at [<phorge>/src/applications/base/controller/PhabricatorController.php:270]
  #3 <#3> PhabricatorController::willSendResponse(AphrontDialogResponse) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:300]
  #4 <#2> AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [<phorge>/src/aphront/configuration/AphrontApplicationConfiguration.php:203]
  #5 <#2> AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [<phorge>/webroot/index.php:35]
  #6 phlog(PhutilAggregateException) called at [<phorge>/src/aphront/response/AphrontUnhandledExceptionResponse.php:32]
  #7 AphrontUnhandledExceptionResponse::setException(PhutilAggregateException) called at [<phorge>/webroot/index.php:46]

Expected outcome:

Maybe a 404 displayed instead?

Event Timeline

I pretended to be a webcrawlerLooking into our downstream error logs. Some crawlers seem very creative for reasons I do not know.

Ah, probably after WMF disabled some applications, some crawlers started crashing these. Understood.