nextcloud / cms_pico

🗃 Integrate Pico CMS and let your users manage their own websites
https://apps.nextcloud.com/apps/cms_pico
GNU Affero General Public License v3.0
134 stars 41 forks source link

v1.1.0-beta.1 Compatibility with NC 25.0 #227

Open Bockeman opened 1 year ago

Bockeman commented 1 year ago

When I attempt to update NC as follows:

sudo -u apache php /var/www/html/nextcloud/updater/updater.phar \
  Nextcloud Updater - version: v25.0.0beta3-17-gef6cf2d

  Current version is 25.0.0.

  Update to Nextcloud 25.0.2 RC3 available. (channel: "beta")
  Following file will be downloaded automatically: https://download.nextcloud.com/server/prereleases/nextcloud-25.0.2rc3.zip
  ...

It produces a stack dump as follows:

  Repair info: Syncing Pico CMS app data folder ?
  An unhandled exception has been thrown:
  TypeError: OC\Files\Utils\Scanner::__construct(): Argument #4 ($logger) must be of type Psr\Log\LoggerInterface, OC\Log given, called in /extra/www/html/verivault/apps/cms_pico/lib/Files/StorageFolder.php on line 204 and defined in /extra/www/html/verivault/lib/private/Files/Utils/Scanner.php:95
  Stack trace:
  #0 /extra/www/html/verivault/apps/cms_pico/lib/Files/StorageFolder.php(204): OC\Files\Utils\Scanner->__construct(NULL, Object(OC\DB\ConnectionAdapter), Object(OC\EventDispatcher\EventDispatcher), Object(OC\Log))
  #1 /extra/www/html/verivault/apps/cms_pico/lib/Service/FileService.php(186): OCA\CMSPico\Files\StorageFolder->sync(false)
  #2 /extra/www/html/verivault/apps/cms_pico/lib/Migration/AppDataRepairStep.php(170): OCA\CMSPico\Service\FileService->syncAppDataFolder()
  #3 /extra/www/html/verivault/apps/cms_pico/lib/Migration/AppDataRepairStep.php(140): OCA\CMSPico\Migration\AppDataRepairStep->syncAppDataFolder()
  #4 /extra/www/html/verivault/lib/private/Repair.php(127): OCA\CMSPico\Migration\AppDataRepairStep->run(Object(OC\Repair))
  #5 /extra/www/html/verivault/lib/private/legacy/OC_App.php(1064): OC\Repair->run()
  #6 /extra/www/html/verivault/lib/private/Installer.php(156): OC_App::executeRepairSteps('cms_pico', Array)
  #7 /extra/www/html/verivault/core/Command/App/Enable.php(111): OC\Installer->installApp('cms_pico', false)
  #8 /extra/www/html/verivault/core/Command/App/Enable.php(81): OC\Core\Command\App\Enable->enableApp('cms_pico', Array, false, Object(Symfony\Component\Console\Output\ConsoleOutput))
  #9 /extra/www/html/verivault/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\App\Enable->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
  #10 /extra/www/html/verivault/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
  #11 /extra/www/html/verivault/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\App\Enable), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
  #12 /extra/www/html/verivault/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
  #13 /extra/www/html/verivault/lib/private/Console/Application.php(213): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
  #14 /extra/www/html/verivault/console.php(100): OC\Console\Application->run()
  #15 {main}
  ...

I can work around this by stepping back to v1.0.19 and editing the max-version to 25. Either way an update to v1.0.19 should be released is compatible with NC25, or the v1.1.0-beta.1 is updated with genuine compatibility with NC.

PhrozenByte commented 1 year ago

Upgrade to v1.0.21, this version is compatible with Nextcloud 25.

Bockeman commented 1 year ago

@PhrozenByte thanks very much for responding. Agreed, v1.0.21 is compatible with NC25, so no problem there.

But I have "Beta" set for my NC upgrades (dangerous I know, but I do thorough backups and wind back if I cannot workaround any problems).

