Login doesn't work with HTTP, but works with HTTPS on nginx

Nextcloud version (eg, 29.0.5): 30.0.0
Operating system and version (eg, Ubuntu 24.04): Debian GNU/Linux 12
Apache or nginx version (eg, Apache 2.4.25): nginx 1.22.1
PHP version (eg, 8.3): 8.3

The issue you are facing:

I have been managing a Nextcloud instance for multiple years, and now I’m helping somebody else setup a local instance. Despite setting it up “exactly” like my working instance, after installation the login never works.

Inputting the correct login and password doesn’t result with the usual “wrong password” error, but rather in the password box being red, and no error being displayed:

I tried replicating the setup on the instance I manage, and figured out that this exact result happens when TLS is disabled in nginx. Here you have my instance over HTTP and over HTTPS, to demonstrate the issue. Notice how over HTTPS, inputting invalid credentials shows the expected error, but it doesn’t over HTTP.

Seems like the config is somehow broken with plain HTTP access, but I couldn’t find what exactly causes this. Logs don’t seem to point to anything useful.

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

Steps to replicate it:

  1. Set up Nextcloud as per the installation instructions, using nginx with the recommended config and proper TLS setup.
  2. Try to log in.
  3. Disable TLS by modifying the nginx config according to this diff:
    13a14,25
    > #server {
    > #    listen 80;
    > #    listen [::]:80;
    > #    server_name cloud.example.com;
    > #
    > #    # Prevent nginx HTTP Server Detection
    > #    server_tokens off;
    > #
    > #    # Enforce HTTPS
    > #    return 301 https://$server_name$request_uri;
    > #}
    > 
    17,28d28
    <     server_name cloud.example.com;
    < 
    <     # Prevent nginx HTTP Server Detection
    <     server_tokens off;
    < 
    <     # Enforce HTTPS
    <     return 301 https://$server_name$request_uri;
    < }
    < 
    < server {
    <     listen 443 ssl http2;
    <     listen [::]:443 ssl http2;
    40,41c40,41
    <     ssl_certificate     /etc/ssl/nginx/cloud.example.com.crt;
    <     ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;
    ---
    >     #ssl_certificate     /etc/ssl/nginx/cloud.example.com.crt;
    >     #ssl_certificate_key /etc/ssl/nginx/cloud.example.com.key;
    
  4. Try to log in again.

The output of your Nextcloud log in Admin > Logging: No new logs appear after login attempts.

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

<?php
$CONFIG = array (
  'instanceid' => 'ockkff7g2hcz',
  'passwordsalt' => '[SALT]',
  'secret' => '[SECRET]',
  'trusted_domains' => 
  array (
    0 => 'cloud.stary.pc.pl',
  ),
  'datadirectory' => '/mnt/data/nextcloud',
  'dbtype' => 'mysql',
  'version' => '30.0.0.14',
  'overwrite.cli.url' => 'https://cloud.stary.pc.pl',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '[PASSWORD]',
  'installed' => true,
  'app_install_overwrite' => 
  array (
    0 => 'files_clipboard',
    1 => 'spreed',
    2 => 'circles',
    3 => 'files_downloadactivity',
    4 => 'files_accesscontrol',
    5 => 'ownpad',
    6 => 'flowupload',
    7 => 'bruteforcesettings',
    8 => 'breezedark',
    9 => 'forms',
  ),
  'maintenance' => false,
  'theme' => '',
  'log_type' => 'file',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_smtpauthtype' => 'PLAIN',
  'encryption.legacy_format_support' => false,
  'encryption.key_storage_migrated' => false,
  'default_phone_region' => 'PL',
  'mail_from_address' => 'cloud-noreply',
  'mail_domain' => 'stary.pc.pl',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'stary.pc.pl',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'nextcloud',
  'mail_smtppassword' => '[PASSWORD]',
  'maintenance_window_start' => 3,
  'trashbin_retention_obligation' => '30, 30',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0.0,
  ),
  'loglevel' => 2,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\BMP',
    1 => 'OC\\Preview\\GIF',
    2 => 'OC\\Preview\\JPEG',
    3 => 'OC\\Preview\\Krita',
    4 => 'OC\\Preview\\MarkDown',
    5 => 'OC\\Preview\\MP3',
    6 => 'OC\\Preview\\OpenDocument',
    7 => 'OC\\Preview\\PNG',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\XBitmap',
    10 => 'OC\\Preview\\HEIC',
    11 => 'OC\\Preview\\Movie',
  ),
);

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

