Update to 21.0.3 to 22.0.0 hangs on app update

I have a rootless podman instance of nextcloud on my server. I have it configured to update automatically with podman aka not a good idea.

Steps to replicate it:

  1. After podman pulled down version 22.0.0 it got stuck on:
    Checking for update of app accessibility in appstore

Nextcloud version (eg, 20.0.5): 21.0.3 -> 22.0.0
Operating system and version: CentOS Stream
nginx
PHP version: 7.4.21

The issue you are facing:
Cannot pull down updates from app store

Is this the first time you’ve seen this error?: Y

Nextcloud.log:

nextcloud.log
{"reqId":"Ly9whuE3hjhPYPCAiFRI","level":1,"time":"2021-07-12T05:04:41+00:00","remoteAddr":"10.0.2.100","user":"--","app":"updater","method":"GET","url":"/core/ajax/update.php?requesttoken=zrQUxR2b8zIGrvhM4IncuaPDvGLYrUJcEe0Mif7MVbs%3D%3AvPturGqoi1c%2F3sE7qOaTjdb67RKd3TppYa5B8Z%2B2II8%3D","message":"\\OC\\Updater::checkAppStoreAppBefore: Checking for update of app \"accessibility\" in appstore","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36","version":"21.0.3.1"}
{"reqId":"8311F4yyYkRHalpq05LE","level":1,"time":"2021-07-12T05:07:27+00:00","remoteAddr":"10.0.2.100","user":"--","app":"no app in context","method":"GET","url":"/index.php/204","message":"Unable to generate a URL for the named route \"ocs.files.DirectEditing.info\" as such route does not exist.","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.15.1","version":"21.0.3.1","exception":{"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"ocs.files.DirectEditing.info\" as such route does not exist.","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Route/Router.php","line":364,"function":"generate","class":"Symfony\\Component\\Routing\\Generator\\UrlGenerator","type":"->","args":["ocs.files.DirectEditing.info",[],1]},{"file":"/var/www/html/lib/private/Route/CachingRouter.php","line":59,"function":"generate","class":"OC\\Route\\Router","type":"->","args":["ocs.files.DirectEditing.info",[],false]},{"file":"/var/www/html/lib/private/URLGenerator.php","line":101,"function":"generate","class":"OC\\Route\\CachingRouter","type":"->","args":["ocs.files.DirectEditing.info",[],false]},{"file":"/var/www/html/apps/files/lib/Capabilities.php","line":71,"function":"linkToOCSRouteAbsolute","class":"OC\\URLGenerator","type":"->","args":["files.DirectEditing.info"]},{"file":"/var/www/html/lib/private/CapabilitiesManager.php","line":69,"function":"getCapabilities","class":"OCA\\Files\\Capabilities","type":"->","args":[]},{"file":"/var/www/html/lib/private/Template/JSConfigHelper.php","line":190,"function":"getCapabilities","class":"OC\\CapabilitiesManager","type":"->","args":[]},{"file":"/var/www/html/lib/private/TemplateLayout.php","line":220,"function":"getConfig","class":"OC\\Template\\JSConfigHelper","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":182,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["guest",""]},{"file":"/var/www/html/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/var/www/html/lib/base.php","line":297,"function":"printPage","class":"OC\\Template\\Base","type":"->","args":[]},{"file":"/var/www/html/lib/base.php","line":949,"function":"checkMaintenanceMode","class":"OC","type":"::","args":[{"__class__":"OC\\SystemConfig"}]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/3rdparty/symfony/routing/Generator/UrlGenerator.php","Line":143,"CustomMessage":"--"}}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'trusted_domains' =>
  array (
    0 => '*** confidential ***',
  ),
  'dbtype' => 'mysql',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.1.103',
  'dbuser' => '*** confidential ***',
  'dbpassword' => '*** confidential ***',
  'overwriteprotocol' => 'https',
  'instanceid' => 'ocr122ix68f9',
  'version' => '21.0.3',
  'installed' => true,
  'theme' => '',
  'loglevel' => 0,
  'maintenance' => true,
);

I ran occ upgrade and occ repair. repair runs succesfully but upgrade will always hang. I also noticed that apps writable always switches back to false.

permissions on the apps folder looks right to:

drwxr-xr-x. 48 231104 podman 4096 Jul 12 03:08 .
drwxr-xr-x. 14 231104 podman 4096 Jul 12 03:08 ..
drwxr-xr-x. 11 231104 podman  122 Jul 12 03:08 accessibility
drwxr-xr-x. 11 231104 podman  263 Jul 12 03:08 activity
drwxr-xr-x.  6 231104 podman   60 Jul 12 03:08 admin_audit
drwxr-xr-x. 12 231104 podman  216 Jul 12 03:08 circles
drwxr-xr-x.  6 231104 podman   75 Jul 12 03:08 cloud_federation_api
drwxr-xr-x.  8 231104 podman   97 Jul 12 03:08 comments
drwxr-xr-x.  6 231104 podman   60 Jul 12 03:08 contactsinteraction
drwxr-xr-x.  9 231104 podman   93 Jul 12 03:08 dashboard
drwxr-xr-x. 10 231104 podman  109 Jul 12 03:08 dav
drwxr-xr-x. 10 231104 podman  109 Jul 12 03:08 encryption
drwxr-xr-x. 10 231104 podman  109 Jul 12 03:08 federatedfilesharing
drwxr-xr-x. 10 231104 podman  109 Jul 12 03:08 federation
drwxr-xr-x. 11 231104 podman  181 Jul 12 03:08 files
drwxr-xr-x. 11 231104 podman  137 Jul 12 03:08 files_external