Snappymail uses '/apps/' instead of '/custom_apps/' path - why?

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 30.0.4.1
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 22.04
  • Web server and version (e.g, Apache 2.4.25):
    • Apache (docker)
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Caddy
  • PHP version (e.g, 8.3):
    • ``
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • After moving from native installation to docker
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • docker compose
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

I recently moved my Nextcloud instance from a native installation on Ubuntu into a docker-compose setup. Now, Nextcloud tries to find the files of the app snappymail in the wrong location:
/apps/snappymail/app/snappymail/v/2.38.2/static/js/min/libs.min.js
while it should be looking in
/custom_apps/snappymail/app/snappymail/v/2.38.2/static/js/min/libs.min.js.
I therefore get an error 404 when trying to access the snappymail app. Removing and reinstalling the app doesn’t help. Where are these paths saved? Is there a cache I can clear, maybe in the database?

I just looked at other apps from the custom_apps folder. They are all opened on paths starting with /apps/ instead of /custom_apps/. But they work well, including memories, deck, etc. I do have an access problem when it comes to onlyoffice, however. Maybe that’s related.

I would highly appreciate any help :slight_smile:

Steps to replicate it (hint: details matter!):

  1. I don’t know

Log entries

Nextcloud

None

Web Browser

Firefox console:

GET
https://cloud.myserver.de/apps/snappymail/app/snappymail/v/2.38.2/static/css/app.min.css
NS_ERROR_CORRUPTED_CONTENT

Web server

Apache:

10.0.0.1 - - [06/Jan/2025:16:50:11 +0000] "GET /apps/snappymail/?admin HTTP/1.1" 200 26923 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
10.0.0.1 - - [06/Jan/2025:16:50:12 +0000] "GET /apps/snappymail/app/snappymail/v/2.38.2/static/css/admin.min.css HTTP/1.1" 404 654 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
10.0.0.1 - - [06/Jan/2025:16:50:12 +0000] "GET /apps/side_menu/css/stylesheet?v=3 HTTP/1.1" 200 1413 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
10.0.0.1 - - [06/Jan/2025:16:50:12 +0000] "GET /apps/side_menu/js/script?v=3 HTTP/1.1" 200 2264 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
10.0.0.1 - - [06/Jan/2025:16:50:12 +0000] "GET /apps/snappymail/?/AdminAppData/0/6141339527732675/ HTTP/1.1" 200 2925 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
10.0.0.1 - - [06/Jan/2025:16:50:12 +0000] "GET /apps/snappymail/app/snappymail/v/2.38.2/static/js/min/libs.min.js HTTP/1.1" 404 654 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
10.0.0.1 - - [06/Jan/2025:16:50:13 +0000] "GET /ocs/v2.php/apps/user_status/api/v1/user_status HTTP/1.1" 200 863 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
10.0.0.1 - - [06/Jan/2025:16:50:13 +0000] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 200 863 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
10.0.0.1 - - [06/Jan/2025:16:50:12 +0000] "GET /ocs/v2.php/search/providers?from=%2Fapps%2Fsnappymail%2F%3Fadmin HTTP/1.1" 200 1464 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
10.0.0.1 - - [06/Jan/2025:16:50:13 +0000] "GET /apps/side_menu/js/config HTTP/1.1" 200 996 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
10.0.0.1 - - [06/Jan/2025:16:50:13 +0000] "POST /contactsmenu/contacts HTTP/1.1" 200 1441 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
10.0.0.1 - - [06/Jan/2025:16:50:13 +0000] "GET /apps/side_menu/nav/items HTTP/1.1" 200 1079 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
10.0.0.1 - - [06/Jan/2025:16:50:13 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 869 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"
10.0.0.1 - - [06/Jan/2025:16:50:13 +0000] "GET /ocs/v2.php/core/navigation/apps?format=json HTTP/1.1" 200 1313 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0"

Reverse Proxy

Caddy:

None

Configuration

Nextcloud

{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "overwritehost": "cloud.myserver.de",
        "overwriteprotocol": "https",
        "overwrite.cli.url": "https:\/\/cloud.myserver.de",
        "trusted_domains": [
            "10.0.0.2",
            "cloud.myserver.de"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "30.0.4.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "installed": true,
        "theme": "",
        "loglevel": 1,
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "maintenance": false,
        "updatechecker": false,
        "trashbin_retention_obligation": "auto",
        "mail_smtpmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "ssl",
        "filelocking.enabled": "true",
        "updater.release.channel": "stable",
        "mysql.utf8mb4": true,
        "app_install_overwrite": [
            "ojsxc",
            "dicomviewer",
            "documentserver_community",
            "files_readmemd",
            "cms_pico"
        ],
        "default_phone_region": "DE",
        "mail_sendmailmode": "smtp",
        "memories.exiftool": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/exiftool-amd64-glibc",
        "memories.vod.path": "\/var\/www\/html\/custom_apps\/memories\/bin-ext\/go-vod-amd64",
        "maintenance_window_start": 1,
        "memories.gis_type": 1,
        "preview_max_x": 1024,
        "preview_max_y": 1024,
        "jpeg_quality": 60,
        "htaccess.RewriteBase": "\/",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "memcache.local": "\\OC\\Memcache\\APCu",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "upgrade.disable-web": true,
        "memories.db.triggers.fcu": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\Image",
            "OC\\Preview\\Movie"
        ],
        "memories.vod.connect": "go-vod:47788",
        "memories.vod.external": true,
        "memories.vod.disable": false,
        "memories.vod.vaapi": true,
        "memories.vod.use_transpose": true,
        "memories.vod.use_transpose.force_sw": true,
        "memories.vod.ffmpeg": "\/usr\/bin\/ffmpeg",
        "memories.vod.ffprobe": "\/usr\/bin\/ffprobe",
        "memories.index.mode": "0",
        "onlyoffice": {
            "DocumentServerUrl": "\/ds-vpath\/",
            "DocumentServerInternalUrl": "http:\/\/nc-onlyoffice\/",
            "StorageUrl": "http:\/\/nextcloud\/",
            "jwt_secret": "***REMOVED SENSITIVE VALUE***"
        },
        "files_lock.lock_timeout": "60"
    }
}


Apps

Enabled:
  - app_api: 4.0.3
  - appointments: 2.3.5
  - bruteforcesettings: 3.0.0
  - calendar: 5.0.8
  - circles: 30.0.0
  - cloud_federation_api: 1.13.0
  - cms_pico: 1.0.21
  - comments: 1.20.1
  - contacts: 6.1.2
  - contactsinteraction: 1.11.0
  - cookbook: 0.11.2
  - dav: 1.31.1
  - deck: 1.14.2
  - federatedfilesharing: 1.20.0
  - federation: 1.20.0
  - files: 2.2.0
  - files_downloadlimit: 3.0.0
  - files_external: 1.22.0
  - files_lock: 30.0.1
  - files_pdfviewer: 3.0.0
  - files_reminders: 1.3.0
  - files_sharing: 1.22.0
  - files_trashbin: 1.20.1
  - files_versions: 1.23.0
  - firstrunwizard: 3.0.0
  - forms: 4.3.4
  - logreader: 3.0.0
  - lookup_server_connector: 1.18.0
  - maps: 1.5.0
  - memories: 7.4.1
  - nextcloud_announcements: 2.0.0
  - notes: 4.11.0
  - notifications: 3.0.0
  - oauth2: 1.18.1
  - password_policy: 2.0.0
  - photos: 3.0.2
  - polls: 7.2.9
  - previewgenerator: 5.7.0
  - privacy: 2.0.0
  - provisioning_api: 1.20.0
  - recommendations: 3.0.0
  - related_resources: 1.5.0
  - richdocuments: 8.5.3
  - richdocumentscode: 24.4.1002
  - serverinfo: 2.0.0
  - settings: 1.13.0
  - sharebymail: 1.20.0
  - side_menu: 4.0.1
  - snappymail: 2.38.2
  - support: 2.0.0
  - survey_client: 2.0.0
  - suspicious_login: 8.0.0
  - systemtags: 1.20.0
  - tasks: 0.16.1
  - text: 4.1.0
  - theming: 2.5.0
  - twofactor_backupcodes: 1.19.0
  - twofactor_totp: 12.0.0-dev
  - updatenotification: 1.20.0
  - user_status: 1.10.0
  - viewer: 3.0.0
  - weather_status: 1.10.0
  - webhook_listeners: 1.1.0-dev
  - workflowengine: 2.12.0
Disabled:
  - activity: 3.0.0 (installed 2.3.2)
  - admin_audit: 1.20.0
  - dashboard: 7.10.0 (installed 6.0.0)
  - drawio: 3.0.3 (installed 3.0.3)
  - encryption: 2.18.0
  - onlyoffice: 9.5.0 (installed 9.5.0)
  - twofactor_nextcloud_notification: 4.0.0
  - user_ldap: 1.21.0

Tips for increasing the likelihood of a response

  • Use the preformatted text formatting option in the editor for all log entries and configuration output.
  • If screenshots are useful, feel free to include them.
    • If possible, also include key error output in text form so it can be searched for.
  • Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.

From a quick look at the code, it looks like snappymail internally saves this in a setting called app_path which looks like it should be available in the snappymail internal admin screen:

Thanks a lot. How the hell did I miss that? I looked at the settings but must have missed it. I changed it to /custom_apps/snappymail/app/ and now everything works well.

I’m still confused why this is necessary at all and why only snappymail is served on /custom_apps/ when all other custom apps located in the same directory are served in /apps/. This doesn’t really make sense to me. Especially because I explicitly set the url parameter in the nextcloud config for the custom_apps to custom_apps. Hence, I would expect that all custom apps are also served there.

Does anyone have an intuition as to why this is? As I said in the main question, I have the feeling that this could be the reason why I have issues with onlyoffice.

Some of the settings I set in the config.php file don’t seem to have an effect. Could it be that there is some kind of cache e.g. in the database from my original installation that I would have to clear?

Thanks in advance again!

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