nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
26.26k stars 3.95k forks source link

[Bug]: `Failed to open stream` + `Error while running background job` immediately after installation #45671

Open Adspectus opened 1 month ago

Adspectus commented 1 month ago

⚠️ This issue respects the following points: ⚠️

Bug description

After installation and first start on Nextcloud AIO I see the following message in the overview of systemadministration: 2 errors in protocols. When I click on protocols I can see the following:

{
  "reqId": "5rgiLEkUnGJYuN36W5Kj",
  "level": 3,
  "time": "2024-06-01T13:32:58+00:00",
  "remoteAddr": "",
  "user": "admin",
  "app": "PHP",
  "method": "",
  "url": "--",
  "message": "fopen(/var/www/html/config/config.php): Failed to open stream: No such file or directory at /var/www/html/lib/private/Config.php#225",
  "userAgent": "--",
  "version": "28.0.5.1",
  "data": {
    "app": "PHP"
  },
  "id": "665b3280372d1"
}

And:

{
  "reqId": "Qd07Vbl2vOSYyNbf3sw2",
  "level": 3,
  "time": "2024-06-01T13:33:47+00:00",
  "remoteAddr": "",
  "user": "--",
  "app": "core",
  "method": "",
  "url": "--",
  "message": "Error while running background job (class: OCA\\Theming\\Jobs\\MigrateBackgroundImages, arguments: Array\n(\n    [stage] => prepare\n)\n)",
  "userAgent": "--",
  "version": "28.0.5.1",
  "exception": {
    "Exception": "OCP\\Files\\NotFoundException",
    "Message": "/appdata_octtordoeggb/theming/global",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/Files/Node/LazyFolder.php",
        "line": 161,
        "function": "get",
        "class": "OC\\Files\\Node\\Root",
        "type": "->",
        "args": [
          "/appdata_octtordoeggb/theming/global"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/AppData/AppData.php",
        "line": 132,
        "function": "get",
        "class": "OC\\Files\\Node\\LazyFolder",
        "type": "->",
        "args": [
          "appdata_octtordoeggb/theming/global"
        ]
      },
      {
        "file": "/var/www/html/apps/theming/lib/Jobs/MigrateBackgroundImages.php",
        "line": 168,
        "function": "getFolder",
        "class": "OC\\Files\\AppData\\AppData",
        "type": "->",
        "args": [
          "global"
        ]
      },
      {
        "file": "/var/www/html/apps/theming/lib/Jobs/MigrateBackgroundImages.php",
        "line": 100,
        "function": "storeUserIdsToProcess",
        "class": "OCA\\Theming\\Jobs\\MigrateBackgroundImages",
        "type": "->",
        "args": [
          []
        ]
      },
      {
        "file": "/var/www/html/apps/theming/lib/Jobs/MigrateBackgroundImages.php",
        "line": 79,
        "function": "runPreparation",
        "class": "OCA\\Theming\\Jobs\\MigrateBackgroundImages",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/lib/public/BackgroundJob/Job.php",
        "line": 81,
        "function": "run",
        "class": "OCA\\Theming\\Jobs\\MigrateBackgroundImages",
        "type": "->",
        "args": [
          [
            "prepare"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/public/BackgroundJob/QueuedJob.php",
        "line": 57,
        "function": "start",
        "class": "OCP\\BackgroundJob\\Job",
        "type": "->",
        "args": [
          [
            "OC\\BackgroundJob\\JobList"
          ]
        ]
      },
      {
        "file": "/var/www/html/lib/public/BackgroundJob/QueuedJob.php",
        "line": 47,
        "function": "start",
        "class": "OCP\\BackgroundJob\\QueuedJob",
        "type": "->",
        "args": [
          [
            "OC\\BackgroundJob\\JobList"
          ]
        ]
      },
      {
        "file": "/var/www/html/cron.php",
        "line": 152,
        "function": "execute",
        "class": "OCP\\BackgroundJob\\QueuedJob",
        "type": "->",
        "args": [
          [
            "OC\\BackgroundJob\\JobList"
          ],
          [
            "OC\\Log"
          ]
        ]
      }
    ],
    "File": "/var/www/html/lib/private/Files/Node/Root.php",
    "Line": 207,
    "message": "Error while running background job (class: OCA\\Theming\\Jobs\\MigrateBackgroundImages, arguments: Array\n(\n    [stage] => prepare\n)\n)",
    "exception": [],
    "CustomMessage": "Error while running background job (class: OCA\\Theming\\Jobs\\MigrateBackgroundImages, arguments: Array\n(\n    [stage] => prepare\n)\n)"
  },
  "id": "665b3280372bf"
}

Steps to reproduce

  1. Install Nextcloud AIO according to the guide in this repo using Apache httpd as reverse proxy
  2. Open Nextcloud Admin-Settings the overview shows 2 errors related to system configuration
  3. Checking the protocol shows the entries documented above

Expected behavior

No errors in protocol after installation.

Installation method

Official All-in-One appliance

Nextcloud Server version

28

Operating system

Other

PHP engine version

PHP 8.2

Web server

Apache (supported)

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

No response

List of activated Apps

No response

Nextcloud Signing status

No response

Nextcloud Logs

No response

Additional info

OS: Linux 6.6.28+rpt-rpi-2712 aarch64

joshtrichards commented 1 month ago

You're not getting these repeatedly though, correct?

Adspectus commented 1 month ago

No, only after installing.