Page MenuHomePhabricator

CopyPatrol inaccessible due to internal error
Closed, ResolvedPublic

Description

CopyPatrol is currently returning a generic message with a 500 status code: "A website error has occurred. The website administrator has been notified of the issue. Sorry for the temporary inconvenience." This also occurs when run on a local server.

The underlying stacktrace is as follows:

ErrorException: Trying to access array offset on value of type bool in /app/src/Controllers/CopyPatrol.php:200
Stack trace:
#0 /app/src/Controllers/CopyPatrol.php(200): Slim\Slim::handleErrors()
#1 [internal function]: Plagiabot\Web\Controllers\CopyPatrol->handleGet()
#2 /app/vendor/wikimedia/slimapp/src/Controller.php(124): call_user_func_array()
#3 /app/src/App.php(322): Wikimedia\Slimapp\Controller->__invoke()
#4 [internal function]: Plagiabot\Web\App->Plagiabot\Web\{closure}()
#5 /app/vendor/slim/slim/Slim/Route.php(468): call_user_func_array()
#6 /app/vendor/slim/slim/Slim/Slim.php(1355): Slim\Route->dispatch()
#7 /app/vendor/slim/slim/Slim/Middleware/Flash.php(85): Slim\Slim->call()
#8 /app/vendor/slim/slim/Slim/Middleware/MethodOverride.php(92): Slim\Middleware\Flash->call()
#9 /app/vendor/wikimedia/slimapp/src/HeaderMiddleware.php(69): Slim\Middleware\MethodOverride->call()
#10 /app/vendor/wikimedia/slimapp/src/CsrfMiddleware.php(71): Wikimedia\Slimapp\HeaderMiddleware->call()
#11 /app/vendor/slim/slim/Slim/Slim.php(1300): Wikimedia\Slimapp\CsrfMiddleware->call()
#12 /app/vendor/wikimedia/slimapp/src/AbstractApp.php(184): Slim\Slim->run()
#13 /app/public_html/index.php(45): Wikimedia\Slimapp\AbstractApp->run()
#14 {main}

The related line is:

CopyPatrol.php#L200
if ( $oresScores[$record['diff']] && $oresScores[$record['diff']] > 0.427 ) {
    $value = $oresScores[$record['diff']] * 100;
    $records[$key]['oresScore'] = number_format( $value, 2 );
}

This line mentions ORES, which is currently in the process of being decommissioned and replaced with LiftWing. The outage which began at 2023-09-25 09:14:53 UTC coincides with https://gerrit.wikimedia.org/r/c/operations/puppet/+/959762/, which seems to have switched https://ores.wikimedia.org to a backend without the /v2/ endpoints that CopyPatrol relies on (at CopyPatrol.php#L63).

Related Objects

Event Timeline

Restricted Application added subscribers: Cyberpower678, Aklapper. · View Herald Transcript
TheresNoTime subscribed.

I saw some emails from the folx on the Machine-Learning-Team about this. A migration guide appears to be available.

Moving onto our kanban for work, given this is now tool downtime.

MusikAnimal claimed this task.

I have removed ORES scores from the old interface.

The new version at https://copypatrol-test.wmcloud.org is still not ready to replace the old system, so the old one will just have to do without ORES scores for now.