Skip to content
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 upgrading dependencies (v6.2.3) #1321

Closed
tasagore opened this issue Dec 31, 2022 · 2 comments · Fixed by #1322
Closed

Error upgrading dependencies (v6.2.3) #1321

tasagore opened this issue Dec 31, 2022 · 2 comments · Fixed by #1322
Labels
bug Something isn't working

Comments

@tasagore
Copy link

Hi

Upgraded to v6.2.3, checked dependencies, java version and cfssl version detected as wrong versions, I've reinstalled Java with occ command, no problems, but CFSSL fails. This is command executed:

sudo -u www-data php /var/www/html/nextcloud/occ libresign:install --cfssl

And this is the error:

An unhandled exception has been thrown:
TypeError: preg_match(): Argument #2 ($subject) must be of type string, bool given in /var/www/html/nextcloud/apps/libresign/lib/Service/InstallService.php:541
Stack trace:
#0 /var/www/html/nextcloud/apps/libresign/lib/Service/InstallService.php(541): preg_match()
#1 /var/www/html/nextcloud/apps/libresign/lib/Service/InstallService.php(394): OCA\Libresign\Service\InstallService->getHash()
#2 /var/www/html/nextcloud/apps/libresign/lib/Service/InstallService.php(371): OCA\Libresign\Service\InstallService->installCfssl64()
#3 /var/www/html/nextcloud/apps/libresign/lib/Command/Install.php(65): OCA\Libresign\Service\InstallService->installCfssl()
#4 /var/www/html/nextcloud/apps/libresign/vendor/symfony/console/Command/Command.php(298): OCA\Libresign\Command\Install->execute()
#5 /var/www/html/nextcloud/core/Command/Base.php(177): Symfony\Component\Console\Command\Command->run()
#6 /var/www/html/nextcloud/apps/libresign/vendor/symfony/console/Application.php(1040): OC\Core\Command\Base->run()
#7 /var/www/html/nextcloud/apps/libresign/vendor/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand()
#8 /var/www/html/nextcloud/apps/libresign/vendor/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun()
#9 /var/www/html/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run()
#10 /var/www/html/nextcloud/console.php(100): OC\Console\Application->run()
#11 /var/www/html/nextcloud/occ(11): require_once('...')
#12 {main}root@cloudwb:/data/cloudwb/appdata_ocavn96pusa8/libresign#

I've restarted the server, same error. Just for testing, I've tried to reinstall java again with the occ command and exactly same error (java was previously installed with same command with no errors).

@tasagore tasagore added the bug Something isn't working label Dec 31, 2022
@tasagore
Copy link
Author

tasagore commented Jan 1, 2023

Tested in another server, also wrong CFSSL detected (1.6.1, expected 1.6.3), no way to upgrade it with occ command. I've updated both manually from the console (downloading directly cfssl and cfssljson and replacing the old version) and now the dependencies are ok and app seems to work.

@vitormattos
Copy link
Member

Looking the code I think that this error only is possible if the content of folder data/appdata_<instanceid>/libresign was deleted directly by a command from operational system. LibreSign have a command to delete all content of this filder: occ libresign:uninstall --all when is necessary. Maybe will be necessary run occ files:scan-app-data libresign to fix the reported error. But, to prevent future errors doing a right handling of error, I created this PR: #1322

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants