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

Mail App can't be enabled any more after upgrade to 1.11.0 #5755

Closed
steglicd opened this issue Nov 29, 2021 · 25 comments
Closed

Mail App can't be enabled any more after upgrade to 1.11.0 #5755

steglicd opened this issue Nov 29, 2021 · 25 comments

Comments

@steglicd
Copy link

Expected behavior

upgraded Mail app

Actual behavior

I was notified about a pending update of Mail app. I pressed the update button in the apps menu and got:

"Es ist ein Fehler aufgetreten. Es kann nicht fortgefahren werden"

After reloading the page, my nextcloud instance was in maintenance mode.
Then I ran on console:

docker exec --user www-data nextcloud php occ maintenance:mode --off

WEB UI now told me I need to perform a Nextcloud upgrade and that Mail app will be upgraded (did not take a screenshot but it looked similar to this: #5741 (comment))

then I'm back in maintenance mode.
To get Nextcloud up and running again I needed this:
docker exec --user www-data nextcloud php occ app:disable mail

Now back to the apps Menu -> enable Mail app -> "Es ist ein Fehler aufgetreten. Es kann nicht fortgefahren werden"

logs:

{"reqId":"dSkAm3W05nwcIC8dzfV0","level":3,"time":"2021-11-29T21:12:41+00:00","remoteAddr":"x.x.x","user":"XXX","app":"index","method":"POST","url":"/settings/apps/enable","message":{"Exception":"Exception","Message":"Too few arguments to function OCA\\Mail\\Migration\\ProvisionAccounts::__construct(), 0 passed in /var/www/html/lib/private/Repair.php on line 133 and exactly 1 expected","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AppSettingsController","enableApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"settings.AppSettings.enableApps"}]},{"file":"/var/www/html/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/apps/enable"]},{"file":"/var/www/html/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":159,"Previous":{"Exception":"ArgumentCountError","Message":"Too few arguments to function OCA\\Mail\\Migration\\ProvisionAccounts::__construct(), 0 passed in /var/www/html/lib/private/Repair.php on line 133 and exactly 1 expected","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Repair.php","line":133,"function":"__construct","class":"OCA\\Mail\\Migration\\ProvisionAccounts","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":1047,"function":"addStep","class":"OC\\Repair","type":"->","args":["OCA\\Mail\\Migration\\ProvisionAccounts"]},{"file":"/var/www/html/lib/private/Installer.php","line":166,"function":"executeRepairSteps","class":"OC_App","type":"::","args":["mail",["OCA\\Mail\\Migration\\AddMissingDefaultTags","OCA\\Mail\\Migration\\AddMissingMessageIds","OCA\\Mail\\Migration\\FixCollectedAddresses","OCA\\Mail\\Migration\\FixBackgroundJobs","OCA\\Mail\\Migration\\MakeItineraryExtractorExecutable","OCA\\Mail\\Migration\\ProvisionAccounts"]]},{"file":"/var/www/html/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"installApp","class":"OC\\Installer","type":"->","args":["mail"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->","args":[["mail"],[]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AppSettingsController","enableApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"settings.AppSettings.enableApps"}]},{"file":"/var/www/html/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/apps/enable"]},{"file":"/var/www/html/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/mail/lib/Migration/ProvisionAccounts.php","Line":37},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0","version":"21.0.0.18","id":"61a543935c74a"}


{"reqId":"Lad7pjd8L9j8dFO5U7DK","level":3,"time":"2021-11-29T21:16:50+00:00","remoteAddr":"x.x.x.x","user":"XXX","app":"index","method":"POST","url":"/settings/apps/enable","message":{"Exception":"Exception","Message":"Too few arguments to function OCA\\Mail\\Migration\\ProvisionAccounts::__construct(), 0 passed in /var/www/html/lib/private/Repair.php on line 133 and exactly 1 expected","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AppSettingsController","enableApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"settings.AppSettings.enableApps"}]},{"file":"/var/www/html/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/apps/enable"]},{"file":"/var/www/html/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":159,"Previous":{"Exception":"ArgumentCountError","Message":"Too few arguments to function OCA\\Mail\\Migration\\ProvisionAccounts::__construct(), 0 passed in /var/www/html/lib/private/Repair.php on line 133 and exactly 1 expected","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Repair.php","line":133,"function":"__construct","class":"OCA\\Mail\\Migration\\ProvisionAccounts","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":1047,"function":"addStep","class":"OC\\Repair","type":"->","args":["OCA\\Mail\\Migration\\ProvisionAccounts"]},{"file":"/var/www/html/lib/private/Installer.php","line":166,"function":"executeRepairSteps","class":"OC_App","type":"::","args":["mail",["OCA\\Mail\\Migration\\AddMissingDefaultTags","OCA\\Mail\\Migration\\AddMissingMessageIds","OCA\\Mail\\Migration\\FixCollectedAddresses","OCA\\Mail\\Migration\\FixBackgroundJobs","OCA\\Mail\\Migration\\MakeItineraryExtractorExecutable","OCA\\Mail\\Migration\\ProvisionAccounts"]]},{"file":"/var/www/html/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"installApp","class":"OC\\Installer","type":"->","args":["mail"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->","args":[["mail"],[]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AppSettingsController","enableApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"settings.AppSettings.enableApps"}]},{"file":"/var/www/html/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/apps/enable"]},{"file":"/var/www/html/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/custom_apps/mail/lib/Migration/ProvisionAccounts.php","Line":37},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36","version":"21.0.0.18","id":"61a54393535ef"}

{"reqId":"ibnB3nZW3G6PPPZ4go63","level":3,"time":"2021-11-29T21:13:12+00:00","remoteAddr":"x.x.x.x","user":"XXX","app":"PHP","method":"POST","url":"/settings/apps/enable","message":{"Exception":"Error","Message":"Undefined index: comments at /var/www/html/lib/private/AppFramework/Bootstrap/RegistrationContext.php#404","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/RegistrationContext.php","line":404,"function":"onError","class":"OC\\Log\\ErrorHandler","type":"::","args":[8,"Undefined index: comments","/var/www/html/lib/private/AppFramework/Bootstrap/RegistrationContext.php",404,{"apps":{"mail":{"__class__":"OCA\\Mail\\AppInfo\\Application"}},"registration":{"appId":"comments","alias":"NotificationsController","target":"OCA\\Comments\\Controller\\Notifications"}}]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":143,"function":"delegateContainerRegistrations","class":"OC\\AppFramework\\Bootstrap\\RegistrationContext","type":"->","args":[{"mail":{"__class__":"OCA\\Mail\\AppInfo\\Application"}}]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":86,"function":"registerApps","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":[["mail"]]},{"file":"/var/www/html/lib/private/Installer.php","line":146,"function":"runLazyRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":["mail"]},{"file":"/var/www/html/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"installApp","class":"OC\\Installer","type":"->","args":["mail"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->","args":[["mail"],[]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AppSettingsController","enableApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"settings.AppSettings.enableApps"}]},{"file":"/var/www/html/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/apps/enable"]},{"file":"/var/www/html/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Log/ErrorHandler.php","Line":92,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0","version":"21.0.0.18","id":"61a543935bc76"}

{"reqId":"ibnB3nZW3G6PPPZ4go63","level":3,"time":"2021-11-29T21:13:12+00:00","remoteAddr":"x.x.x.x","user":"XXXX","app":"no app in context","method":"POST","url":"/settings/apps/enable","message":{"Exception":"Error","Message":"Call to a member function getContainer() on null","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":143,"function":"delegateContainerRegistrations","class":"OC\\AppFramework\\Bootstrap\\RegistrationContext","type":"->","args":[{"mail":{"__class__":"OCA\\Mail\\AppInfo\\Application"}}]},{"file":"/var/www/html/lib/private/AppFramework/Bootstrap/Coordinator.php","line":86,"function":"registerApps","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":[["mail"]]},{"file":"/var/www/html/lib/private/Installer.php","line":146,"function":"runLazyRegistration","class":"OC\\AppFramework\\Bootstrap\\Coordinator","type":"->","args":["mail"]},{"file":"/var/www/html/apps/settings/lib/Controller/AppSettingsController.php","line":448,"function":"installApp","class":"OC\\Installer","type":"->","args":["mail"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":218,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->","args":[["mail"],[]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":127,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":157,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AppSettingsController","enableApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"settings.AppSettings.enableApps"}]},{"file":"/var/www/html/lib/base.php","line":993,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/apps/enable"]},{"file":"/var/www/html/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Bootstrap/RegistrationContext.php","Line":405,"CustomMessage":"Error during service alias registration of comments: Call to a member function getContainer() on null"},"userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0","version":"21.0.0.18","id":"61a543935bc2c"}

Server configuration

Debian 10
Nginx (docker)
mysql
PHP 7.4.16
Nextcloud 21.0.0

@camouflage81
Copy link

camouflage81 commented Nov 29, 2021

Hello all,

I have the same issue.
Unfortunately, I do not have SSH access.
Since the cloud kept going into maintenance mode and the instance absolutely had to be up and running again, my only option was to manually delete the mail app folder.
After this action and the subsequent deactivation of the maintenance mode, it then kept deactivated.
Unfortunately, the app can no longer be installed now.

Log-File

{"reqId":"YaVGxZ9GYSvI45lBXXzIaAAAAA4","level":3,"time":"2021-11-29T21:31:57+00:00","remoteAddr":"149.172.246.94","user":"XXX","app":"index","method":"POST","url":"/nextcloud/index.php/settings/apps/enable","message":{"Exception":"Exception","Message":"Too few arguments to function OCA\\Mail\\Migration\\ProvisionAccounts::__construct(), 0 passed in XXX/nextcloud/lib/private/Repair.php on line 129 and exactly 1 expected","Code":0,"Trace":[{"file":"XXX/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"XXX/nextcloud/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AppSettingsController","enableApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"settings.AppSettings.enableApps"}]},{"file":"XXX/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/apps/enable"]},{"file":"XXX/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"XXX/nextcloud/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 XXX/nextcloud/lib/private/Repair.php on line 129 and exactly 1 expected","Code":0,"Trace":[{"file":"XXX/nextcloud/lib/private/Repair.php","line":129,"function":"__construct","class":"OCA\\Mail\\Migration\\ProvisionAccounts","type":"->","args":[]},{"file":"XXX/htdocs/nextcloud/lib/private/legacy/OC_App.php","line":1053,"function":"addStep","class":"OC\\Repair","type":"->","args":["OCA\\Mail\\Migration\\ProvisionAccounts"]},{"file":"XXX/nextcloud/lib/private/Installer.php","line":160,"function":"executeRepairSteps","class":"OC_App","type":"::","args":["mail",["OCA\\Mail\\Migration\\AddMissingDefaultTags","OCA\\Mail\\Migration\\AddMissingMessageIds","OCA\\Mail\\Migration\\FixCollectedAddresses","OCA\\Mail\\Migration\\FixBackgroundJobs","OCA\\Mail\\Migration\\MakeItineraryExtractorExecutable","And 1 more entries, set log level to debug to see all entries"]]},{"file":"XXX/nextcloud/apps/settings/lib/Controller/AppSettingsController.php","line":453,"function":"installApp","class":"OC\\Installer","type":"->","args":["mail"]},{"file":"XXX/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":169,"function":"enableApps","class":"OCA\\Settings\\Controller\\AppSettingsController","type":"->","args":[["mail"],[]]},{"file":"XXX/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":100,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"XXX/nextcloud/lib/private/AppFramework/App.php","line":152,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Settings\\Controller\\AppSettingsController"},"enableApps"]},{"file":"XXX/nextcloud/lib/private/Route/Router.php","line":309,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Settings\\Controller\\AppSettingsController","enableApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"settings.AppSettings.enableApps"}]},{"file":"XXX/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/settings/apps/enable"]},{"file":"XXX/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"XXX/nextcloud/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.55 Safari/537.36 Edg/96.0.1054.34","version":"20.0.14.2"}

Logging

[index] Error: Exception: Too few arguments to function OCA\Mail\Migration\ProvisionAccounts::__construct(), 0 passed in XXX/nextcloud/lib/private/Repair.php on line 129 and exactly 1 expected at <>

  1. XXX/nextcloud/lib/private/AppFramework/App.php line 152
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Settings\Con ... {}, "enableApps")
  2. XXX/nextcloud/lib/private/Route/Router.php line 309
    OC\AppFramework\App::main("OCA\Settings\ ... r", "enableApps", OC\AppFramework\ ... {}, {_route: "settin ... "})
  3. XXX/nextcloud/lib/base.php line 1008
    OC\Route\Router->match("/settings/apps/enable")
  4. XXX/nextcloud/index.php line 37
    OC::handleRequest()

POST /nextcloud/index.php/settings/apps/enable
from XXX by Thomas at 2021-11-29T21:31:57+00:00

Server configuration

Nextcloud 20.0.14
MySQL-Version "5.7.33"
PHP-Version: 7.3

This is the first time I am reporting a bug. I hope I have shared the correct log file.

Thanks and Regards

Thomas P.

@ChristophWurst
Copy link
Member

nextcloud/server#29974 should help debug this.

@camouflage81 note that Nextcloud 20 has reached EOL: https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule. Consider upgrading to 21 or newer.

@ChristophWurst
Copy link
Member

@steglicd how familiar are you with php development? You might have to debug something for me.

@ChristophWurst
Copy link
Member

Bad news: I'm not able to reproduce this error yet. On a clean CI installation the app can be installed without any error.

@hkzlab
Copy link

hkzlab commented Nov 30, 2021

I have the same (or similar) issue.
I got this error while I was on nextcloud 20, then I updated the docker to 21, and then to 22, but the issue remains when I try to install the application.

Scratch that... I was still sleepy and updated another one of my test instances...

@ChristophWurst
Copy link
Member

I was just able to trigger this with Nextcloud 20. 21 and newer are still not reproducible.

Run php -f nextcloud/occ maintenance:repair
An unhandled exception has been thrown:
ArgumentCountError: Too few arguments to function OCA\Mail\Migration\ProvisionAccounts::__construct(), 0 passed in /home/runner/work/mail/mail/nextcloud/lib/private/Repair.php on line 129 and exactly 1 expected in /home/runner/work/mail/mail/nextcloud/apps/mail/lib/Migration/ProvisionAccounts.php:37
Stack trace:
#0 /home/runner/work/mail/mail/nextcloud/lib/private/Repair.php(129): OCA\Mail\Migration\ProvisionAccounts->__construct()
#1 /home/runner/work/mail/mail/nextcloud/core/Command/Maintenance/Repair.php(106): OC\Repair->addStep()
#2 /home/runner/work/mail/mail/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Maintenance\Repair->execute()
#3 /home/runner/work/mail/mail/nextcloud/3rdparty/symfony/console/Application.php(1000): Symfony\Component\Console\Command\Command->run()
#4 /home/runner/work/mail/mail/nextcloud/3rdparty/symfony/console/Application.php(271): Symfony\Component\Console\Application->doRunCommand()
#5 /home/runner/work/mail/mail/nextcloud/3rdparty/symfony/console/Application.php(147): Symfony\Component\Console\Application->doRun()
#6 /home/runner/work/mail/mail/nextcloud/lib/private/Console/Application.php(215): Symfony\Component\Console\Application->run()
#7 /home/runner/work/mail/mail/nextcloud/console.php(100): OC\Console\Application->run()
#8 /home/runner/work/mail/mail/nextcloud/occ(11): require_once('/home/runner/wo...')
#9 {main}

@ChristophWurst
Copy link
Member

Possible explanations for this:

  1. Autoloader is not ready
  2. DI container is not initialized
  3. An interface is injected that can't be resolved

@ChristophWurst
Copy link
Member

Next test will be against nextcloud/server#29974 so we can see the original error trace.

@steglicd
Copy link
Author

@steglicd how familiar are you with php development? You might have to debug something for me.

@ChristophWurst tell me what you need. Maybe I can help.

@camouflage81
Copy link

camouflage81 commented Nov 30, 2021

nextcloud/server#29974 should help debug this.

@camouflage81 note that Nextcloud 20 has reached EOL: https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule. Consider upgrading to 21 or newer.

Hello, I would like to update the "Nextcloud" to version 21.
However, according to this message, this is currently not possible. My hoster does not plan to offer an update of the MYSQL version in the next months :-(.
Es wird die MySQL-Version "5.7.33" verwendet. Nextcloud 21 wird diese Version nicht mehr unterstützen und benötigt MySQL 8.0, MariaDB 10.2 oder höher.

I will try the repair tonight. I hope I understand the instructions.

Thanks and Greetings

@ChristophWurst
Copy link
Member

Understandable. Time to get a new hoster :)

@steglicd
Copy link
Author

I upgraded one of my instances to NC 22.2.3.

With Nextcloud 22.2.3 issue is gone. So for user which are able to upgrade, this is a good workaround. But still one bad thing in my opinion is that the mail app upgrade broke the whole instance. Don't know if this is more a issue of NC or if the mail app can fix this.

My 21.0.0 Instance still is affected if @ChristophWurst needs some debug data.

@ChristophWurst
Copy link
Member

I tested with the latest 21.0.x. Will test again with 21.0.0.

@rmbleeker
Copy link

I'm guessing that due to it's EOL status, this is not going to be fixed for NC 20? I ask because I'm still running Nextcloud on Ubuntu 18.04 LTS which has a MariaDB version that's too old to be supported by NC 21. I was hoping to ride it out until Ubuntu 22.04 LTS was released, but now it seems like I can't wait that long.

@ChristophWurst
Copy link
Member

ChristophWurst commented Nov 30, 2021

Correct. I'll see what needs to be fixed for 21, if anything.

What I've tested so far

  • 21.0.0 💥
  • 21.0.1 ✔️
  • 21.0.2 ✔️
  • 21.0.4 ✔️
  • 21.0.7 ✔️

@bendilobi
Copy link

Just for the record... I'm having the same issue. And I'm also on a shared hosting provider that won't upgrade to MySQL8 anytime soon since it isn't backwards compatible.

I'm planning to migrate my Nextcloud to another provider, but that will take me quite some time so I would be very happy about a fix for NC 20 since I'm using the Mail app as my main email application for some time now...

@ChristophWurst
Copy link
Member

There won't be another 20 release and I can't change that. If you are lucky there might be a patch. But you are running outdated software that does not only not get any more bugfixes but also no security patches. Don't stay on outdated Nextcloud 20 lightly.

@bendilobi what precise version of Nextcloud do you use?

@ChristophWurst
Copy link
Member

Test results are in. This is only reproducible with 21.0.0, anything newer works.

Could you all affected please confirm that you run 21.0.0 and nothing more recent? Thanks.

@ChristophWurst
Copy link
Member

If someone wants to help narrow this down please study all PRs in https://github.com/nextcloud/server/issues?page=1&q=is%3Aclosed+milestone%3A%22Nextcloud+21.0.1%22. I'm unable to find the one that fixed this issue.

To sum things up I'll fix this bug as a wontfix because it only happens on largely outdated installations of Nextcloud.

Stay save, friends. Update your Nextcloud regularly ✌️

You can use https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule as the main source for releases, versions and EOL.

@bendilobi
Copy link

Well, updating my Nextcloud means moving my domain and all my other projects to another provider, so that sucks...

I'm currently on NC 20.0.14...

@ChristophWurst
Copy link
Member

With Nextcloud 22.2.3 issue is gone. So for user which are able to upgrade, this is a good workaround. But still one bad thing in my opinion is that the mail app upgrade broke the whole instance. Don't know if this is more a issue of NC or if the mail app can fix this.

Fair point btw. This was addressed with nextcloud/server#25112. Failing repair steps no longer bring down the whole instance.

@ChristophWurst
Copy link
Member

@bendilobi I understand the frustration. But there really isn't anything I can do to improve this. I've spent half my work day on this.

@ChristophWurst
Copy link
Member

ChristophWurst commented Nov 30, 2021

If someone wants to help narrow this down please study all PRs in https://github.com/nextcloud/server/issues?page=1&q=is%3Aclosed+milestone%3A%22Nextcloud+21.0.1%22. I'm unable to find the one that fixed this issue.

@bendilobi you could dig through this, find the fix and port it for your version.

https://github.com/nextcloud/server/compare/v21.0.0..v21.0.1 can also be used to only compare code changes.

@bendilobi
Copy link

@ChristophWurst thanks for looking into this. And thanks for all the work you're putting into the mail app, it's really getting more and more useful.

@steglicd
Copy link
Author

NC upgrade fixed it.

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

7 participants
@hkzlab @ChristophWurst @bendilobi @rmbleeker @steglicd @camouflage81 and others