drush audiofield:download fails with error

Created on 3 November 2022, about 2 years ago
Updated 28 May 2024, 8 months ago

Problem/Motivation

Installation of the libraries fails in Drupal 9.4.8 with Drush 11.2.1 and PHP 8.1

The command in the README documentation for wavesurfer seems to be incorrect: drush audiofield:download waveplayer

Correcting (?) the library name to wavesurfer fails with errors, and the command without an argument also fails (see below).

Steps to reproduce

Run `drush audiofield:download waveplayer` or `drush audiofield:download`

user@host/var/www/fwda/drupal/web/libraries$ drush audiofield:download waveplayer
 [error]  Error: waveplayer is not a valid Audiofield library. 

user@host:/var/www/fwda/drupal/web/libraries$ drush audiofield:download wavesurfer
 [error]  Error: Class "ZipArchive" not found in Drupal\Core\Archiver\Zip->__construct() (line 30 of /var/www/fwda/drupal/web/core/lib/Drupal/Core/Archiver/Zip.php) #0 /var/www/fwda/drupal/web/core/lib/Drupal/Core/Archiver/ArchiverManager.php(57): Drupal\Core\Archiver\Zip->__construct()
#1 /var/www/fwda/drupal/web/core/lib/Drupal/Core/Archiver/ArchiverManager.php(73): Drupal\Core\Archiver\ArchiverManager->createInstance()
#2 /var/www/fwda/drupal/web/modules/contrib/audiofield/src/Commands/AudiofieldCommands.php(129): Drupal\Core\Archiver\ArchiverManager->getInstance()
#3 [internal function]: Drupal\audiofield\Commands\AudiofieldCommands->download()
#4 /var/www/fwda/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array()
#5 /var/www/fwda/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback()
#6 /var/www/fwda/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter()
#7 /var/www/fwda/drupal/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(350): Consolidation\AnnotatedCommand\CommandProcessor->process()
#8 /var/www/fwda/drupal/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#9 /var/www/fwda/drupal/vendor/symfony/console/Application.php(1027): Symfony\Component\Console\Command\Command->run()
#10 /var/www/fwda/drupal/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#11 /var/www/fwda/drupal/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#12 /var/www/fwda/drupal/vendor/drush/drush/src/Runtime/Runtime.php(124): Symfony\Component\Console\Application->run()
#13 /var/www/fwda/drupal/vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun()
#14 /var/www/fwda/drupal/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run()
#15 /var/www/fwda/drupal/vendor/drush/drush/drush(4): require('...')
#16 {main}. 


user@host:/var/www/fwda/drupal/web/libraries$ drush audiofield:download
 [error]  Error: Class "ZipArchive" not found in Drupal\Core\Archiver\Zip->__construct() (line 30 of /var/www/fwda/drupal/web/core/lib/Drupal/Core/Archiver/Zip.php) #0 /var/www/fwda/drupal/web/core/lib/Drupal/Core/Archiver/ArchiverManager.php(57): Drupal\Core\Archiver\Zip->__construct()
#1 /var/www/fwda/drupal/web/core/lib/Drupal/Core/Archiver/ArchiverManager.php(73): Drupal\Core\Archiver\ArchiverManager->createInstance()
#2 /var/www/fwda/drupal/web/modules/contrib/audiofield/src/Commands/AudiofieldCommands.php(129): Drupal\Core\Archiver\ArchiverManager->getInstance()
#3 [internal function]: Drupal\audiofield\Commands\AudiofieldCommands->download()
#4 /var/www/fwda/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php(257): call_user_func_array()
#5 /var/www/fwda/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback()
#6 /var/www/fwda/drupal/vendor/consolidation/annotated-command/src/CommandProcessor.php(176): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter()
#7 /var/www/fwda/drupal/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(350): Consolidation\AnnotatedCommand\CommandProcessor->process()
#8 /var/www/fwda/drupal/vendor/symfony/console/Command/Command.php(255): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#9 /var/www/fwda/drupal/vendor/symfony/console/Application.php(1027): Symfony\Component\Console\Command\Command->run()
#10 /var/www/fwda/drupal/vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#11 /var/www/fwda/drupal/vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#12 /var/www/fwda/drupal/vendor/drush/drush/src/Runtime/Runtime.php(124): Symfony\Component\Console\Application->run()
#13 /var/www/fwda/drupal/vendor/drush/drush/src/Runtime/Runtime.php(51): Drush\Runtime\Runtime->doRun()
#14 /var/www/fwda/drupal/vendor/drush/drush/drush.php(72): Drush\Runtime\Runtime->run()
#15 /var/www/fwda/drupal/vendor/drush/drush/drush(4): require('...')
#16 {main}. 
🐛 Bug report
Status

Active

Version

1.0

Component

Documentation

Created by

🇨🇦Canada jmee Canada

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India dev22.addweb

    I am getting below errors on drush audiofield:download
    [error] The specified file '/var/www/html/web/libraries/audiojs/audiojs' could not be moved to '/tmp/temp_audiofield'.
    I have created empty libraries directory before running the command

    Steps to reproduce:

    • Create a fresh Drupal 9 site
    • add and audiofield module using composer
    • Now run drush audiofield:download command

    I am using Drush 11.

Production build 0.71.5 2024