[resolved] Erreur mise à jour NextCloud : ParseError: syntax error, unexpected '?' in ProgressBar.php:99

:uk:/:us: Error while upgrading Nextcloud

My YunoHost server

Hardware: home computer
YunoHost version: 3.6.5.3
Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : I don’t think so

Description of my issue

When I try to upgrade Nextcloud, I have the following log :
https://paste.yunohost.org/raw/eyobowujik
I think the revelant part is here :

2020-01-13 10:05:57,523: DEBUG - Nextcloud or one of the apps require upgrade - only a limited number of commands are available
2020-01-13 10:05:57,524: DEBUG - You may use your browser or the occ upgrade command to do the upgrade
2020-01-13 10:05:57,524: DEBUG - An unhandled exception has been thrown:
2020-01-13 10:05:57,525: DEBUG - ParseError: syntax error, unexpected '?' in /var/www/nextcloud/apps/files_external_gdrive/vendor/symfony/console/Helper/ProgressBar.php:99
2020-01-13 10:05:57,525: DEBUG - Stack trace:
2020-01-13 10:05:57,526: DEBUG - #0 /var/www/nextcloud/lib/composer/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/nextcl...')
2020-01-13 10:05:57,526: DEBUG - #1 [internal function]: Composer\Autoload\ClassLoader->loadClass('Symfony\\Compone...')
2020-01-13 10:05:57,527: DEBUG - #2 /var/www/nextcloud/core/Command/Upgrade.php(106): spl_autoload_call('Symfony\\Compone...')
2020-01-13 10:05:57,527: DEBUG - #3 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2020-01-13 10:05:57,527: DEBUG - #4 /var/www/nextcloud/3rdparty/symfony/console/Application.php(946): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2020-01-13 10:05:57,528: DEBUG - #5 /var/www/nextcloud/3rdparty/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2020-01-13 10:05:57,529: DEBUG - #6 /var/www/nextcloud/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2020-01-13 10:05:57,529: DEBUG - #7 /var/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2020-01-13 10:05:57,530: DEBUG - #8 /var/www/nextcloud/console.php(96): OC\Console\Application->run()
2020-01-13 10:05:57,530: DEBUG - #9 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
2020-01-13 10:05:57,632: DEBUG - #10 {main}+ '[' 1 -eq 3 ']'
2020-01-13 10:05:57,633: WARNING - Unable to upgrade Nextcloud
2020-01-13 10:05:57,636: DEBUG - + ynh_die '--message=Unable to upgrade Nextcloud'

And line 99 in ProgressBar.php :

public static function getPlaceholderFormatterDefinition(string $name): ?callable

I tried to search the forum and it seems that many people have an upgrade problem due to php7.4 but on my server, wherever I do it with my user, root or nextcloud, I have the following result

> update-alternatives --display php
php - mode manuel
  link best version is /usr/bin/php7.4
 le lien pointe actuellement sur /usr/bin/php7.0
  link php is /usr/bin/php
  slave php.1.gz is /usr/share/man/man1/php.1.gz
/usr/bin/php7.0 - priorité 70
 lien secondaire php.1.gz : /usr/share/man/man1/php7.0.1.gz
/usr/bin/php7.2 - priorité 72
 lien secondaire php.1.gz : /usr/share/man/man1/php7.2.1.gz
/usr/bin/php7.3 - priorité 73
 lien secondaire php.1.gz : /usr/share/man/man1/php7.3.1.gz
/usr/bin/php7.4 - priorité 74
 lien secondaire php.1.gz : /usr/share/man/man1/php7.4.1.gz

So I think the php version is not the problem.

If anyone have a solution, thanks a lot :slight_smile:


:fr: Impossible de mettre Nextcloud à jour

Mon serveur YunoHost

Matériel: Ordinateur à la maison
Version de YunoHost: 3.6.5.3
Êtes-vous dans un contexte particulier ou avez-vous effectué des modificiations particulières sur votre instance ? : normalement non

Description du problème

