Interface 'MStilkerich\RCMCardDAV\Frontend\RcmInterface' not found
nicodel opened this issue · 3 comments
Hello,
I had http 500 error with Roundcube for several weeks now, and finally got time to look into it.
Running on Docker on RaspberryPi:
- OS: Raspbian Buster
- Arch: armv7l
Image is built from roundcubemail-docker, with extra steps to install composer
and roundcube/carddav
RUN set -ex; \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer; \
mv /usr/src/roundcubemail/composer.json-dist /usr/src/roundcubemail/composer.json; \
\
composer \
--working-dir=/usr/src/roundcubemail/ \
--prefer-stable \
--update-no-dev --no-interaction \
--optimize-autoloader --apcu-autoloader \
require \
roundcube/carddav \
;
roundcube/carddav
version that was installed by this command was 4.4.6. I found the following issues #415 and #418, and went inside Roundcube container to update roundcube/carddav
, but it still fails with the error:
# composer update --no-dev -o roundcube/carddav
./composer.json has been updated
Running composer update roundcube/carddav
Loading composer repositories with package information
Updating dependencies
Lock file operations: 0 installs, 1 update, 0 removals
- Upgrading roundcube/carddav (v4.4.6 => v5.0.1)
Writing lock file
Installing dependencies from lock file
Package operations: 0 installs, 1 update, 0 removals
Update of roundcube/carddav failed
In carddav.php line 42:
[Error]
Interface 'MStilkerich\RCMCardDAV\Frontend\RcmInterface' not found
Exception trace:
at /var/www/html/plugins/carddav/carddav.php:42
include() at /var/www/html/program/lib/Roundcube/rcube_plugin_api.php:204
rcube_plugin_api->load_plugin() at /var/www/html/program/lib/Roundcube/rcube_plugin_api.php:126
rcube_plugin_api->load_plugins() at /var/www/html/program/include/rcmail.php:108
rcmail->startup() at /var/www/html/program/include/rcmail.php:86
rcmail::get_instance() at /var/www/html/program/include/clisetup.php:30
include_once() at /var/www/html/vendor/roundcube/plugin-installer/src/Roundcube/Composer/ExtensionInstaller.php:123
Roundcube\Composer\ExtensionInstaller->update() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:485
Composer\Installer\InstallationManager->update() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:378
Composer\Installer\InstallationManager->Composer\Installer\{closure}() at phar:///usr/bin/composer/vendor/react/promise/src/FulfilledPromise.php:28
React\Promise\FulfilledPromise->then() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:379
Composer\Installer\InstallationManager->executeBatch() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:319
Composer\Installer\InstallationManager->downloadAndExecuteBatch() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:218
Composer\Installer\InstallationManager->execute() at phar:///usr/bin/composer/src/Composer/Installer.php:797
Composer\Installer->doInstall() at phar:///usr/bin/composer/src/Composer/Installer.php:622
Composer\Installer->doUpdate() at phar:///usr/bin/composer/src/Composer/Installer.php:287
Composer\Installer->run() at phar:///usr/bin/composer/src/Composer/Command/RequireCommand.php:490
Composer\Command\RequireCommand->doUpdate() at phar:///usr/bin/composer/src/Composer/Command/RequireCommand.php:339
Composer\Command\RequireCommand->execute() at phar:///usr/bin/composer/vendor/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:1040
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:301
Symfony\Component\Console\Application->doRun() at phar:///usr/bin/composer/src/Composer/Console/Application.php:377
Composer\Console\Application->doRun() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at phar:///usr/bin/composer/src/Composer/Console/Application.php:141
Composer\Console\Application->run() at phar:///usr/bin/composer/bin/composer:88
require() at /usr/bin/composer:29
require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--fixed] [--no-suggest] [--no-progress] [--no-update] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--update-no-dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>...]
I tried the following but result is the same:
# composer dump-autoload
Generating autoload files
Generated autoload files
# composer update --no-dev -o roundcube/carddav
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file
Package operations: 0 installs, 1 update, 0 removals
Update of roundcube/carddav failed
In carddav.php line 42:
[Error]
Interface 'MStilkerich\RCMCardDAV\Frontend\RcmInterface' not found
Exception trace:
at /var/www/html/plugins/carddav/carddav.php:42
include() at /var/www/html/program/lib/Roundcube/rcube_plugin_api.php:204
rcube_plugin_api->load_plugin() at /var/www/html/program/lib/Roundcube/rcube_plugin_api.php:126
rcube_plugin_api->load_plugins() at /var/www/html/program/include/rcmail.php:108
rcmail->startup() at /var/www/html/program/include/rcmail.php:86
rcmail::get_instance() at /var/www/html/program/include/clisetup.php:30
include_once() at /var/www/html/vendor/roundcube/plugin-installer/src/Roundcube/Composer/ExtensionInstaller.php:123
Roundcube\Composer\ExtensionInstaller->update() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:485
Composer\Installer\InstallationManager->update() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:378
Composer\Installer\InstallationManager->Composer\Installer\{closure}() at phar:///usr/bin/composer/vendor/react/promise/src/FulfilledPromise.php:28
React\Promise\FulfilledPromise->then() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:379
Composer\Installer\InstallationManager->executeBatch() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:319
Composer\Installer\InstallationManager->downloadAndExecuteBatch() at phar:///usr/bin/composer/src/Composer/Installer/InstallationManager.php:218
Composer\Installer\InstallationManager->execute() at phar:///usr/bin/composer/src/Composer/Installer.php:797
Composer\Installer->doInstall() at phar:///usr/bin/composer/src/Composer/Installer.php:622
Composer\Installer->doUpdate() at phar:///usr/bin/composer/src/Composer/Installer.php:287
Composer\Installer->run() at phar:///usr/bin/composer/src/Composer/Command/UpdateCommand.php:247
Composer\Command\UpdateCommand->execute() at phar:///usr/bin/composer/vendor/symfony/console/Command/Command.php:298
Symfony\Component\Console\Command\Command->run() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:1040
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:301
Symfony\Component\Console\Application->doRun() at phar:///usr/bin/composer/src/Composer/Console/Application.php:377
Composer\Console\Application->doRun() at phar:///usr/bin/composer/vendor/symfony/console/Application.php:171
Symfony\Component\Console\Application->run() at phar:///usr/bin/composer/src/Composer/Console/Application.php:141
Composer\Console\Application->run() at phar:///usr/bin/composer/bin/composer:88
require() at /usr/bin/composer:29
update [--with WITH] [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-dev] [--lock] [--no-install] [--no-audit] [--audit-format AUDIT-FORMAT] [--no-autoloader] [--no-suggest] [--no-progress] [-w|--with-dependencies] [-W|--with-all-dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [-i|--interactive] [--root-reqs] [--] [<packages>...]
Do you have ideas of what could be causing this issue ?
Thanks for your work and your help.
Hello,
I believe this is because of roundcube/plugin-installer#38
For a workaround, see
https://github.com/mstilkerich/rcmcarddav/blob/master/doc/INSTALL.md#update-using-composer
(I see you already tried the workaround, that leaves the option to build a new container)
However, in case of the docker container, I would suggest to build a new docker container and install RCMCardDAV 5.0.1 directly without the upgrade step. Then you should not run into this issue.
Btw the base docker image should already include the composer command. For me the following adaptation of the Dockerfile published on the roundcube-docker project works to install 5.0.1:
FROM roundcube/roundcubemail:latest
RUN set -ex; \
composer \
--working-dir=/usr/src/roundcubemail/ \
--prefer-dist \
--prefer-stable \
--update-no-dev \
--no-interaction \
--optimize-autoloader \
require \
roundcube/carddav \
; \
Btw the base docker image should already include the composer command. For me the following adaptation of the Dockerfile published on the roundcube-docker project works to install 5.0.1:
FROM roundcube/roundcubemail:latest RUN set -ex; \ composer \ --working-dir=/usr/src/roundcubemail/ \ --prefer-dist \ --prefer-stable \ --update-no-dev \ --no-interaction \ --optimize-autoloader \ require \ roundcube/carddav \ ; \
It worked. Thanks