Beta means that v1.1.0-beta.1 is seen as the latest available version, and whenever I do an NC upgrade, it wants to and does pick that (which I'm trying to workaround). Because v1.1.0-beta.1 is not compatible, that creates the mess which is the subject of this issue.

Now what I don't know is whether this is a bug in the NC upgrade mechanism (it should not pick an incompatible app version) or whether there is a deficiency in how v1.1.0-beta.1 presents itself to NC upgrade. Perhaps you can help.

However, my suggestions would be

  1. Remove or rename v1.1.0-beta.1 so that NC Beta upgrade cannot this version.
  2. Fix the max_version in v1.1.0-beta.1 as I do successfully with sed -i 's/"24"/"25"/' /var/www/html/verivault/apps/cms_pico/appinfo/info.xml (that works, but it does not solve the NC upgrade stack dump problem)
  3. Upgrade the beta version to something which is genuinely NC 25 compatible.
github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1:

Bockeman commented 1 year ago

Is this likely to get looked at?

However, my suggestions would be

1. Remove or rename v1.1.0-beta.1 so that NC Beta upgrade cannot this version.
2. Fix the max_version in v1.1.0-beta.1 as I do successfully with
`sed -i 's/"24"/"25"/' /var/www/html/verivault/apps/cms_pico/appinfo/info.xml`
(that works, but it does not solve the NC upgrade stack dump problem)
3. Upgrade the beta version to something which is genuinely NC 25 compatible.
PhrozenByte commented 1 year ago

Not in the short term I'm afraid. It should fix itself when publishing the final v1.1 resp v2.0 and I might find some time over the holidays to publish these new versions, but no guarantees given.

Bockeman commented 1 year ago

@PhrozenByte that's great. What I really wanted to avoid was this issue being marked as "stale". But so good to hear this is likely to be resolved in the not too distant future.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1:

Bockeman commented 1 year ago

I'm happy to wait for @PhrozenByte to resolve this one way or another (rather than this topic going stale).

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1:

Bockeman commented 1 year ago

I'm happy to wait for @PhrozenByte to resolve this one way or another (rather than this topic going stale).

PhrozenByte commented 1 year ago

This will be fixed no matter whether this issue is kept open or not, simply because this issue doesn't really track something - it will be fixed automatically with a final release. So, no worries if the bot closes this issue @Bockeman :+1:

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1:

Bockeman commented 1 year ago

@github-actions not stale

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1:

Bockeman commented 1 year ago

@github-actions not stale

Bockeman commented 1 year ago

I upgraded to Nexcloud 25.0.3. I'm using 1.0.21 as a stop-gap until things get fixed properly. The NextCloud error logging page is littered with debug messages every one second:

  Debug cms_pico    /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.      2023-01-20T16:51:05+0000
  Debug cms_pico    /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.      2023-01-20T16:51:05+0000
  Debug cms_pico    /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.      2023-01-20T16:51:04+0000
  Debug cms_pico    /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.      2023-01-20T16:51:04+0000
  Debug cms_pico    /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class instead.      2023-01-20T16:51:04+0000
  ...
  ...
  ...

I'm reluctant to report this as a bug because clearly I am picking up a possibly incompatible version, but will do if you advise @PhrozenByte. (and in any cases, debug messages repeated every second are surely going to cause other problems)

PhrozenByte commented 1 year ago

@Bockeman Disable debug mode resp. increase the log level accordingly.

Bockeman commented 1 year ago

@PhrozenByte thanks for the tip (I had to double check the documentation -- for some reason in my mind I had thought decreasing 'loglevel' decreased the logging verbosity, but in fact, as you say, I need to increase loglevel. Done).

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1:

Bockeman commented 1 year ago

@github-actions not stale

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1:

Bockeman commented 1 year ago

This now applies to NC 26.0 @PhrozenByte can you tell me anything that might raise my hopes for a fix/resolution?

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1:

Bockeman commented 1 year ago

@github-actions not stale

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1:

Bockeman commented 1 year ago

@github-actions not stale

enrauk commented 8 months ago

This now applies to NC27.0, is this still going to be fixed?