Intnernal Server Error after going from 25 to 26.0.6

Nextcloud version (eg, 20.0.5): 25.0.6.1
Operating system and version (eg, Ubuntu 20.04): replace me
Apache or nginx version (eg, Apache 2.4.25): replace me
PHP version (eg, 7.4): 8.1.14 with Zend Engine v4.1.14, ionCube PHP Loader v12.0.2, Zend OPcache v8.1.14

The issue you are facing: After performing an upgrade from 24 to 25.0.1 I already got a internal server error and checked the web. Disables most apps I could and then saw the upgrade to 25.0.6 and successfully performed it.

Is this the first time you’ve seen this error? (Y/N): N

I add to my .htaccess always php_value memory_limit 1024M, otherwise e.g. the verify upgrade integrity fails. It is a hosted environment…

Note: I saw this one: Nextcloud 26 upgrade error: passwordHash is not a valid attribute , my browse cache was cleared. I cant reboot the server (hosted).

Note: I saw another issue about opcache , but adding opcache.enable=0 to my .user.ini in the web root directory had no effect.

The output of your Nextcloud log in Admin > Logging:

  Debug    encryption         /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class         2023-05-04T06:14:53+00:00 
                              instead.                                                                                                                              

  Debug    encryption         /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class         2023-05-04T06:14:58+00:00 
                              instead.                                                                                                                              

  Debug    encryption         /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class         2023-05-04T06:14:58+00:00 
                              instead.                                                                                                                              

  Debug    encryption         /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class         2023-05-04T06:14:59+00:00 
                              instead.                                                                                                                              

  Debug    encryption         /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class         2023-05-04T06:14:59+00:00 
                              instead.                                                                                                                              

  Debug    encryption         /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class         2023-05-04T06:15:00+00:00 
                              instead.                                                                                                                              

  Error    index              BadFunctionCallException: passwordHash is not a valid attribute at lib/public/AppFramework/Db/Entity.php    2023-05-04T06:15:00+00:00 
                              line 136                                                                                                                              
                                                                                                                                                                    
                               0. lib/public/AppFramework/Db/Entity.php line 165                                                                                    
                                  OCP\AppFramework\Db\Entity->setter("passwordHash", ["*** sensitive parameters replaced ***"])                                     
                               1. lib/public/AppFramework/Db/Entity.php line 73                                                                                     
                                  OCP\AppFramework\Db\Entity->__call("setPasswordHash", ["*** sensitive parameters replaced ***"])                                  
                               2. .../Authentication/Token/PublicKeyTokenMapper.php line 138                                                                        
                                  OCP\AppFramework\Db\Entity::fromRow("*** sensitive parameters replaced ***")                                                      
                               3. <<closure>>                                                                                                                       
                                  OC\Authentication\Token\PublicKeyTokenMapper->OC\Authentication\Token\{closure}("*** sensitiv ... *")                             
                               4. lib/private/Authentication/Token/PublicKeyTokenMapper.php line 137                                                                
                                  array_map(                                                                                                                        
                                    ["Closure"],                                                                                                                    
                                    ["*** sensitive parameters replaced ***",[334972,"*** sensitive parameters replaced ... ]]                                      
                                  )                                                                                                                                 
                               5. .../PublicKeyTokenProvider.php line 437                                                                                           
                                  OC\Authentication\Token\PublicKeyTokenMapper->getTokenByUser("*** sensitive parameters replaced ***")                             
                               6. .../Token/Manager.php line 241                                                                                                    
                                  OC\Authentication\Token\PublicKeyTokenProvider->updatePasswords("*** sensitive parameters rep ... *")                             
                               7. .../Listeners/UserLoggedInListener.php line 61                                                                                    
                                  OC\Authentication\Token\Manager->updatePasswords("*** sensitive parameters replaced ***")                                         
                               8. .../ServiceEventListener.php line 87                                                                                              
                                  OC\Authentication\Listeners\UserLoggedInListener->handle(["OCP\\User\\Events\\PostLoginEvent"])                                   
                               9. .../event-dispatcher/EventDispatcher.php line 251                                                                                 
                                  OC\EventDispatcher\ServiceEventListener->__invoke(                                                                                
                                    ["OCP\\User\\Events\\PostLoginEvent"],                                                                                          
                                    "OCP\\User\\Events\\PostLoginEvent",                                                                                            
                                    ["Symfony\\Component\\EventDispatcher\\Even ... "]                                                                              
                                  )                                                                                                                                 
                              10. .../EventDispatcher.php line 73                                                                                                   
                                  Symfony\Component\EventDispatcher\EventDispatcher->callListeners(                                                                 
                                    [["Closure"],["Closure"],["C ... ]],                                                                                            
                                    "OCP\\User\\Events\\PostLoginEvent",                                                                                            
                                    ["OCP\\User\\Events\\PostLog ... "]                                                                                             
                                  )                                                                                                                                 
                              11. .../EventDispatcher.php line 88                                                                                                   
                                  Symfony\Component\EventDispatcher\EventDispatcher->dispatch(                                                                      
                                    ["OCP\\User\\Events\\PostLoginEvent"],                                                                                          
                                    "OCP\\User\\Events\\PostLoginEvent"                                                                                             
                                  )                                                                                                                                 
                              12. .../private/EventDispatcher/EventDispatcher.php line 100                                                                          
                                  OC\EventDispatcher\EventDispatcher->dispatch(                                                                                     
                                    "OCP\\User\\Events\\PostLoginEvent",                                                                                            
                                    ["OCP\\User\\Events\\PostLoginEvent"]                                                                                           
                                  )                                                                                                                                 
                              13. lib/private/User/Session.php line 392                                                                                             
                                  OC\EventDispatcher\EventDispatcher->dispatchTyped(["OCP\\User\\Events\\PostLoginEvent"])                                          
                              14. lib/private/Authentication/Login/CompleteLoginCommand.php line 44                                                                 
                                  OC\User\Session->completeLogin("*** sensitive parameters replaced ***")                                                           
                              15. .../Login/ALoginCommand.php line 40                                                                                               
                                  OC\Authentication\Login\CompleteLoginCommand->process(["OC\\Authentication\\Login\\LoginData"])                                   
                              16. .../LoggedInCheckCommand.php line 60                                                                                              
                                  OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully(["OC\\Authentication\\ ... "])                             
                              17. .../Login/ALoginCommand.php line 40                                                                                               
                                  OC\Authentication\Login\LoggedInCheckCommand->process(["OC\\Authentication\\Login\\LoginData"])                                   
                              18. .../EmailLoginCommand.php line 70                                                                                                 
                                  OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully(["OC\\Authentication\\ ... "])                             
                              19. .../Authentication/Login/ALoginCommand.php line 40                                                                                
                                  OC\Authentication\Login\EmailLoginCommand->process(["OC\\Authentication\\Login\\LoginData"])                                      
                              20. .../UidLoginCommand.php line 54                                                                                                   
                                  OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully(["OC\\Authentication\\ ... "])                             
                              21. .../Authentication/Login/ALoginCommand.php line 40                                                                                
                                  OC\Authentication\Login\UidLoginCommand->process(["OC\\Authentication\\Login\\LoginData"])                                        
                              22. .../UserDisabledCheckCommand.php line 58                                                                                          
                                  OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully(["OC\\Authentication\\ ... "])                             
                              23. .../Login/ALoginCommand.php line 40                                                                                               
                                  OC\Authentication\Login\UserDisabledCheckCommand->process(["OC\\Authentication\\Login\\LoginData"])                               
                              24. .../PreLoginHookCommand.php line 53                                                                                               
                                  OC\Authentication\Login\ALoginCommand->processNextOrFinishSuccessfully(["OC\\Authentication\\ ... "])                             
                              25. .../Authentication/Login/Chain.php line 108                                                                                       
                                  OC\Authentication\Login\PreLoginHookCommand->process(["OC\\Authentication\\Login\\LoginData"])                                    
                              26. core/Controller/LoginController.php line 330                                                                                      
                                  OC\Authentication\Login\Chain->process(["OC\\Authentication\\Login\\LoginData"])                                                  
                              27. .../private/AppFramework/Http/Dispatcher.php line 225                                                                             
                                  OC\Core\Controller\LoginController->tryLogin("*** sensitive parameters replaced ***")                                             
                              28. .../AppFramework/Http/Dispatcher.php line 133                                                                                     
                                  OC\AppFramework\Http\Dispatcher->executeController(                                                                               
                                    ["OC\\Core\\Controller\\LoginController"],                                                                                      
                                    "tryLogin"                                                                                                                      
                                  )                                                                                                                                 
                              29. lib/private/AppFramework/App.php line 172                                                                                         
                                  OC\AppFramework\Http\Dispatcher->dispatch(["OC\\Core\\Controller\\LoginController"], "tryLogin")                                  
                              30. lib/private/Route/Router.php line 298                                                                                             
                                  OC\AppFramework\App::main(                                                                                                        
                                    "OC\\Core\\Controller\\LoginController",                                                                                        
                                    "tryLogin",                                                                                                                     
                                    ["OC\\AppFramework\\DependencyInjection\\DIContainer"],                                                                         
                                    ["core.login.tryLogin"]                                                                                                         
                                  )                                                                                                                                 
                              31. lib/base.php line 1048                                                                                                            
                                  OC\Route\Router->match("\/login")                                                                                                 
                              32. index.php line 36                                                                                                                 
                                  OC::handleRequest(                                                                                                                
                                                                                                                                                                    
                                  )                                                                                                                                 

  Debug    no app in context  OC\Authentication\Exceptions\InvalidTokenException: Token does not exist: token does not exist at           2023-05-04T06:15:01+00:00 
                              .../Authentication/Token/PublicKeyTokenProvider.php line 128                                                                          
                                                                                                                                                                    
                               0. .../Token/Manager.php line 133                                                                                                    
                                  OC\Authentication\Token\PublicKeyTokenProvider->getToken("*** sensitive parameters replaced ***")                                 
                               1. lib/private/User/Session.php line 537                                                                                             
                                  OC\Authentication\Token\Manager->getToken("*** sensitive parameters replaced ***")                                                
                               2. lib/private/User/Session.php line 438                                                                                             
                                  OC\User\Session->isTokenPassword("*** sensitive parameters replaced ***")                                                         
                               3. apps/dav/lib/Connector/Sabre/Auth.php line 113                                                                                    
                                  OC\User\Session->logClientIn("*** sensitive parameters replaced ***")                                                             
                               4. .../lib/DAV/Auth/Backend/AbstractBasic.php line 103                                                                               
                                  OCA\DAV\Connector\Sabre\Auth->validateUserPass("*** sensitive parameters replaced ***")                                           
                               5. apps/dav/lib/Connector/Sabre/Auth.php line 229                                                                                    
                                  Sabre\DAV\Auth\Backend\AbstractBasic->check(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])                                  
                               6. apps/dav/lib/Connector/Sabre/Auth.php line 136                                                                                    
                                  OCA\DAV\Connector\Sabre\Auth->auth(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])                                           
                               7. 3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php line 180                                                                               
                                  OCA\DAV\Connector\Sabre\Auth->check(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])                                          
                               8. 3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php line 135                                                                               
                                  Sabre\DAV\Auth\Plugin->check(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])                                                 
                               9. 3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89                                                                         
                                  Sabre\DAV\Auth\Plugin->beforeMethod(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])                                          
                              10. 3rdparty/sabre/dav/lib/DAV/Server.php line 456                                                                                    
                                  Sabre\DAV\Server->emit("beforeMethod:GET", [["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]])                                  
                              11. 3rdparty/sabre/dav/lib/DAV/Server.php line 253                                                                                    
                                  Sabre\DAV\Server->invokeMethod(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])                                               
                              12. 3rdparty/sabre/dav/lib/DAV/Server.php line 321                                                                                    
                                  Sabre\DAV\Server->start(                                                                                                          
                                                                                                                                                                    
                                  )                                                                                                                                 
                              13. apps/dav/appinfo/v1/webdav.php line 85                                                                                            
                                  Sabre\DAV\Server->exec(                                                                                                           
                                                                                                                                                                    
                                  )                                                                                                                                 
                              14. remote.php line 172                                                                                                               
                                  require_once("\/data\/web\/1\/000\/100\/558\/400440\/htdocs\/jandechentde\/nextcloud\/apps\/d ... p")                             
                                                                                                                                                                    
                              Caused by OCP\AppFramework\Db\DoesNotExistException: token does not exist at                                                          
                              .../Authentication/Token/PublicKeyTokenMapper.php line 89                                                                             
                                                                                                                                                                    
                               0. .../Token/PublicKeyTokenProvider.php line 119                                                                                     
                                  OC\Authentication\Token\PublicKeyTokenMapper->getToken("*** sensitive parameters replaced ***")                                   
                               1. .../Token/Manager.php line 133                                                                                                    
                                  OC\Authentication\Token\PublicKeyTokenProvider->getToken("*** sensitive parameters replaced ***")                                 
                               2. lib/private/User/Session.php line 537                                                                                             
                                  OC\Authentication\Token\Manager->getToken("*** sensitive parameters replaced ***")                                                
                               3. lib/private/User/Session.php line 438                                                                                             
                                  OC\User\Session->isTokenPassword("*** sensitive parameters replaced ***")                                                         
                               4. apps/dav/lib/Connector/Sabre/Auth.php line 113                                                                                    
                                  OC\User\Session->logClientIn("*** sensitive parameters replaced ***")                                                             
                               5. .../lib/DAV/Auth/Backend/AbstractBasic.php line 103                                                                               
                                  OCA\DAV\Connector\Sabre\Auth->validateUserPass("*** sensitive parameters replaced ***")                                           
                               6. apps/dav/lib/Connector/Sabre/Auth.php line 229                                                                                    
                                  Sabre\DAV\Auth\Backend\AbstractBasic->check(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])                                  
                               7. apps/dav/lib/Connector/Sabre/Auth.php line 136                                                                                    
                                  OCA\DAV\Connector\Sabre\Auth->auth(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])                                           
                               8. 3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php line 180                                                                               
                                  OCA\DAV\Connector\Sabre\Auth->check(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])                                          
                               9. 3rdparty/sabre/dav/lib/DAV/Auth/Plugin.php line 135                                                                               
                                  Sabre\DAV\Auth\Plugin->check(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])                                                 
                              10. 3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89                                                                         
                                  Sabre\DAV\Auth\Plugin->beforeMethod(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])                                          
                              11. 3rdparty/sabre/dav/lib/DAV/Server.php line 456                                                                                    
                                  Sabre\DAV\Server->emit("beforeMethod:GET", [["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]])                                  
                              12. 3rdparty/sabre/dav/lib/DAV/Server.php line 253                                                                                    
                                  Sabre\DAV\Server->invokeMethod(["Sabre\\HTTP\\Request"], ["Sabre\\HTTP\\Response"])                                               
                              13. 3rdparty/sabre/dav/lib/DAV/Server.php line 321                                                                                    
                                  Sabre\DAV\Server->start(                                                                                                          
                                                                                                                                                                    
                                  )                                                                                                                                 
                              14. apps/dav/appinfo/v1/webdav.php line 85                                                                                            
                                  Sabre\DAV\Server->exec(                                                                                                           
                                                                                                                                                                    
                                  )                                                                                                                                 
                              15. remote.php line 172                                                                                                               
                                  require_once("\/data\/web\/1\/000\/100\/558\/400440\/htdocs\/jandechentde\/nextcloud\/apps\/d ... p")                             

  Debug    encryption         /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class         2023-05-04T06:15:01+00:00 
                              instead.                                                                                                                              

  Debug    encryption         /appinfo/app.php is deprecated, use \OCP\AppFramework\Bootstrap\IBootstrap on the application class         2023-05-04T06:15:02+00:00 
                              instead.                                                                                                                              


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

<?php
$CONFIG = array (
  'default_phone_region' => 'DE',
  'instanceid' => 'XX_HIDEME_XX',
  'passwordsalt' => 'XX_HIDEME_XX',
  'secret' => 'XX_HIDEME_XX',
  'trusted_domains' => 
  array (
    0 => 'cloud.XX_HIDEME_XX.de',
  ),
  'datadirectory' => '/web/1/000/100/558/400440/htdocs/XX_HIDEME_XX/nextcloud/data',
  'overwrite.cli.url' => 'https://cloud.XX_HIDEME_XX.de',
  'dbtype' => 'mysql',
  'version' => '25.0.6.1',
  'dbname' => 'XX_HIDEME_XX',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'XX_HIDEME_XX',
  'dbpassword' => 'XX_HIDEME_XX',
  'installed' => true,
  'theme' => '',
  'loglevel' => 0,
  'maintenance' => false,
  'mail_from_address' => 'XX_HIDEME_XX',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'XX_HIDEME_XX.de',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'smtp.XX_HIDEME_XX.de',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'kontakt@XX_HIDEME_XX.de',
  'mail_smtppassword' => 'XX_HIDEME_XX',
  'updater.release.channel' => 'stable',
  'app_install_overwrite' => 
  array (
    0 => 'joplin',
    1 => 'files_markdown',
  ),
  'encryption.legacy_format_support' => false,
  'encryption.key_storage_migrated' => false,
  'mysql.utf8mb4' => true,
  'mail_smtpsecure' => 'tls',
  'updater.secret' => 'XX_HIDEME_XX',
  'data-fingerprint' => 'XX_HIDEME_XX',
);