Echec php occ upgrade

Bonjour,

La mise à jour de mon environnement nextcloud échoue, je n’arrive pas à comprendre pourquoi…
Ci-dessous le retour de la commande :
www-data@bb9a52ecc6a8:~/html$ php occ upgrade
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
Setting log level to debug
Updating database schema
Updated database
An unhandled exception has been thrown:
TypeError: fwrite(): Argument #1 ($stream) must be of type resource, bool given in /var/www/html/lib/private/Security/CertificateManager.php:161
Stack trace:
#0 /var/www/html/lib/private/Security/CertificateManager.php(161): fwrite(false, ‘##\n## Bundle of…’)
#1 /var/www/html/lib/private/Security/CertificateManager.php(247): OC\Security\CertificateManager->createCertificateBundle()
#2 /var/www/html/lib/private/Http/Client/Client.php(127): OC\Security\CertificateManager->getAbsoluteBundlePath()
#3 /var/www/html/lib/private/Http/Client/Client.php(74): OC\Http\Client\Client->getCertBundle()
#4 /var/www/html/lib/private/Http/Client/Client.php(218): OC\Http\Client\Client->buildRequestOptions(Array)
#5 /var/www/html/lib/private/App/AppStore/Fetcher/Fetcher.php(120): OC\Http\Client\Client->get(‘https://apps.ne…’, Array)
#6 /var/www/html/lib/private/App/AppStore/Fetcher/AppFetcher.php(87): OC\App\AppStore\Fetcher\Fetcher->fetch(’’, ‘’)
#7 /var/www/html/lib/private/App/AppStore/Fetcher/Fetcher.php(192): OC\App\AppStore\Fetcher\AppFetcher->fetch(’’, ‘’, false)
#8 /var/www/html/lib/private/App/AppStore/Fetcher/AppFetcher.php(188): OC\App\AppStore\Fetcher\Fetcher->get(false)
#9 /var/www/html/lib/private/Installer.php(422): OC\App\AppStore\Fetcher\AppFetcher->get(false)
#10 /var/www/html/lib/private/Updater.php(413): OC\Installer->isUpdateAvailable(‘accessibility’)
#11 /var/www/html/lib/private/Updater.php(274): OC\Updater->upgradeAppStoreApps(Array)
#12 /var/www/html/lib/private/Updater.php(133): OC\Updater->doUpgrade(‘24.0.0.12’, ‘23.0.4.1’)
#13 /var/www/html/core/Command/Upgrade.php(235): OC\Updater->upgrade()
#14 /var/www/html/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#15 /var/www/html/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /var/www/html/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /var/www/html/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /var/www/html/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /var/www/html/console.php(99): OC\Console\Application->run()
#20 /var/www/html/occ(11): require_once(’/var/www/html/c…’)
#21 {main}www-data@bb9a52ecc6a8

Salut,

Je n’ai pas la même erreur mais lorsque je fais une MAJ avec php 8.0 j’ai toujours une erreur qui m’empêche de terminer la MAJ. En repassant à php 7.4, je n’ai aucune erreur.

En espérant que ça puisse t’aider.

Bonne journée !

Bonjour Thom1,

Merci pour cette piste, cependant dans mon cas je ne peux changer facilement la version de php j’utilise le conteneur nextcloud officiel. La version de php intégré est la 8.0.18.

Bonne journée,

Bonsoir,

J’ai beau creuser je ne trouve pas une solution à mon problème, si vous avez des pistes ? :slight_smile:

@Dionysoos avez vous essayé de fairephp occ maintenance:repair ?

Bonjour,

Merci pour votre message, j’avais déjà exécuté cette commande, je n’ai pas trouvé d’erreur dans cette dernière :
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

  • Repair MySQL collation
    • All tables already have the correct collation → nothing to do
  • Repair mime types
  • Clean tags and favorites
    • 0 tags of deleted users have been removed.
    • 0 tags for delete files have been removed.
    • 0 tag entries for deleted tags have been removed.
    • 0 tags with no entries have been removed.
  • Repair invalid shares
  • Move .step file of updater to backup location
  • Add move avatar background job
    • Repair step already executed
  • Add preview cleanup background jobs
  • Migrate oauth2_clients table to nextcloud schema
    • Update the oauth2_access_tokens table schema.
    • Update the oauth2_clients table schema.
  • Fix potential broken mount points
    • No mounts updated
  • Repair language codes
  • Install new core bundle components
  • Add log rotate job
  • Clear frontend caches
    • Image cache cleared
    • SCSS cache cleared
    • JS cache cleared
  • Clear every generated avatar on major updates
  • Add preview background cleanup job
  • Queue a one-time job to cleanup old backups of the updater
  • Cleanup invalid photocache files for carddav
  • Add background job to cleanup login flow v2 tokens
  • Remove potentially over exposing share links
    • No need to remove link shares.
  • Clear access cache of projects
  • Reset generated avatar flag
  • Keep legacy encryption enabled
  • Check encryption key format
  • Remove old dashboard app config data
  • Add job to cleanup the bruteforce entries
  • Queue a one-time job to check for user uploaded certificates
  • Repair DAV shares
  • Add background job to set the lookup server share state for users
  • Upgrading Circles App
  • Fix component of birthday calendars
    • 4 birthday calendars updated.
  • Regenerating birthday calendars to use new icons and fix old birthday events without year
    • Repair step already executed
  • Fix broken values of calendar objects
    0 [->--------------------------]
  • Registering building of calendar search index as background job
    • Repair step already executed
  • Register building of social profile search index as background job
  • Registering background jobs to update cache for webcal calendars
    • Added 0 background jobs to update webcal calendars
  • Registering building of calendar reminder index as background job
    • Repair step already executed
  • Clean up orphan event and contact data
    • 0 events without a calendar have been cleaned up
    • 0 properties without an events have been cleaned up
    • 0 changes without a calendar have been cleaned up
    • 0 cached events without a calendar subscription have been cleaned up
    • 0 changes without a calendar subscription have been cleaned up
    • 0 contacts without an addressbook have been cleaned up
    • 0 properties without a contact have been cleaned up
    • 0 changes without an addressbook have been cleaned up
  • Remove activity entries of private events
    • Removed 0 activity entries
  • Clean up old calendar subscriptions from deleted users that were not cleaned-up
    0 [----->----------------------]
    • 0 calendar subscriptions without an user have been cleaned up
  • Fix the share type of guest shares when migrating from ownCloud
  • Copy the share password into the dedicated column
  • Set existing shares as accepted
  • Update OAuth token expiration times
  • Switches from default updater server to the customer one if a valid subscription is available
    • Repair step already executed
  • Send an admin notification if monthly report is disabled
  • Add background job to check for backup codes
  • Populating added database structures for workflows

J’ai également essayé de désactiver le maximum d’app
Enabled:

  • cloud_federation_api: 1.7.0
  • dav: 1.22.0
  • federatedfilesharing: 1.14.0
  • files: 1.19.0
  • lookup_server_connector: 1.12.0
  • oauth2: 1.12.0
  • provisioning_api: 1.14.0
  • settings: 1.6.0
  • twofactor_backupcodes: 1.13.0
  • viewer: 1.8.0
  • workflowengine: 2.6.0
    Puis de lance php occ upgrade, toujours la même erreur.