Quand j’essaie de mettre à jour Nextcloud, j’ai le log suivant :
https://paste.yunohost.org/raw/eyobowujik
Je pense que la partie intéressante est la suivante :

2020-01-13 10:05:57,523: DEBUG - Nextcloud or one of the apps require upgrade - only a limited number of commands are available
2020-01-13 10:05:57,524: DEBUG - You may use your browser or the occ upgrade command to do the upgrade
2020-01-13 10:05:57,524: DEBUG - An unhandled exception has been thrown:
2020-01-13 10:05:57,525: DEBUG - ParseError: syntax error, unexpected '?' in /var/www/nextcloud/apps/files_external_gdrive/vendor/symfony/console/Helper/ProgressBar.php:99
2020-01-13 10:05:57,525: DEBUG - Stack trace:
2020-01-13 10:05:57,526: DEBUG - #0 /var/www/nextcloud/lib/composer/composer/ClassLoader.php(322): Composer\Autoload\includeFile('/var/www/nextcl...')
2020-01-13 10:05:57,526: DEBUG - #1 [internal function]: Composer\Autoload\ClassLoader->loadClass('Symfony\\Compone...')
2020-01-13 10:05:57,527: DEBUG - #2 /var/www/nextcloud/core/Command/Upgrade.php(106): spl_autoload_call('Symfony\\Compone...')
2020-01-13 10:05:57,527: DEBUG - #3 /var/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2020-01-13 10:05:57,527: DEBUG - #4 /var/www/nextcloud/3rdparty/symfony/console/Application.php(946): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2020-01-13 10:05:57,528: DEBUG - #5 /var/www/nextcloud/3rdparty/symfony/console/Application.php(248): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2020-01-13 10:05:57,529: DEBUG - #6 /var/www/nextcloud/3rdparty/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2020-01-13 10:05:57,529: DEBUG - #7 /var/www/nextcloud/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
2020-01-13 10:05:57,530: DEBUG - #8 /var/www/nextcloud/console.php(96): OC\Console\Application->run()
2020-01-13 10:05:57,530: DEBUG - #9 /var/www/nextcloud/occ(11): require_once('/var/www/nextcl...')
2020-01-13 10:05:57,632: DEBUG - #10 {main}+ '[' 1 -eq 3 ']'
2020-01-13 10:05:57,633: WARNING - Unable to upgrade Nextcloud
2020-01-13 10:05:57,636: DEBUG - + ynh_die '--message=Unable to upgrade Nextcloud'

Et la ligbe 99 de ProgressBar.php :

public static function getPlaceholderFormatterDefinition(string $name): ?callable

J’ai essayé de regarder sur le forum car plusieurs personnes ont des soucis de mise à jour, mais liés à php7.4 (installé chez moi).
Cependant, sur mon serveur, que ce soit avec mon utilisateur, root ou nextcloud, j’ai le résultat suivant :

> update-alternatives --display php
php - mode manuel
  link best version is /usr/bin/php7.4
 le lien pointe actuellement sur /usr/bin/php7.0
  link php is /usr/bin/php
  slave php.1.gz is /usr/share/man/man1/php.1.gz
/usr/bin/php7.0 - priorité 70
 lien secondaire php.1.gz : /usr/share/man/man1/php7.0.1.gz
/usr/bin/php7.2 - priorité 72
 lien secondaire php.1.gz : /usr/share/man/man1/php7.2.1.gz
/usr/bin/php7.3 - priorité 73
 lien secondaire php.1.gz : /usr/share/man/man1/php7.3.1.gz
/usr/bin/php7.4 - priorité 74
 lien secondaire php.1.gz : /usr/share/man/man1/php7.4.1.gz

Du coup je ne pense pas que php7.4 soit la source de mon problème.

Merci d’avance si quelqu’un a une idée d’une solution :slight_smile:

==============
SOLVED by removing the google drive app in nextcloud
RÉSOLU en supprimant l’application google drive dans nextcloud

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.