77.254.112.248 - - [27/Sep/2024:20:46:17 +0200] "POST /login HTTP/1.1" 303 0 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0"
77.254.112.248 - - [27/Sep/2024:20:46:17 +0200] "GET /login?redirect_url=/apps/dashboard/&direct=1&user=grzesiek11 HTTP/1.1" 200 7471 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0"

After logging in.

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":"VKHlHPbQ0qKTsK20SJuQ","level":3,"time":"2024-09-27T18:34:20+00:00","remoteAddr":"77.254.112.248","user":"Grzesiek11","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0","version":"30.0.0.14","exception":{"Exception":"RuntimeException","Message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","Code":0,"Trace":[{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":205,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":105,"function":"setAppHintDetails","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Notification/Manager.php","line":337,"function":"prepare","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/notifications/lib/Controller/EndpointController.php","line":103,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listNotifications","class":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v2.php","line":7,"args":["/srv/www/nextcloud/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/srv/www/nextcloud/nextcloud/lib/private/URLGenerator.php","Line":242,"message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","exception":{},"CustomMessage":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud"}}
{"reqId":"5YsS1rZNjGdXnpnT0vsE","level":3,"time":"2024-09-27T18:39:21+00:00","remoteAddr":"77.254.112.248","user":"Grzesiek11","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0","version":"30.0.0.14","exception":{"Exception":"RuntimeException","Message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","Code":0,"Trace":[{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":205,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":105,"function":"setAppHintDetails","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Notification/Manager.php","line":337,"function":"prepare","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/notifications/lib/Controller/EndpointController.php","line":103,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listNotifications","class":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v2.php","line":7,"args":["/srv/www/nextcloud/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/srv/www/nextcloud/nextcloud/lib/private/URLGenerator.php","Line":242,"message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","exception":{},"CustomMessage":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud"}}
{"reqId":"sR5CSeg89QdRu3n8drET","level":3,"time":"2024-09-27T18:41:01+00:00","remoteAddr":"77.254.112.248","user":"Grzesiek11","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0","version":"30.0.0.14","exception":{"Exception":"RuntimeException","Message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","Code":0,"Trace":[{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":205,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":105,"function":"setAppHintDetails","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Notification/Manager.php","line":337,"function":"prepare","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/notifications/lib/Controller/EndpointController.php","line":103,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listNotifications","class":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v2.php","line":7,"args":["/srv/www/nextcloud/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/srv/www/nextcloud/nextcloud/lib/private/URLGenerator.php","Line":242,"message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","exception":{},"CustomMessage":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud"}}
{"reqId":"utFu96PpSaaa1kvEFwdE","level":3,"time":"2024-09-27T18:41:21+00:00","remoteAddr":"77.254.112.248","user":"Grzesiek11","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0","version":"30.0.0.14","exception":{"Exception":"RuntimeException","Message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","Code":0,"Trace":[{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":205,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":105,"function":"setAppHintDetails","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Notification/Manager.php","line":337,"function":"prepare","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/notifications/lib/Controller/EndpointController.php","line":103,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listNotifications","class":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v2.php","line":7,"args":["/srv/www/nextcloud/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/srv/www/nextcloud/nextcloud/lib/private/URLGenerator.php","Line":242,"message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","exception":{},"CustomMessage":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud"}}
{"reqId":"YdSgYKrCghMXaQ4aLX6X","level":3,"time":"2024-09-27T18:44:41+00:00","remoteAddr":"77.254.112.248","user":"Grzesiek11","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0","version":"30.0.0.14","exception":{"Exception":"RuntimeException","Message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","Code":0,"Trace":[{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":205,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":105,"function":"setAppHintDetails","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Notification/Manager.php","line":337,"function":"prepare","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/notifications/lib/Controller/EndpointController.php","line":103,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listNotifications","class":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v2.php","line":7,"args":["/srv/www/nextcloud/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/srv/www/nextcloud/nextcloud/lib/private/URLGenerator.php","Line":242,"message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","exception":{},"CustomMessage":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud"}}
{"reqId":"zUIbGhufPUudMgONwkYC","level":3,"time":"2024-09-27T18:46:22+00:00","remoteAddr":"77.254.112.248","user":"Grzesiek11","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0","version":"30.0.0.14","exception":{"Exception":"RuntimeException","Message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","Code":0,"Trace":[{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":205,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":105,"function":"setAppHintDetails","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Notification/Manager.php","line":337,"function":"prepare","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/notifications/lib/Controller/EndpointController.php","line":103,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listNotifications","class":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v2.php","line":7,"args":["/srv/www/nextcloud/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/srv/www/nextcloud/nextcloud/lib/private/URLGenerator.php","Line":242,"message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","exception":{},"CustomMessage":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud"}}
{"reqId":"tD1EwpZbRyhT7YaQy0kP","level":3,"time":"2024-09-27T18:49:41+00:00","remoteAddr":"77.254.112.248","user":"Grzesiek11","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0","version":"30.0.0.14","exception":{"Exception":"RuntimeException","Message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","Code":0,"Trace":[{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":205,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":105,"function":"setAppHintDetails","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Notification/Manager.php","line":337,"function":"prepare","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/notifications/lib/Controller/EndpointController.php","line":103,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listNotifications","class":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v2.php","line":7,"args":["/srv/www/nextcloud/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/srv/www/nextcloud/nextcloud/lib/private/URLGenerator.php","Line":242,"message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","exception":{},"CustomMessage":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud"}}
{"reqId":"mmq3vA7esd9R2cL9ILyK","level":3,"time":"2024-09-27T18:51:22+00:00","remoteAddr":"77.254.112.248","user":"Grzesiek11","app":"no app in context","method":"GET","url":"/ocs/v2.php/apps/notifications/api/v2/notifications","message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:130.0) Gecko/20100101 Firefox/130.0","version":"30.0.0.14","exception":{"Exception":"RuntimeException","Message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","Code":0,"Trace":[{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":205,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/firstrunwizard/lib/Notification/Notifier.php","line":105,"function":"setAppHintDetails","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Notification/Manager.php","line":337,"function":"prepare","class":"OCA\\FirstRunWizard\\Notification\\Notifier","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/apps/notifications/lib/Controller/EndpointController.php","line":103,"function":"prepare","class":"OC\\Notification\\Manager","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"listNotifications","class":"OCA\\Notifications\\Controller\\EndpointController","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v1.php","line":43,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/srv/www/nextcloud/nextcloud/ocs/v2.php","line":7,"args":["/srv/www/nextcloud/nextcloud/ocs/v1.php"],"function":"require_once"}],"File":"/srv/www/nextcloud/nextcloud/lib/private/URLGenerator.php","Line":242,"message":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud","exception":{},"CustomMessage":"image not found: image:apps/whiteboard.svg webroot: serverroot:/srv/www/nextcloud/nextcloud"}}

Nothing relevant.

Check your browser inspector while reproducing the problem:

  • Once with the Network tab open
  • Then check Console tab

I checked requests before, but forgot to check the console. Turns out I found the issue.

Cookie “oc_sessionPassphrase” has been rejected because a non-HTTPS cookie can’t be set as “secure”. login
Cookie “__Host-nc_sameSiteCookielax” has been rejected for invalid prefix. login
Cookie “__Host-nc_sameSiteCookiestrict” has been rejected for invalid prefix. login
Cookie “ockkff7g2hcz” has been rejected because a non-HTTPS cookie can’t be set as “secure”. login

Cookies are being set as secure, which will not work without an HTTPS connection.

The culprit is this line:

fastcgi_param HTTPS on;

Removing that fixes the issue. Seems weird now that I missed it, it’s not cryptic.

2 Likes

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.