Impossible to enable/install apps after update to 29

Unable to enable/install apps after update to 29.0.3.

Setup: Docker on Ubuntu 22.04 with MariaDB

Initially after update from v28 to 29.0.3 Nextcloud failed to start untill I disabled Calender app using occ.
After disabling the app if I tried to update it in GUI Nextcloud falled into maintenance mode.
Apparently app update worked from with occ, however it is still not possible to enable apps (tried with Calender and Music) neither in GUI nor with occ.
When trying to update in GUI the error is:

When trying to enable with occ the error is as follows:

docker exec -itu www-data nextcloud-app php occ app:enable -vv -- music
An unhandled exception has been thrown:
TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in /var/www/html/lib/private/Installer.php:112
Stack trace:
#0 /var/www/html/lib/private/Installer.php(112): in_array('music', true, true)
#1 /var/www/html/core/Command/App/Enable.php(110): OC\Installer->installApp('music', false)
#2 /var/www/html/core/Command/App/Enable.php(80): OC\Core\Command\App\Enable->enableApp('music', Array, false, Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /var/www/html/3rdparty/symfony/console/Command/Command.php(298): OC\Core\Command\App\Enable->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /var/www/html/3rdparty/symfony/console/Application.php(1040): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /var/www/html/3rdparty/symfony/console/Application.php(301): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\App\Enable), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /var/www/html/3rdparty/symfony/console/Application.php(171): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#7 /var/www/html/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 /var/www/html/console.php(102): OC\Console\Application->run()
#9 /var/www/html/occ(11): require_once('/var/www/html/c...')
#10 {main}

Does everything work again when you run an php ./occ upgrade? There is currently a similar bug with polls, where this was the solution.

I am getting this when running occ upgrade:

docker exec -itu www-data nextcloud-app php occ upgrade
Nextcloud is already latest version

I’m having the same problem with the update to 30.0.0.2 docker version.
In order to continue the upgrade process I had to disable a bunch of apps. when I try to enable/or update them I get this “haystack” error:

  php occ app:enable contacts  

An unhandled exception has been thrown: TypeError: in_array(): Argument #2 ($haystack) must be of type array, bool given in /var/www/html/lib/private/Installer.php:79 Stack trace:

 #0 /var/www/html/lib/private/Installer.php(79): in_array('contacts', true, true) 
 #1 /var/www/html/core/Command/App/Enable.php(93): OC\Installer->installApp('contacts', false) 
 #2 /var/www/html/core/Command/App/Enable.php(63): OC\Core\Command\App\Enable->enableApp('contacts', Array, false, Object(Symfony\Component\Console\Output\ConsoleOutput)) 
 #3 /var/www/html/3rdparty/symfony/console/Command/Command.php(326): OC\Core\Command\App\Enable->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
 #4 /var/www/html/3rdparty/symfony/console/Application.php(1078): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
 #5 /var/www/html/3rdparty/symfony/console/Application.php(324): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\App\Enable), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
 #6 /var/www/html/3rdparty/symfony/console/Application.php(175):  [/code]Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
 #7 /var/www/html/lib/private/Console/Application.php(183): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) 
 #8 /var/www/html/console.php(87): OC\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput)) 
 #9 /var/www/html/occ(11): require_once('/var/www/html/c...') 
 #10 {main} 
 www-data@cloud:~/html$ php occ upgrade 
 Nextcloud is already latest version 

Update to 30.0.0.3 docker version. Problems persist

Please post your config (occ config:list system). And take a careful look at the value of app_install_overwrite.

Thank you so much. I don’t know why and since when. My config seems to have contained the mentioned value.

 "appstoreenabled": true,
        "0": "opcache.jit = 1255",
        "1": "opcache.jit_buffer_size = 128M",
        "app_install_overwrite": true,
        "allow_local_remote_servers": true,
        "2": [
            "forms",
            "officeonline",
            "documentserver_community"
        ],
        "onlyoffice": {
            "verify_peer_off": true,
            "jwt_secret": "***REMOVED SENSITIVE VALUE***",
            "jwt_header": "AuthorizationJwt"
        }
    }
}

After deleting the

    "app_install_overwrite": true,

entry my instance is working fine now.

1 Like

Glad to hear it’s resolved.

Based on what I see above the in your original config, I think the "2" entry only exists due to some sort of mix up. I suspect your config was supposed to be:

        "allow_local_remote_servers": true,
        "app_install_overwrite": [
            "forms",
            "officeonline",
            "documentserver_community"
        ],

Maybe it got messed up from a typo when adding allow_local_remote_servers at some point, but that’s just a guess.