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 when installing or trying to update mail on nextcloud 20.0.14 #5761

Closed
tigernero79 opened this issue Nov 30, 2021 · 11 comments
Closed

Comments

@tigernero79
Copy link

Recently on a nextcloud 20.0.14 distribution I tried to update the mail application to version 1.11.0 on my nextcloud 20.0.0.14 as indicated, receiving an error and leaving my nextcloud installation under maintenance. I had to remove the mail folder from the plugins, and even uninstalling it and trying to reinstall it I get a generic error of being unable to install it to some of you has it happened?

@tigernero79
Copy link
Author

[PHP] Error: require(): Failed opening required '/web/htdocs/www.gipainformatica.it/home/nx/apps/mail/vendor/composer/../../lib/functions.php' (include_path='/web/htdocs/www.gipainformatica.it/home/nx/apps/mail/vendor/pear-pear.horde.org/Horde_Crypt_Blowfish:/web/htdocs/www.gipainformatica.it/home/nx/apps/mail/vendor/pear-pear.horde.org/Horde_Date:/web/htdocs/www.gipainformatica.it/home/nx/apps/mail/vendor/pear-pear.horde.org/Horde_Exception:/web/htdocs/www.gipainformatica.it/home/nx/apps/mail/vendor/pear-pear.horde.org/Horde_Idna:/web/htdocs/www.gipainformatica.it/home/nx/apps/mail/vendor/pear-pear.horde.org/Horde_Imap_Client:/web/htdocs/www.gipainformatica.it/home/nx/apps/mail/vendor/pear-pear.horde.org/Horde_ListHeaders:/web/htdocs/www.gipainformatica.it/home/nx/apps/mail/vendor/pear-pear.horde.org/Horde_Mail:/web/htdocs/www.gipainformatica.it/home/nx/apps/mail/vendor/pear-pear.horde.org/Horde_ManageSieve:/web/htdocs/www.gipainformatica.it/home/nx/apps/mail/vendor/pear-pear.horde.org/Horde_Mime:/web/htdocs/www.gipainfo at /web/htdocs/www.gipainformatica.it/home/nx/apps/mail/vendor/composer/autoload_real.php#73

GET /nx/apps/mail/js/dashboard.js?v=80a0bb98-5
from 84.33.95.181 at 2021-11-30T18:36:46+00:00

@tigernero79
Copy link
Author

tigernero79 commented Nov 30, 2021

{"reqId":"YaZwMKhfIMHjPoblMVOwPQAAAAM","level":3,"time":"2021-11-30T18:41:09+00:00","remoteAddr":"84.33.95.181","user":"Tiger","app":"index","method":"POST","url":"/nx/index.php/settings/apps/enable","message":{"Exception":"Exception","Message":"Too few arguments to function OCA\\Mail\\Migration\\ProvisionAccounts::__construct(), 0 passed in /web/htdocs/www.gipainformatica.it/home/nx/lib/private/Repair.php on line 129 and exactly 1 expected","Code":0,"Trace":[{"file":"/web/htdocs/www.gipainformatica.it/home/nx/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/web/htdocs/www.gipainformatica.it/home/nx/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/web/htdocs/www.gipainformatica.it/home/nx/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/web/htdocs/www.gipainformatica.it/home/nx/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/web/htdocs/www.gipainformatica.it/home/nx/lib/private/AppFramework/Http/Dispatcher.php","Line":110,"Previous":{"Exception":"ArgumentCountError","Message":"Too few arguments to function OCA\\Mail\\Migration\\ProvisionAccounts::__construct(), 0 passed in /web/htdocs/www.gipainformatica.it/home/nx/lib/private/Repair.php on line 129 and exactly 1 expected","Code":0,"Trace":[{"file":"/web/htdocs/www.gipainformatica.it/home/nx/lib/private/Repair.php","line":129,"function":"__construct","class":"OCA\\Mail\\Migration\\ProvisionAccounts","type":"->"},{"file":"/web/htdocs/www.gipainformatica.it/home/nx/lib/private/legacy/OC_App.php","line":1053,"function":"addStep","class":"OC\\Repair","type":"->"},{"file":"/web/htdocs/www.gipainformatica.it/home/nx/lib/private/Installer.php","line":160,"function":"executeRepairSteps","class":"OC_App","type":"::"},{"file":"/web/htdocs/www.gipainformatica.it/home/nx/apps/settings/lib/Controller/AppSettingsController.php","line":453,"function":"installApp","class":"OC\\Installer","type":"->"},{"file":"/web/htdocs/www.gipainformatica.it/home/nx/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->"},{"file":"/web/htdocs/www.gipainformatica.it/home/nx/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/web/htdocs/www.gipainformatica.it/home/nx/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/web/htdocs/www.gipainformatica.it/home/nx/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/web/htdocs/www.gipainformatica.it/home/nx/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/web/htdocs/www.gipainformatica.it/home/nx/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/web/htdocs/www.gipainformatica.it/home/nx/apps/mail/lib/Migration/ProvisionAccounts.php","Line":37},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36","version":"20.0.14.2","id":"61a67149555cf"}

@ChristophWurst
Copy link
Member

#5755

@ChristophWurst
Copy link
Member

If you try to apply my patch nextcloud/server#29979 on your Nextcloud 20 installation and run occ maintenance:repair again we might gain some insights

@tvogel-nid
Copy link

./occ status
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade

  • installed: true
  • version: 21.0.0.18
  • versionstring: 21.0.0
  • edition:

after applying the patch:
./occ maintenance:repair
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade

In SimpleContainer.php line 115:

Could not resolve OC\Repair\NC22\LookupServerSendCheck! Class OC\Repair\NC22\LookupServerSendCheck does not exist

maintenance:repair [--include-expensive]

@ChristophWurst
Copy link
Member

Could not resolve OC\Repair\NC22\LookupServerSendCheck! Class OC\Repair\NC22\LookupServerSendCheck does not exist

Something is up with repair steps in Nextcloud 20. This one isn't even from Mail. But the one in Mail also can't be loaded for some people.

@rollanders
Copy link

After disabling mail and running some things I get these errors when trying to enable mail:

root@vmi628252:/var/www/nextcloud# sudo -u www-data php ./occ app:enable mail
An unhandled exception has been thrown:
ArgumentCountError: Too few arguments to function OCA\Mail\Migration\ProvisionAccounts::__construct(), 0 passed in /var/www/nextcloud/lib/private/Repair.php on line 129 and exactly 1 expected in /var/www/nextcloud/apps/mail/lib/Migration/ProvisionAccounts.php:37
Stack trace:
#0 /var/www/nextcloud/lib/private/Repair.php(129): OCA\Mail\Migration\ProvisionAccounts->__construct()
#1 /var/www/nextcloud/lib/private/legacy/OC_App.php(1043): OC\Repair->addStep()
#2 /var/www/nextcloud/lib/private/Installer.php(160): OC_App::executeRepairSteps()
#3 /var/www/nextcloud/core/Command/App/Enable.php(123): OC\Installer->installApp()
#4 /var/www/nextcloud/core/Command/App/Enable.php(93): OC\Core\Command\App\Enable->enableApp()
#5 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\App\Enable->execute()
#6 /var/www/nextcloud/3rdparty/symfony/console/Application.php(1000): Symfony\Component\Console\Command\Command->run()
#7 /var/www/nextcloud/3rdparty/symfony/console/Application.php(271): Symfony\Component\Console\Application->doRunCommand()
#8 /var/www/nextcloud/3rdparty/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun()
#9 /var/www/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#10 /var/www/nextcloud/console.php(100): OC\Console\Application->run()
#11 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
#12 {main}root@vmi628252:/var/www/nextcloud# sudo -u www-data php ./occ app:enable mailArgumentCountError: Too few arguments to function OCA\Mail\Migration\ProvisionAccounts::__construct(), 0 passed in /var/www/nextcloud/lib/private/Repair.php on line 129 and exactly 1 expected in /var/www/nextcloud/apps/mail/lib/Migration/ProvisionAccounts.php:37
bash: syntax error near unexpected token `('

The log fills with these messages

ArgumentCountError: Too few arguments to function OCA\Mail\Migration\ProvisionAccounts::__construct(), 0 passed in /var/www/nextcloud/lib/private/Repair.php on line 129 and exactly 1 expected in /var/www/nextcloud/apps/mail/lib/Migration/ProvisionAccounts.php:37

@rollanders
Copy link

For me I solved it by inaktivating and removing Mail. Then upgrading to NC21, and from there installing Mail. Fortunatley all configurations were still present and all mails restored.

@ChristophWurst
Copy link
Member

I tried to debug this with another contributor yesterday. It's a bug in Nextcloud server, not this app. Under certain conditions repair steps with constructor args can't be built by the DI container, server falls back to a instantiation with no parameters, which causes the type error.

@hcoin
Copy link

hcoin commented Jan 4, 2022

I hit this as well. After spending too much time on what's supposed to be an easy upgrade process, doing much as the above suggested, one error remains:

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- mail
	- INVALID_HASH
		- vendor/rubix/ml/tests/CrossValidation/Reports/ErrorAnalysisTest.php

Raw output
==========
Array
(
    [mail] => Array
        (
            [INVALID_HASH] => Array
                (
                    [vendor/rubix/ml/tests/CrossValidation/Reports/ErrorAnalysisTest.php] => Array
                        (
                            [expected] => 3773d28cfebc6c2934063d251197d4aff9e5782b2a2d829a5c96174940c37a6738f36d06df0d5150e0c8fe0977c0d8782e9c57ad4e8c30c2534785ca50f01c9c
                            [current] => cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants