NC 30 Internal Server Error - Unable to verify user

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 29.0.5): 30.0.0
Operating system and version (eg, Ubuntu 24.04): Ubuntu 24.04
Apache or nginx version (eg, Apache 2.4.25): 2.4.62
PHP version (eg, 8.3): 8.3.13

The issue you are facing:

Eventually, when I’m logged in and navigating inside the web interface an error message appears saying “Internal Server Error” and a code to search at the logs.
The web interface freezes and, if I manually change the app at the final of the URL, like https://cloud.facb69.com.br/index.php/apps/APP/, I can keep on but not go back to the app in use during the freezing.
It usually happens with the “dashboard” app but not as a rule.
The logs say that there’s an exception thrown because the website is Unable to verify the user.
Restarting both Apache and PHP-FPM does not help nor changing browsers; I need to logout and login back again.
Looks like a session error but I could not find a solution here or at the internet.
This has been going on for quite sometime, at least since NC 26.
Hope somebody can help me out here.
Tks.

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

Steps to replicate it:

  1. Open the web interface
  2. Browse the interface
  3. When you click on some app, ex. dashboard, it freezes

The output of your Nextcloud log in Admin > Logging:



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

<?php
$CONFIG = array (
  'instanceid' => 'XXXXXXXXXXXXX',
  'passwordsalt' => 'XXXXXXXXXXXXX',
  'secret' => 'XXXXXXXXXXXXX',
  'trusted_domains' => 
  array (
    0 => 'cloud.facb69.com.br',
  ),
  'datadirectory' => '/somewhere/nextcloud-data',
  'dbtype' => 'mysql',
  'version' => '30.0.0.14',
  'overwrite.cli.url' => 'https://cloud.facb69.com.br',
  'dbname' => 'XXXXXXXXXXXXX',
  'dbhost' => 'XXXXXXXXXXXXX',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'XXXXXXXXXXXXX',
  'dbpassword' => 'XXXXXXXXXXXXX',
  'installed' => true,
  'mail_from_address' => 'XXXXXXXXXXXXX',
  'mail_smtpmode' => 'XXXXXXXXXXXXX',
  'mail_sendmailmode' => 'XXXXXXXXXXXXX',
  'mail_domain' => 'XXXXXXXXXXXXX',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'XXXXXXXXXXXXX',
  'mail_smtpport' => 'XXX',
  'mail_smtpname' => 'XXXXXXXXXXXXX',
  'mail_smtppassword' => 'XXXXXXXXXXXXX',
  'mail_smtpsecure' => 'XXX',
  'log_type' => 'file',
  'logfile' => '/somewhere/nextcloud-data/nextcloud.log',
  'logfilemode' => 416,
  'loglevel' => 3,
  'default_phone_region' => 'ISO 3166-2:BR',
  'maintenance' => false,
  'maintenance_window_start' => 1,
  'theme' => '',
  'preview_max_memory' => 4096,
  'preview_max_filesize_image' => 256,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\Image',
    1 => 'OC\\Preview\\HEIC',
    2 => 'OC\\Preview\\TIFF',
    3 => 'OC\\Preview\\Movie',
    4 => 'OC\\Preview\\MKV',
    5 => 'OC\\Preview\\MP4',
    6 => 'OC\\Preview\\AVI',
  ),
  'app_install_overwrite' => 
  array (
    0 => 'extract',
    1 => 'occweb',
    2 => 'rainloop',
    3 => 'workflow_media_converter',
    4 => 'mailnotifier',
    5 => 'documentserver_community',
    6 => 'quicknotes',
    7 => 'epubreader',
    8 => 'tasks',
    9 => 'talk_matterbridge',
    10 => 'jitsi',
    11 => 'mail_roundcube',
    12 => 'breezedark',
    13 => 'passman',
  ),
  'memories.exiftool' => '/webroot/nextcloud/apps/memories/bin-ext/exiftool-amd64-glibc',
  'memories.vod.path' => '/webroot/nextcloud/apps/memories/bin-ext/go-vod-amd64',
  'memories.vod.ffmpeg' => '/usr/bin/ffmpeg',
  'memories.vod.ffprobe' => '/usr/bin/ffprobe',
  'twofactor_enforced' => 'false',
  'twofactor_enforced_groups' => 
  array (
  ),
  'twofactor_enforced_excluded_groups' => 
  array (
    0 => 'admin',
  ),
  'filelocking.enabled' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '127.0.0.1',
    'port' => '6379',
  ),
  'defaultapp' => 'dashboard',
  'enforce_theme' => '',
);

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

{"reqId":"ochSOC6rZEWsREy9Kidx","level":3,"time":"2024-11-04T15:01:35+00:00","remoteAddr":"200.178.186.71","user":"UserName","app":"index","method":"GET","url":"/index.php/apps/dashboard/","message":"Unable to verify user UserName","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0","version":"30.0.0.14","exception":{"Exception":"Exception","Message":"Unable to verify user UserName","Code":0,"Trace":[{"file":"/var/www/html/nextcloud/apps/passwords/lib/Services/EnvironmentService.php","line":361,"function":"loadUserInformation","class":"OCA\\Passwords\\Services\\EnvironmentService","type":"->"},{"file":"/var/www/html/nextcloud/apps/passwords/lib/Services/EnvironmentService.php","line":185,"function":"determineAppMode","class":"OCA\\Passwords\\Services\\EnvironmentService","type":"->"},{"function":"__construct","class":"OCA\\Passwords\\Services\\EnvironmentService","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":61,"function":"newInstanceArgs","class":"ReflectionClass","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":448,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":420,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":74,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":61,"function":"array_map"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":448,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":420,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":74,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":61,"function":"array_map"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":448,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/ServerContainer.php","line":137,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":42,"function":"query","class":"OC\\ServerContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Dashboard/Manager.php","line":65,"function":"get","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Dashboard/Manager.php","line":128,"function":"loadLazyPanels","class":"OC\\Dashboard\\Manager","type":"->"},{"file":"/var/www/html/nextcloud/apps/dashboard/lib/Controller/DashboardController.php","line":63,"function":"getWidgets","class":"OC\\Dashboard\\Manager","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"index","class":"OCA\\Dashboard\\Controller\\DashboardController","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/html/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/html/nextcloud/lib/base.php","line":1001,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/html/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/nextcloud/apps/passwords/lib/Services/EnvironmentService.php","Line":398,"message":"Unable to verify user UserName","exception":{},"CustomMessage":"Unable to verify user UserName"}}
1 Like

I’m not sure if it’s the cause of the other behavior you’re seeing, but the log entry you posted is coming from an app you have installed that is called Passwords. It’s not coming from Nextcloud Server itself.

Hello,
I have essentially the same Problem, “passwords” is also activated. But i got the error if i try to access the Administration Settings or the passwords app.

In the Logs the error is the same as facb69’s.

{"reqId":"iHujbVWSh2V0xKueeVrY","level":2,"time":"2024-11-07T10:58:29+00:00","remoteAddr":"10.0.2.12","user":"UserName","app":"passwords","method":"GET","url":"/index.php/apps/passwords/","message":"Login attempt with invalid session for UserName","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0","version":"30.0.2.2","data":{"app":"passwords"}}
{"reqId":"iHujbVWSh2V0xKueeVrY","level":3,"time":"2024-11-07T10:58:29+00:00","remoteAddr":"10.0.2.12","user":"UserName","app":"index","method":"GET","url":"/index.php/apps/passwords/","message":"Unable to verify user UserName","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:132.0) Gecko/20100101 Firefox/132.0","version":"30.0.2.2","exception":{"Exception":"Exception","Message":"Unable to verify user UserName","Code":0,"Trace":[{"file":"/var/www/nextcloud/apps/passwords/lib/Services/EnvironmentService.php","line":361,"function":"loadUserInformation","class":"OCA\\Passwords\\Services\\EnvironmentService","type":"->"},{"file":"/var/www/nextcloud/apps/passwords/lib/Services/EnvironmentService.php","line":185,"function":"determineAppMode","class":"OCA\\Passwords\\Services\\EnvironmentService","type":"->"},{"function":"__construct","class":"OCA\\Passwords\\Services\\EnvironmentService","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":61,"function":"newInstanceArgs","class":"ReflectionClass","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":448,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":420,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":74,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":61,"function":"array_map"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":448,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":420,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":74,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":61,"function":"array_map"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":448,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":420,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":74,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":61,"function":"array_map"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":448,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":420,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":74,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":61,"function":"array_map"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":106,"function":"buildClass","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Utility/SimpleContainer.php","line":124,"function":"resolve","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":448,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/DependencyInjection/DIContainer.php","line":420,"function":"queryNoFallback","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":140,"function":"query","class":"OC\\AppFramework\\DependencyInjection\\DIContainer","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1001,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":24,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/apps/passwords/lib/Services/EnvironmentService.php","Line":398,"message":"Unable to verify user UserName","exception":{},"CustomMessage":"Unable to verify user UserName"}}

I would try to deactivate passwords, but i dont know how it would like it and if the content of the app would get deleted and trashed after a while.

1 Like

Yes, indeed.
The same problem happens with 29.0.9. A quick fix is to disable the Passwords app (occ app:disable passowrds).
The Passwords app is supposedly already fixed. I hope the fix is good and will be released soon.

…also seeing this after update from 30.0.1 to 30.0.2.

Found this - probalby related - bug report on password’s github: [BUG]: Login fails with internal server error - Nextcloud 30.0.2 - Passwords 2024.9.20 · Issue #686 · marius-wieschollek/passwords · GitHub

With 30.0.1 I had problems with sharing passwords - see [BUG]: Cant share password on NC 9 (30.0.1) · Issue #677 · marius-wieschollek/passwords · GitHub

Disabling passwords app helps. Is it safe to have the passwords app disabled?

passwords is a third part app, I think no security issue on have it disabled. I restored my server backup to downgrade nextcloud as I cannot stay with passwords disabled. I see the issue is present also on development versions of passwords so we need wait a fix from the passwords app developer.

If you can stay for a while without the passwords app you can keep it disabled :slight_smile:

1 Like

Seems a solution is available here: [BUG]: Unable to verify user on 30.0.2 RC1 · Issue #683 · marius-wieschollek/passwords · GitHub

…also found the quick fix and applied it - I can confirm: quick fix works :slight_smile:

I had this problem today as well after upgrading. I rolled back to VM snapshot/DB backup until I could figure it out.

The fix also worked for our instance. We encountered the this problem after the upgrade to NC 30.0.2

1 Like

Fix brings up “invalid hash” error:

Results

  • passwords
    • INVALID_HASH
      • lib/Services/EnvironmentService.php

Raw output

Array
(
[passwords] => Array
(
[INVALID_HASH] => Array
(
[lib/Services/EnvironmentService.php] => Array
(
[expected] => 2baf9a5595dede3c0cbe48d5f44e6b5519dcd6a6166e248e60f3a3e32e63d97ce0f583e2ba70e76178d58d5a60e01a0b86bf912ebdfcb7effeecbf6bcfe75bbd
[current] => 6813a9478bd8656d11344ae9b7ea311bf2b92c6f4ec09df67452307ad03738a101bba7e8c3d57b8ea0f40a08c750e3bba6c9bd353e2f6a802e018cef6728aeb1
)

            )

    )

)

Thank you guys for figuring out the solution.

Sorry, I didn’t understand it was the Passwords app thas was causing the error.
I’ve just updated it - let’s see if it will solve the issue.
So far, I thank you all for the attention.