WEB interface not working after server migration

Nextcloud version (eg, 12.0.2): 14.0.4
Operating system and version (eg, Ubuntu 17.04): Debian 9.6
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.15.6
PHP version (eg, 7.1): 7.3 running in fpm mode with dedicated workers and a dedicated nextcloud user.

The issue you are facing:

After migrating to a new dedicated server, I’ve migrated the database to postgresql using the db:convert-type procedure.

But since then, I’m unable to access the web interface, but the apps are all working correctly.

I’ve already migrated this instance from one server to another without facing an issue.

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

Steps to replicate it:

The output of your Nextcloud log in Admin > Logging:

[code]
{"reqId":"x5t8XOk1cmF1f4GFClxy","level":0,"time":"2018-12-05T08:47:24+00:00","remoteAddr":"77.136.197.34","user":"--","app":"core","metho
d":"GET","url":"\/index.php\/apps\/files\/","message":{"Exception":"OC\\AppFramework\\Middleware\\Security\\Exceptions\\NotLoggedInExcept
ion","Message":"Current user is not logged in","Code":401,"Trace":[{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Middleware
\/MiddlewareDispatcher.php","line":95,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\Security\\SecurityMiddleware",
"type":"->","args":[{"__class__":"OCA\\Files\\Controller\\ViewController"},"index"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFra
mework\/Http\/Dispatcher.php","line":97,"function":"beforeController","class":"OC\\AppFramework\\Middleware\\MiddlewareDispatcher","type"
:"->","args":[{"__class__":"OCA\\Files\\Controller\\ViewController"},"index"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework
\/App.php","line":118,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files\\Co
ntroller\\ViewController"},"index"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":
47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["ViewController","index",{"__class__":"OC\\AppFramework\\Depende
ncyInjection\\DIContainer"},{"_route":"files.view.index"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler
","type":"->","args":[{"_route":"files.view.index"}]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"functi
on":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"files.view.index"}]},{"file":"\/var
\/www\/nextcloud\/lib\/base.php","line":987,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/apps\/files\/"]},{"file
":"\/var\/www\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/var\/www\/nextcl
oud\/lib\/private\/AppFramework\/Middleware\/Security\/SecurityMiddleware.php","Line":143,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0
 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/537.36","version":"14.0.4.2"}
{"reqId":"SHe0pk4ABRw3FVyaLgGO","level":0,"time":"2018-12-05T08:47:24+00:00","remoteAddr":"77.136.197.34","user":"--","app":"no app in co
ntext","method":"GET","url":"\/index.php\/login?redirect_url=\/index.php\/apps\/files\/","message":"No cache entry found for \/appdata_oc
369cf741d1\/theming\/images\/background (storage: local::\/home\/cloud\/data\/, internalPath: appdata_oc369cf741d1\/theming\/images\/back
ground)","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/70.0.3538.110 Safari\/53
7.36","version":"14.0.4.2"}
[/code]

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

[code]
<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,
    'dbindex' => 0,
    'password' => 'verysecretpassword',
    'timeout' => 1.5,
  ),
  'instanceid' => 'myinstanceid',
  'passwordsalt' => 'secretstring',
  'secret' => 'verycomplicatedandsecretstring',
  'trusted_domains' =>
  array (
    0 => 'cloud.oupsman.fr',
  ),
  'datadirectory' => '/home/cloud/data',
  'overwrite.cli.url' => 'https://cloud.oupsman.fr',
  'dbtype' => 'pgsql',
  'version' => '14.0.4.2',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'nextcloud',
  'dbpassword' => 'edited',
  'installed' => true,
  'forcessl' => true,
  'loglevel' => 0,
  'theme' => '',
  'maintenance' => false,
  'updatechecker' => false,
  'maintenance:false' => '',
  'maintenance=false' => '',
  'trashbin_retention_obligation' => 'auto',
  'htaccess.RewriteBase' => '/',
  'updater.secret' => 'edited',
);

[/code]

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

PASTE HERE
  • Debian 9
  • Apache 2.4.25
  • PHP 7.3 FPM
  • MariaDB 10.3

Same issue after migration from 15.0.2 to 15.0.3 RC1: I manage to login and proceed to 2FA auth but after that, only left frame of files app loads and menu bar without apps links.
After reading other topics on this forum, it seems script /core/js/js.js is not called…

Chrome DevTools errors:

Uncaught ReferenceError: OCA is not defined
    at search.js?v=606ffff9-8:146
    at search.js?v=606ffff9-8:147

Uncaught ReferenceError: OC is not defined
    at fr.js?v=606ffff9-8:1

Uncaught ReferenceError: OC is not defined
    at fr.js?v=606ffff9-8:1
(...)

Last log lines:

{"reqId":"jWiDZcNxPzf2QuFyyr7H","level":0,"time":"04\/02\/2019 22:37:31","remoteAddr":"x.x.x.x","user":"user","app":"no app in context","method":"GET","url":"\/apps\/files\/","message":"No cache entry found for \/appdata_ocxxx\/theming\/images\/background (storage: local::\/var\/www\/nextcloud\/data\/, internalPath: appdata_ocxxx\/theming\/images\/background)","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/71.0.3578.98 Safari\/537.36","version":"15.0.3.0"}
{"reqId":"MRvpD3WXskNkDI0TBCNA","level":0,"time":"04\/02\/2019 22:37:58","remoteAddr":"x.x.x.x","user":"user","app":"no app in context","method":"GET","url":"\/apps\/files\/","message":"No cache entry found for \/appdata_ocxxx\/theming\/images\/background (storage: local::\/var\/www\/nextcloud\/data\/, internalPath: appdata_ocxxx\/theming\/images\/background)","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/71.0.3578.98 Safari\/537.36","version":"15.0.3.0"}

Solved by disabling theming app: ./occ app:disable theming

Thanks @Florentin68
after upgrading to 15.0.9 I had the same issue. Once Ive removed the theming everything went back to normal. I will investigate and try to find a solution, I really liked my theme and my icons :slight_smile: