linuxserver/docker-nextcloud

[BUG] missing nextcloud.oc_calendarobjects in mariadb

justnight opened this issue · 4 comments

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I'm setting up nextcloud in Windows docker desktop, and running into issues when creating admin account.

Already fixed two issues as mentioned in the 'steps', but stuck now.
I kind of suspect there is a problem nextcloud with mariadb? because if I use SQlite it works
But I did see mariadb got updated, somehow it only have issue with oc_calendarobjects

Expected Behavior

Admin account should be created successfully.

Steps To Reproduce

  1. Docker compose up -d with the compose.yml below
  2. Manually add two lines to config.php
    'allow_local_remote_servers' => true, because I'm using localhost
    'check_data_directory_permissions' => true, because I'm using Windows docker desktop
  3. restart the nextcloud container
  4. access https://localhost:443 to create admin acount
    image

Environment

- OS: Windows 10
- How docker service was installed: docker desktop with WSL2

CPU architecture

x86-64

Docker creation

---
services:
  mariadb:
    image: lscr.io/linuxserver/mariadb:latest
    container_name: mariadb
    environment:
      - TZ=Canada/Pacific
    volumes:
      - //f/mariadb/config:/config
    ports:
      - 3306:3306
    networks:
      - mynet
    restart: unless-stopped
    
  adminer:
    image: adminer
    restart: always
    environment:
      - ADMINER_DEFAULT_SERVER=mariadb
    ports:
      - 8080:8080
    networks:
      - mynet
    
  nextcloud:
    image: lscr.io/linuxserver/nextcloud:latest
    container_name: nextcloud
    environment:      
      - PUID=911
      - PGID=911
      - TZ=Canada/Pacific
    volumes:
      - //f/nextcloud/config:/config
      - //f/nextcloud/data:/data
    ports:
      - 443:443
    networks:
      - mynet
    restart: unless-stopped
    
networks:
    mynet:
      external:
        name: mynet

Container logs

{
  "reqId": "I3qhhw86wM8uS45JIguQ",
  "level": 3,
  "time": "2024-06-01T05:33:04+00:00",
  "remoteAddr": "172.19.0.1",
  "user": "--",
  "app": "index",
  "method": "POST",
  "url": "/",
  "message": "There is no table with name \"nextcloud.oc_calendarobjects\" in the schema.",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36",
  "version": "29.0.1.1",
  "exception": {
    "Exception": "Doctrine\\DBAL\\Schema\\Exception\\TableDoesNotExist",
    "Message": "There is no table with name \"nextcloud.oc_calendarobjects\" in the schema.",
    "Code": 10,
    "Trace": [
      {
        "file": "/app/www/public/3rdparty/doctrine/dbal/src/Schema/SchemaException.php",
        "line": 68,
        "function": "new",
        "class": "Doctrine\\DBAL\\Schema\\Exception\\TableDoesNotExist",
        "type": "::"
      },
      {
        "file": "/app/www/public/3rdparty/doctrine/dbal/src/Schema/Schema.php",
        "line": 188,
        "function": "tableDoesNotExist",
        "class": "Doctrine\\DBAL\\Schema\\SchemaException",
        "type": "::"
      },
      {
        "file": "/app/www/public/lib/private/DB/SchemaWrapper.php",
        "line": 89,
        "function": "getTable",
        "class": "Doctrine\\DBAL\\Schema\\Schema",
        "type": "->"
      },
      {
        "file": "/config/www/nextcloud/apps/dav/lib/Migration/Version1029Date20221114151721.php",
        "line": 47,
        "function": "getTable",
        "class": "OC\\DB\\SchemaWrapper",
        "type": "->"
      },
      {
        "file": "/app/www/public/lib/private/DB/MigrationService.php",
        "line": 435,
        "function": "changeSchema",
        "class": "OCA\\DAV\\Migration\\Version1029Date20221114151721",
        "type": "->"
      },
      {
        "file": "/app/www/public/lib/private/DB/MigrationService.php",
        "line": 401,
        "function": "migrateSchemaOnly",
        "class": "OC\\DB\\MigrationService",
        "type": "->"
      },
      {
        "file": "/app/www/public/lib/private/Installer.php",
        "line": 574,
        "function": "migrate",
        "class": "OC\\DB\\MigrationService",
        "type": "->"
      },
      {
        "file": "/app/www/public/lib/private/Installer.php",
        "line": 541,
        "function": "installShippedApp",
        "class": "OC\\Installer",
        "type": "::"
      },
      {
        "file": "/app/www/public/lib/private/Setup.php",
        "line": 402,
        "function": "installShippedApps",
        "class": "OC\\Installer",
        "type": "::"
      },
      {
        "file": "/app/www/public/core/Controller/SetupController.php",
        "line": 68,
        "function": "install",
        "class": "OC\\Setup",
        "type": "->",
        "args": ["*** sensitive parameters replaced ***"]
      },
      {
        "file": "/app/www/public/lib/base.php",
        "line": 998,
        "function": "run",
        "class": "OC\\Core\\Controller\\SetupController",
        "type": "->",
        "args": ["*** sensitive parameters replaced ***"]
      },
      {
        "file": "/app/www/public/index.php",
        "line": 49,
        "function": "handleRequest",
        "class": "OC",
        "type": "::"
      }
    ],
    "File": "/app/www/public/3rdparty/doctrine/dbal/src/Schema/Exception/TableDoesNotExist.php",
    "Line": 16,
    "message": "There is no table with name \"nextcloud.oc_calendarobjects\" in the schema.",
    "exception": {},
    "CustomMessage": "There is no table with name \"nextcloud.oc_calendarobjects\" in the schema."
  }
}

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

I'm having the same issue when using both the online web installer or the occ command.

occ maintenance:install --database "mysql" --datab
ase-name "nextcloud" --database-host "nc-db" --database-user "root" --d
atabase-pass "xxx" --admin-user "xxx" --admin-pas
s "xxx" --data-dir "/data/drive"

image