Files/Folders not showing up - Infinite Spinner

Nextcloud version: 18.0.4.2
Operating system and version: Ubuntu Server 18.04.1
Apache version: 2.4.29
PHP version: 7.2.30-1 (+ubuntu18.04.1+deb.sury.org+1)
MySQL Version: 5.7.30-0 (ubuntu0.18.04.1)

The issue you are facing:
When I log in everything seems to work fine, until the main panel (“app-content” html element) tries to load. First there’s a grey spinner showing up and then a second one under it. The first one disappears and now there’s a greyed-out file section (5 files, horizontal, at the top). The second spinner is spinning forever and I can’t click anything inside the main panel.

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

Steps to replicate it:

  1. Install Nextcloud using the zip file.
  2. Log in.
  3. Wait.

The output of your Nextcloud log in Admin > Logging:
– nothing there –

Browser Log (Console, with errors):

12:08:15.960 JQMIGRATE: Migrate is installed, version 1.4.1 main.js:58:53924
12:08:16.140 This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. main.js:23:99612
12:08:17.412 Proxying an event bus of version 1.1.2 with 0.2.1 notifications.js:16:13437
12:08:17.427 Handlebars is deprecated: please ship your own, this will be removed in Nextcloud 20 main.js:202:3324
12:08:17.502 Notifications permissions granted notifications.js:16:52257
12:08:18.046 moment is deprecated: please ship your own, this will be removed in Nextcloud 20 5 main.js:202:3324
12:08:18.541 Handlebars is deprecated: please ship your own, this will be removed in Nextcloud 20 main.js:202:3324
12:08:19.489 Handlebars is deprecated: please ship your own, this will be removed in Nextcloud 20 main.js:202:3324
12:08:19.716 Handlebars is deprecated: please ship your own, this will be removed in Nextcloud 20 main.js:202:3324
12:08:19.807 Handlebars is deprecated: please ship your own, this will be removed in Nextcloud 20 main.js:202:3324
12:08:20.239 OCA.Files.Sidebar initialized sidebar.js:33:361
12:08:20.439 Handlebars is deprecated: please ship your own, this will be removed in Nextcloud 20 main.js:202:3324
12:08:20.820 Proxying an event bus of version 1.1.2 with 0.2.1 files_sharing_tab.js:38:9160
12:08:20.849 Proxying an event bus of version 1.1.2 with 0.2.1 files_sharing_tab.js:44:10540
12:08:21.133 OCA.Sharing.ShareSearch initialized files_sharing_tab.js:53:43155
12:08:21.135 OCA.Sharing.ExternalLinkActions initialized files_sharing_tab.js:53:44358
12:08:21.747 OCA.Viewer initialized viewer.js:18:24948
12:08:22.784 New search handler registered search.js:4:77
12:08:22.895
Please do NOT wait for the DOMContentLoaded before registering your viewer handler viewer.js:18:2912
    handlers https://cloud.XXX.de/apps/viewer/js/viewer.js?v=6837a455-0:18
    run https://cloud.XXX.de/apps/viewer/js/viewer.js?v=6837a455-0:10
    ln https://cloud.XXX.de/apps/viewer/js/viewer.js?v=6837a455-0:10
    ee https://cloud.XXX.de/apps/viewer/js/viewer.js?v=6837a455-0:10
    Xt https://cloud.XXX.de/apps/viewer/js/viewer.js?v=6837a455-0:10
12:08:22.896
The following handler is already registered 
Object { id: Getter & Setter, mimes: Getter & Setter, component: Getter & Setter, group: Getter & Setter, … }
viewer.js:18:6905
    registerHandler https://cloud.XXX.de/apps/viewer/js/viewer.js?v=6837a455-0:18
    handlers https://cloud.XXX.de/apps/viewer/js/viewer.js?v=6837a455-0:18
    run https://cloud.XXX.de/apps/viewer/js/viewer.js?v=6837a455-0:10
    ln https://cloud.XXX.de/apps/viewer/js/viewer.js?v=6837a455-0:10
    ee https://cloud.XXX.de/apps/viewer/js/viewer.js?v=6837a455-0:10
    Xt https://cloud.XXX.de/apps/viewer/js/viewer.js?v=6837a455-0:10
12:08:24.814 Clipboard is deprecated: please ship your own, this will be removed in Nextcloud 20 main.js:202:3324
12:08:24.935 registerDetailView is deprecated! It will be removed in nextcloud 20. merged-index.js:433:156
12:08:24.947 registerTabView is deprecated! It will be removed in nextcloud 20. merged-index.js:432:92
12:08:24.951 Legacy tabs are deprecated! They will be removed in nextcloud 20. sidebar.js:34:658
12:08:24.962 registerTabView is deprecated! It will be removed in nextcloud 20. merged-index.js:432:92
12:08:24.965 Legacy tabs are deprecated! They will be removed in nextcloud 20. sidebar.js:34:658
12:08:24.976 registerTabView is deprecated! It will be removed in nextcloud 20. merged-index.js:432:92
12:08:24.978 Legacy tabs are deprecated! They will be removed in nextcloud 20. sidebar.js:34:658
12:08:25.059
TypeError: OCA.Files.Sidebar.close is not a functionmerged-index.js:206:33
    _updateDetailsView https://cloud.XXX.de/index.php/js/files/merged-index.js?v=6837a455-0:206
    reload https://cloud.XXX.de/index.php/js/files/merged-index.js?v=6837a455-0:327
    changeDirectory https://cloud.XXX.de/index.php/js/files/merged-index.js?v=6837a455-0:316
    _onUrlChanged https://cloud.XXX.de/index.php/js/files/merged-index.js?v=6837a455-0:217
    I https://cloud.XXX.de/core/js/dist/main.js?v=6837a455-0:22
    i https://cloud.XXX.de/core/js/dist/main.js?v=6837a455-0:22
    w https://cloud.XXX.de/core/js/dist/main.js?v=6837a455-0:22
    dispatch https://cloud.XXX.de/core/js/dist/main.js?v=6837a455-0:22
    handle https://cloud.XXX.de/core/js/dist/main.js?v=6837a455-0:22
    trigger https://cloud.XXX.de/core/js/dist/main.js?v=6837a455-0:22
    trigger https://cloud.XXX.de/core/js/dist/main.js?v=6837a455-0:58
    trigger https://cloud.XXX.de/core/js/dist/main.js?v=6837a455-0:22
    each https://cloud.XXX.de/core/js/dist/main.js?v=6837a455-0:13
    each https://cloud.XXX.de/core/js/dist/main.js?v=6837a455-0:13
    trigger https://cloud.XXX.de/core/js/dist/main.js?v=6837a455-0:22
    _onPopState https://cloud.XXX.de/index.php/js/files/merged-index.js?v=6837a455-0:6
    initialize https://cloud.XXX.de/index.php/js/files/merged-index.js?v=6837a455-0:3
    <anonymous> https://cloud.XXX.de/index.php/js/files/merged-index.js?v=6837a455-0:7
    delay https://cloud.XXX.de/core/js/dist/main.js?v=6837a455-0:22

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

<?php
$CONFIG = array (
  'instanceid' => 'XXX',
  'passwordsalt' => 'XXX',
  'secret' => 'XXX',
  'trusted_domains' => 
  array (
    0 => 'cloud.XXX.de',
  ),
  'datadirectory' => '/data/cloud',
  'dbtype' => 'mysql',
  'version' => '18.0.4.2',
  'overwrite.cli.url' => 'https://cloud.XXX.de',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'XXX',
  'dbpassword' => 'XXX',
  'installed' => true,
  'maintenance' => false,
);

The output of your Apache/nginx/system log in /var/log/____:
– nothing there too (empty, except access log) –

More:

Screenshots

Listed Files
total 164K
drwxr-xr-x 14 www-data www-data 4,0K May 11 17:38 .
drwxr-xr-x  5 root     root     4,0K May 10 23:46 ..
drwxr-xr-x 33 www-data www-data 4,0K Apr 22 21:29 3rdparty
drwxr-xr-x 49 www-data www-data 4,0K May 11 17:42 apps
-rw-r--r--  1 www-data www-data  16K Apr 22 21:23 AUTHORS
drwxr-xr-x  2 www-data www-data 4,0K May 11 17:40 config
-rw-r--r--  1 www-data www-data 3,9K Apr 22 21:23 console.php
-rw-r--r--  1 www-data www-data  34K Apr 22 21:23 COPYING
drwxr-xr-x 23 www-data www-data 4,0K Apr 22 21:29 core
-rw-r--r--  1 www-data www-data 5,0K Apr 22 21:24 cron.php
drwxr-xr-x  2 www-data www-data 4,0K May 11 17:39 data
-rw-r--r--  1 www-data www-data 2,6K May 11 17:40 .htaccess
-rw-r--r--  1 www-data www-data  156 Apr 22 21:24 index.html
-rw-r--r--  1 www-data www-data 3,0K Apr 22 21:24 index.php
drwxr-xr-x  6 www-data www-data 4,0K Apr 22 21:24 lib
-rw-r--r--  1 www-data www-data  283 Apr 22 21:24 occ
drwxr-xr-x  2 www-data www-data 4,0K Apr 22 21:24 ocm-provider
drwxr-xr-x  2 www-data www-data 4,0K Apr 22 21:24 ocs
drwxr-xr-x  2 www-data www-data 4,0K Apr 22 21:24 ocs-provider
-rw-r--r--  1 www-data www-data 3,0K Apr 22 21:24 public.php
-rw-r--r--  1 www-data www-data 5,2K Apr 22 21:24 remote.php
drwxr-xr-x  4 www-data www-data 4,0K Apr 22 21:24 resources
-rw-r--r--  1 www-data www-data   26 Apr 22 21:24 robots.txt
-rw-r--r--  1 www-data www-data 2,4K Apr 22 21:24 status.php
drwxr-xr-x  3 www-data www-data 4,0K Apr 22 21:24 themes
drwxr-xr-x  2 www-data www-data 4,0K Apr 22 21:25 updater
-rw-r--r--  1 www-data www-data  101 Apr 22 21:23 .user.ini
-rw-r--r--  1 www-data www-data  362 Apr 22 21:29 version.php

EDIT: “Recent” Section works just fine. “All Files” Section has this problem.

Thanks for helping.