Jump to content

Topic on Extension talk:WindowsAzureStorage/Archive 2

Error: Class "MicrosoftAzure\Storage\Blob\BlobRestProxy" not found with MediaWiki 1.39.7

4
Krisssde (talkcontribs)

Hello.

I'm struggling with getting WindowsAzureStorage extension to work with MediaWiki 1.39.7. It worked well for multiple versions until upgrade from 1.37 to 1.39. I downloaded extension for 1.39, replaced all files in the respective folder and configuration is done exactly as shown in the documentation. But when I run update.php script to get db updated for version 1.39.7 I'm getting following error:

Converting djvu metadata...[0ecc20d19c3146dad62c3254] [no req]   Error: Class "MicrosoftAzure\Storage\Blob\BlobRestProxy" not found

Backtrace:

from /var/www/html/extensions/WindowsAzureStorage/includes/WindowsAzureFileBackend.php(68)

#0 /var/www/html/includes/filebackend/FileBackendGroup.php(201): WindowsAzureFileBackend->__construct(array)

#1 /var/www/html/includes/filerepo/FileRepo.php(186): FileBackendGroup->get(string)

#2 /var/www/html/includes/filerepo/LocalRepo.php(77): FileRepo->__construct(array)

#3 /var/www/html/includes/filerepo/RepoGroup.php(416): LocalRepo->__construct(array)

#4 /var/www/html/includes/filerepo/RepoGroup.php(403): RepoGroup->newRepo(array)

#5 /var/www/html/maintenance/refreshImageMetadata.php(284): RepoGroup->newCustomLocalRepo(array)

#6 /var/www/html/maintenance/refreshImageMetadata.php(140): RefreshImageMetadata->newLocalRepo(boolean, boolean, boolean, boolean)

#7 /var/www/html/includes/installer/DatabaseUpdater.php(1184): RefreshImageMetadata->execute()

#8 /var/www/html/includes/installer/DatabaseUpdater.php(547): DatabaseUpdater->doConvertDjvuMetadata()

#9 /var/www/html/includes/installer/DatabaseUpdater.php(511): DatabaseUpdater->runUpdates(array, boolean)

#10 /var/www/html/maintenance/update.php(209): DatabaseUpdater->doUpdates(array)

#11 /var/www/html/maintenance/includes/MaintenanceRunner.php(309): UpdateMediaWiki->execute()

#12 /var/www/html/maintenance/doMaintenance.php(85): MediaWiki\Maintenance\MaintenanceRunner->run()

#13 /var/www/html/maintenance/update.php(319): require_once(string)

#14 {main}

command terminated with exit code 255


Do you know what can be the problem here?

This is the configuration in LocalSettings.php:

wfLoadExtension( 'WindowsAzureStorage' );

$wgFileBackends[] = [

    'name'         => 'localAzure',

    'class'        => 'WindowsAzureFileBackend',

    'lockManager'  => 'nullLockManager',

    'azureAccount' => getenv('<REDACTED>'),

    'azureKey'     => getenv('<REDACTED>')

];

$wgLocalFileRepo = [

    'class'             => 'LocalRepo',

    'name'              => 'local',

    'backend'           => 'localAzure',

    'scriptDirUrl'      => $wgScriptPath,

    'scriptExtension'   => $wgScriptExtension,

    'url'               => $wgScriptPath . '/img_auth.php',

    'hashLevels'        => 0,

    'deletedHashLevels' => 0,

    'zones'             => array(

        'public'  => [ 'container' => 'public' ],

        'thumb'   => [ 'container' => 'thumb' ],

        'temp'    => [ 'container' => 'temp' ],

        'deleted' => [ 'container' => 'deleted' ]

    )

];

$wgImgAuthPublicTest = false;


In composer.local.json:

{

    "extra": {

        "merge-plugin": {

            "include": [

                "extensions/WindowsAzureStorage/composer.json",

                <REDACTED>

            ]

        }

    }

}

Any help or tips are much appreciated!

Ciencia Al Poder (talkcontribs)

Try to not "replace files", but actually delete the whole directory of the extension, and copy the newly downloaded one instead. Remaining files may cause problems like this

Krisssde (talkcontribs)

Thanks, by replace I meant that I cleaned the folder and added new files from the downloaded extension.

Krisssde (talkcontribs)

I found out what the reason was! I upgraded composer version to 2.7.2 and that doesn't seem to load dependencies properly...downgrading to current LTS version 2.2.23 resolved the problem.