-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when following the README instructions to install a new plugin via composer #160
Comments
I'm not really comfortable with composer, so I don't know if the issue is on the app itself or in the way it's installed |
OK - looking at the installation script, I think that because the composer is installed/executed during the install script, it's done using root - there are probably some composer-related files that don't have the correct permissions to be run using the roundcube user. Running the command as root works, I'll try to look what needs to be done to have it working with the roundcube user. |
this is still an issue. `chown roundcube:www-data composer.*
could not finde the cache dir which also has permission issues. compose as root works |
Describe the bug
When trying to install a new plugin via composer following the instructions given in the README, an error is encountered.
Context
Steps to reproduce
Connect to your server as root using SSH:
$ ssh [email protected]
$ sudo -i
Log in as the roundcube user - which owns the roundcube directory - and navigate in it:
su -s /bin/bash - roundcube
$ cd /var/www/roundcube
Install the plugin you want using composer - note that you have to specify kitist/html5_notifier and not only html5_notifier:
$ roundcube@ynh:~$ COMPOSER_HOME=./.composer php composer.phar require "kitist/html5_notifier"
Expected behavior
No error ;)
Logs
PHP Fatal error: Uncaught TypeError: json_decode() expects parameter 1 to be string, bool given in phar:///var/www/roundcube/composer.phar/src/Composer/Json/JsonFile.php:201
Stack trace:
#0 phar:///var/www/roundcube/composer.phar/src/Composer/Json/JsonFile.php(201): json_decode()
#1 phar:///var/www/roundcube/composer.phar/src/Composer/Factory.php(313): Composer\Json\JsonFile->validateSchema()
#2 phar:///var/www/roundcube/composer.phar/src/Composer/Factory.php(615): Composer\Factory->createComposer()
#3 phar:///var/www/roundcube/composer.phar/src/Composer/Console/Application.php(470): Composer\Factory::create()
#4 phar:///var/www/roundcube/composer.phar/src/Composer/Console/Application.php(412): Composer\Console\Application->getComposer()
#5 phar:///var/www/roundcube/composer.phar/src/Composer/Console/Application.php(353): Composer\Console\Application->hintCommonErrors()
#6 phar:///var/www/roundcube/composer.phar/vendor/symfony/console/Application.php(171): Composer\Console\Application->doRun()
#7 phar:///var/www/roundcube/com in phar:///var/www/roundcube/composer.phar/src/Composer/Json/JsonFile.php on line 201
Fatal error: Uncaught TypeError: json_decode() expects parameter 1 to be string, bool given in phar:///var/www/roundcube/composer.phar/src/Composer/Json/JsonFile.php:201
Stack trace:
#0 phar:///var/www/roundcube/composer.phar/src/Composer/Json/JsonFile.php(201): json_decode()
#1 phar:///var/www/roundcube/composer.phar/src/Composer/Factory.php(313): Composer\Json\JsonFile->validateSchema()
#2 phar:///var/www/roundcube/composer.phar/src/Composer/Factory.php(615): Composer\Factory->createComposer()
#3 phar:///var/www/roundcube/composer.phar/src/Composer/Console/Application.php(470): Composer\Factory::create()
#4 phar:///var/www/roundcube/composer.phar/src/Composer/Console/Application.php(412): Composer\Console\Application->getComposer()
#5 phar:///var/www/roundcube/composer.phar/src/Composer/Console/Application.php(353): Composer\Console\Application->hintCommonErrors()
#6 phar:///var/www/roundcube/composer.phar/vendor/symfony/console/Application.php(171): Composer\Console\Application->doRun()
#7 phar:///var/www/roundcube/com in phar:///var/www/roundcube/composer.phar/src/Composer/Json/JsonFile.php on line 201
*** Additional info
The app setting for PHP version is 7.4, php7.4-json is installed.
The text was updated successfully, but these errors were encountered: