Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Upgrade to 27.1.2.1 Not working: file_get_contents(/var/www/html/data/appdata_oczcy358mcjy/js/core/merged-template-prepend.js.deps): Failed to open stream: No such file or directory at /var/www/html/lib/private/Files/Storage/Local.php#305 #40886

Open
5 of 8 tasks
ndj888 opened this issue Oct 12, 2023 · 19 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 27-feedback bug feature: apps management feature: install and update needs info needs review Needs review to determine if still applicable

Comments

@ndj888
Copy link

ndj888 commented Oct 12, 2023

⚠️ This issue respects the following points: ⚠️

Bug description

All page not working, show This message:
Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Steps to reproduce

  1. Open all Page can got this error
  2. But some NC desktop don't care it, can sync

Expected behavior

All page and api can working.

Installation method

Community Docker image

Nextcloud Server version

27

Operating system

Debian/Ubuntu

PHP engine version

PHP 8.2

Web server

Nginx

Database engine version

PostgreSQL

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

Upgraded to a MAJOR version (ex. 22 to 23)

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": "true",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "dbindex": 0
        },
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "pi.jjcbs.com",
            "pi-cloud-frps.fmootech.cn"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "27.1.2.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "loglevel": 3,
        "maintenance": false,
        "app_install_overwrite": [
            "deck",
            "music"
        ],
        "theme": "",
        "overwritehost": "pi.jjcbs.com",
        "overwrite.cli.url": "https:\/\/pi.jjcbs.com",
        "overwriteprotocol": "https",
        "mysql.utf8mb4": true,
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtpauth": 1,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpsecure": "ssl",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "enable_previews": true,
        "enabledPreviewProviders": [
            "OC\\Preview\\TXT",
            "OC\\Preview\\MarkDown",
            "OC\\Preview\\OpenDocument",
            "OC\\Preview\\PDF",
            "OC\\Preview\\MSOffice2003",
            "OC\\Preview\\MSOfficeDoc",
            "OC\\Preview\\Image",
            "OC\\Preview\\Photoshop",
            "OC\\Preview\\TIFF",
            "OC\\Preview\\SVG",
            "OC\\Preview\\Font",
            "OC\\Preview\\MP3",
            "OC\\Preview\\Movie",
            "OC\\Preview\\MKV",
            "OC\\Preview\\MP4",
            "OC\\Preview\\AVI",
            "OC\\Preview\\HEIC"
        ]
    }
}

List of activated Apps

Enabled:
  - activity: 2.19.0
  - bookmarks: 13.1.1
  - calendar: 4.5.2
  - circles: 27.0.1
  - cloud_federation_api: 1.10.0
  - comments: 1.17.0
  - contacts: 5.4.2
  - contactsinteraction: 1.8.0
  - dashboard: 7.7.0
  - dav: 1.27.0
  - deck: 1.11.0
  - drawio: 2.1.2
  - external: 5.2.1
  - federatedfilesharing: 1.17.0
  - federation: 1.17.0
  - files: 1.22.0
  - files_external: 1.19.0
  - files_pdfviewer: 2.8.0
  - files_reminders: 1.0.0
  - files_rightclick: 1.6.0
  - files_sharing: 1.19.0
  - files_trashbin: 1.17.0
  - files_versions: 1.20.0
  - firstrunwizard: 2.16.0
  - logreader: 2.12.0
  - lookup_server_connector: 1.15.0
  - mail: 3.4.2
  - news: 24.0.0
  - nextcloud_announcements: 1.16.0
  - notes: 4.8.1
  - notifications: 2.15.0
  - oauth2: 1.15.1
  - password_policy: 1.17.0
  - passwords: 2023.9.30
  - photos: 2.3.0
  - previewgenerator: 5.3.0
  - privacy: 1.11.0
  - provisioning_api: 1.17.0
  - recognize: 5.0.1
  - recommendations: 1.6.0
  - related_resources: 1.2.0
  - richdocuments: 8.2.0
  - serverinfo: 1.17.0
  - settings: 1.9.0
  - sharebymail: 1.17.0
  - support: 1.10.0
  - survey_client: 1.15.0
  - systemtags: 1.17.0
  - tasks: 0.15.0
  - text: 3.8.0
  - theming: 2.2.0
  - twofactor_backupcodes: 1.16.0
  - updatenotification: 1.17.0
  - user_status: 1.7.0
  - viewer: 2.1.0
  - weather_status: 1.7.0
  - workflowengine: 2.9.0
Disabled:
  - admin_audit: 1.17.0
  - bruteforcesettings: 2.7.0 (installed 2.0.1)
  - encryption: 2.15.0
  - suspicious_login: 5.0.0
  - twofactor_totp: 9.0.0
  - user_ldap: 1.17.0

Nextcloud Signing status

No response

Nextcloud Logs

{"reqId":"aC3NUHXcZOHqK7XWdbY2","level":3,"time":"2023-10-12T13:04:29+00:00","remoteAddr":"172.68.200.153","user":"longbob","app":"PHP","method":"GET","url":"/apps/dashboard/","message":"file_get_contents(/var/www/html/data/appdata_oczcy358mcjy/js/core/merged-template-prepend.js.deps): Failed to open stream: No such file or directory at /var/www/html/lib/private/Files/Storage/Local.php#305","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","version":"27.1.2.1","data":{"app":"PHP"}}
{"reqId":"aC3NUHXcZOHqK7XWdbY2","level":3,"time":"2023-10-12T13:04:29+00:00","remoteAddr":"172.68.200.153","user":"longbob","app":"core","method":"GET","url":"/apps/dashboard/","message":"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","version":"27.1.2.1","exception":{"Exception":"OCP\\Files\\GenericFileException","Message":"","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Files/SimpleFS/SimpleFile.php","line":74,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->","args":[]},{"file":"/var/www/html/lib/private/Template/JSCombiner.php","line":118,"function":"getContent","class":"OC\\Files\\SimpleFS\\SimpleFile","type":"->","args":[]},{"file":"/var/www/html/lib/private/Template/JSCombiner.php","line":93,"function":"isCached","class":"OC\\Template\\JSCombiner","type":"->","args":["merged-template-prepend.js.deps",["OC\\Files\\SimpleFS\\SimpleFolder"]]},{"file":"/var/www/html/lib/private/Template/JSResourceLocator.php","line":145,"function":"process","class":"OC\\Template\\JSCombiner","type":"->","args":["/var/www/html","core/js/merged-template-prepend.json","core"]},{"file":"/var/www/html/lib/private/Template/JSResourceLocator.php","line":75,"function":"cacheAndAppendCombineJsonIfExist","class":"OC\\Template\\JSResourceLocator","type":"->","args":["/var/www/html","core/js/merged-template-prepend.json"]},{"file":"/var/www/html/lib/private/Template/ResourceLocator.php","line":73,"function":"doFind","class":"OC\\Template\\JSResourceLocator","type":"->","args":["core/js/merged-template-prepend"]},{"file":"/var/www/html/lib/private/TemplateLayout.php","line":377,"function":"find","class":"OC\\Template\\ResourceLocator","type":"->","args":[["core/js/common","core/js/main","core/js/unsupported-browser-redirect","core/l10n/zh_CN","core/js/files_fileinfo","And 55 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/lib/private/TemplateLayout.php","line":222,"function":"findJavascriptFiles","class":"OC\\TemplateLayout","type":"::","args":[["core/js/common","core/js/main","core/js/unsupported-browser-redirect","core/l10n/zh_CN","core/js/files_fileinfo","And 55 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":182,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["user","dashboard"]},{"file":"/var/www/html/lib/public/AppFramework/Http/TemplateResponse.php","line":213,"function":"fetchPage","class":"OC_Template","type":"->","args":[["#app-dashboard",null]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":182,"function":"render","class":"OCP\\AppFramework\\Http\\TemplateResponse","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":183,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\Dashboard\\Controller\\DashboardController"],"index"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Dashboard\\Controller\\DashboardController","index",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["dashboard.dashboard.index"]]},{"file":"/var/www/html/lib/base.php","line":1068,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/dashboard/"]},{"file":"/var/www/html/index.php","line":36,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Files/Node/File.php","Line":56,"CustomMessage":"--"}}
{"reqId":"aC3NUHXcZOHqK7XWdbY2","level":3,"time":"2023-10-12T13:04:29+00:00","remoteAddr":"172.68.200.153","user":"longbob","app":"core","method":"GET","url":"/apps/dashboard/","message":"","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36","version":"27.1.2.1","exception":{"Exception":"OCP\\Files\\GenericFileException","Message":"","Code":0,"Trace":[{"file":"/var/www/html/lib/private/Files/SimpleFS/SimpleFile.php","line":74,"function":"getContent","class":"OC\\Files\\Node\\File","type":"->","args":[]},{"file":"/var/www/html/lib/private/Template/JSCombiner.php","line":118,"function":"getContent","class":"OC\\Files\\SimpleFS\\SimpleFile","type":"->","args":[]},{"file":"/var/www/html/lib/private/Template/JSCombiner.php","line":93,"function":"isCached","class":"OC\\Template\\JSCombiner","type":"->","args":["merged-template-prepend.js.deps",["OC\\Files\\SimpleFS\\SimpleFolder"]]},{"file":"/var/www/html/lib/private/Template/JSResourceLocator.php","line":145,"function":"process","class":"OC\\Template\\JSCombiner","type":"->","args":["/var/www/html","core/js/merged-template-prepend.json","core"]},{"file":"/var/www/html/lib/private/Template/JSResourceLocator.php","line":75,"function":"cacheAndAppendCombineJsonIfExist","class":"OC\\Template\\JSResourceLocator","type":"->","args":["/var/www/html","core/js/merged-template-prepend.json"]},{"file":"/var/www/html/lib/private/Template/ResourceLocator.php","line":73,"function":"doFind","class":"OC\\Template\\JSResourceLocator","type":"->","args":["core/js/merged-template-prepend"]},{"file":"/var/www/html/lib/private/TemplateLayout.php","line":377,"function":"find","class":"OC\\Template\\ResourceLocator","type":"->","args":[["core/js/common","core/js/main","files_sharing/l10n/zh_CN","files_sharing/js/main","files_sharing/js/files_sharing_tab","And 55 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/lib/private/TemplateLayout.php","line":222,"function":"findJavascriptFiles","class":"OC\\TemplateLayout","type":"::","args":[["core/js/common","core/js/main","files_sharing/l10n/zh_CN","files_sharing/js/main","files_sharing/js/files_sharing_tab","And 55 more entries, set log level to debug to see all entries"]]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":182,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["error",""]},{"file":"/var/www/html/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":331,"function":"printPage","class":"OC\\Template\\Base","type":"->","args":[]},{"file":"/var/www/html/index.php","line":74,"function":"printExceptionErrorPage","class":"OC_Template","type":"::","args":[["OCP\\Files\\GenericFileException"],500]}],"File":"/var/www/html/lib/private/Files/Node/File.php","Line":56,"CustomMessage":"--"}}

Additional info

No response

@ndj888 ndj888 added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Oct 12, 2023
@imker25

This comment was marked as off-topic.

@ndj888
Copy link
Author

ndj888 commented Oct 14, 2023

@imker25 The upgrade process caused a user data directory error, which I successfully fixed using the following two commands. cd to your nextcloud root dir then
php occ maintenance:repair
php occ files:scan-app-data

@joshtrichards
Copy link
Member

Community Docker image

Which Docker image? What was the Docker log output from the upgrade when you recreated the container? Can you provide your Compose file?

The upgrade process caused a user data directory error

This one from your original report or some other one?

file_get_contents(/var/www/html/data/appdata_oczcy358mcjy/js/core/merged-template-prepend.js.deps): Failed to open stream: No such file or directory at /var/www/html/lib/private/Files/Storage/Local.php#305

I successfully fixed using the following two commands...

Am I to understand from your most recent comment that you resolved the reported situation in this issue entirely by running occ files:scan-app-data?

@imker25 Other than being an issue with upgrading, unless I'm missing something your matter has nothing to do with this one (at least based on the output your provided). Please create a dedicated issue for it.

@ndj888
Copy link
Author

ndj888 commented Oct 18, 2023

@joshtrichards I'm using the nextcloud:fpm-alpine image from hub.docker.com, and the database is PostgreSQL 15.4. In fact, to fix this issue, I tried the following steps:

Executed 'php occ files:cleanup.'
Ran 'php occ files:scan --all.'
Executed 'php occ files:app-scan.

@imker25

This comment was marked as off-topic.

@joshtrichards joshtrichards changed the title [Bug]: Upgrade to 27.1.2.1 Not working [Bug]: Upgrade to 27.1.2.1 Not working: file_get_contents(/var/www/html/data/appdata_oczcy358mcjy/js/core/merged-template-prepend.js.deps): Failed to open stream: No such file or directory at /var/www/html/lib/private/Files/Storage/Local.php#305 Nov 1, 2023
@Lofavreel
Copy link

Lofavreel commented Nov 1, 2023

EDIT: It seems that the following issue I had is resolved now. There was a bigger issue with my reverse proxy, and I pruned my docker and redeployed my stack. Now everything works fine. I don't know whether the repair steps (maintenance:repair + files:scan-app-data) helped with resolving this, I did those before the prune.


It seems to me that I have a similar if not the same issue after my upgrade to 27.1.3.2 (maybe I missed the 27.1.2.1):

Error    no app in context  JSCombiner: unable  2023-11-01T22:53:17+01:00
                              to cache:
                              merged-template-prepend.js

  Error    PHP                file_put_contents(/var/www/html/data/appdata_[...]/js/core/merged-template-prepend.js): 2023-11-01T22:53:17+01:00
                              Failed to open
                              stream: No such
                              file or directory
                              at
                              /var/www/html/lib/private/Files/Storage/Local.php#313

I tried the cleanup, scan-app-data and repair, but if at all it only fixed it temporarily. File system permissions are set to www-data, though only for the directory (js/core) as there is no merged-template-prepend.js (since JSCompiler is unable to create it). I will run a files:scan --all tonight, but I have no hopes for that, because I don't see the connection to the issue there.
Before the update everything worked like a charm, I guess the maintenance cleanup of the update resulted in whatever this is. I honestly have no idea where this symptom stems from, so any help on the OPs issue would be highly appreciated.

@jakub50
Copy link

jakub50 commented Jan 14, 2024

I had the same problem when upgrading to 27.1.5.1 yesterday. Not sure from which version, but I've started using Nextcloud about a month ago and this was my very first upgrade. I applied the steps mentioned by ndj888 and it seems to work again.

Just to add more info, hope it will help at least a bit:
I am using reverse proxy, which I misconfigured a bit and it started to show after the upgrade (probably because I or the upgrade recreated the master container with a bit modified setting that wasn't applied before, see https://help.nextcloud.com/t/getting-503-service-unavailable-after-upgrade-to-27-1-5-1/178928 for details). Anyway when trying to figure out the reverse proxy bug I restarted the containers and tried restoring older version of docker volumes a few times, which might have had an impact.

@RubbelDeCatc
Copy link

I had the same problem after upgrading stepwise from Nextcloud 23 to 28
None of the mentioned occ commands helped.

I used phpmyadmin and removed the entry containing "merged-template-prepend.js.deps" from the oc_filecache table.

@JonTabor
Copy link

JonTabor commented Mar 1, 2024

I had the same problem after upgrading stepwise from Nextcloud 23 to 28 None of the mentioned occ commands helped.

I used phpmyadmin and removed the entry containing "merged-template-prepend.js.deps" from the oc_filecache table.

I ran into this problem when updating from 27.1.6 to 27.1.7. This solution worked for me after the others in this thread did not.

@joshtrichards
Copy link
Member

Related: #44576 and possibly #44128

@joshtrichards
Copy link
Member

@ndj888 Can you share your Docker Compose file? The equivalent to php occ maintenance:repair is already triggered during the occ upgrade run used by the Docker image when the main code update finishes. There is one scenario where occ upgrade may not be triggered: if you're using either a custom iteration of the image or override the CMD in the entrypoint.

@ndj888
Copy link
Author

ndj888 commented Apr 15, 2024

@ndj888 Can you share your Docker Compose file? The equivalent to php occ maintenance:repair is already triggered during the occ upgrade run used by the Docker image when the main code update finishes. There is one scenario where occ upgrade may not be triggered: if you're using either a custom iteration of the image or override the CMD in the entrypoint.

The docker compose yaml such as this:

version: '3.7'
services:
  pg:
    image: bitnami/postgresql:16.2.0-debian-12-r10
    restart: always
    environment:
      POSTGRESQL_PASSWORD: 
      POSTGRES_USERNAME: nextcloud
      POSTGRES_DATABASE: nextcloud
      POSTGRESQL_POSTGRES_PASSWORD: 
#      POSTGRESQL_MAX_CONNECTIONS: 20
    volumes:
      - /data/nextcloud/pg-data:/bitnami/postgresql
      #- ./postgresql.conf:/var/lib/postgresql/data/postgresql.conf
#    ports:
#      - 5432:5432
  app:
    #image: nextcloud:fpm-local-jit
#    image: nextcloud:fpm-alpine
    build: ./nextcloud-app-image
    restart: always
    links:
      - redis
      - pg
    volumes:
      - /data/nextcloud/www:/var/www/html
      - /var/cache/nc-nginx:/var/cache/nginx
      - /data:/data
      - /downloads:/download
      - /ssd-data/downloads:/ssd-data/download
      - ./php/opcache-recommended.ini:/usr/local/etc/php/conf.d/opcache-recommended.ini
      - ./php:/usr/local/etc/php-fpm.d
      - /usr/share/zoneinfo/Asia/Shanghai:/etc/localtime:ro
    environment:
      - MYSQL_DATABASE=nextcloud
      - MYSQL_PASSWORD=
      - MYSQL_USER=nextcloud
      - MYSQL_HOST=db
      - LANG=en_US.UTF-8
      - LANGUAGE=en_US.UTF-8
      - LC_ALL=en_US.UTF-8
        #user: "www-data:www-data"
    user: "33:33"
    labels:
      - com.centurylinklabs.watchtower.enable=false
    #mem_limit: 1.5G
    #deploy:
     #   resources:
     #       limits:
     #           cpus: 3
     #           memory: "2G"

  web:
    #image: modsecurity-crs-docker:nginx-v1.25.3
    image: owasp/modsecurity-crs:nginx
    #image: owasp/modsecurity:nginx-alpine
    #image: nginx:alpine
    restart: always
    user: 0:0
    ports:
      - 443:443
    links:
      - app
    #entrypoint:
    #  - sh
    #  - -c
    #  - "cp -rf /etc/modsecurity.d/my/crs-setup.conf /etc/modsecurity.d/owasp-crs/crs-setup.conf \ && /docker-entrypoint.sh nginx -g 'daemon off;'"
      #- "cp -rf /etc/modsecurity.d/my/crs-setup.conf /etc/modsecurity.d/owasp-crs/crs-setup.conf \ && sh -s /docker-entrypoint.sh"
    volumes:
      #- $PWD/nginx.conf:/etc/nginx/nginx.conf
      - $PWD/mime.types:/etc/nginx/mime.types:ro
      - $PWD/nginx.conf:/etc/nginx/templates/nginx.conf.template
      - $PWD/waf-rules/setup.conf.template:/etc/nginx/templates/modsecurity.d/setup.conf.template
      #- $PWD/nginx.conf.d:/etc/nginx/nginx.conf.d
      - $PWD/nginx.conf.d:/etc/nginx/conf.d
      #- ./rules/crs-setup.conf:/etc/modsecurity.d/my/crs-setup.conf
      - ./waf-rules:/etc/nginx/modsecurity.d
      #- ./rules/REQUEST-903.9003-NEXTCLOUD-EXCLUSION-RULES.conf:/etc/modsecurity.d/owasp-crs/rules/REQUEST-903.9003-NEXTCLOUD-EXCLUSION-RULES.conf
      - /etc/nginx/ssl:/etc/nginx/ssl
      - ./check-in:/app
      #- ./logs:/var/log/ng-log
# cache
      - /var/cache/nc-nginx:/var/cache/nginx
    volumes_from:
      - app
    logging:
       options:
         max-size: 512m
  redis:
    image: redis:latest
    restart: always
#    ports:
#      - 6379:6379`

This is custmer defined Dockerfile extend form the nextcloud:stable-fpm

FROM nextcloud:stable-fpm
RUN apt update \
&& apt install -y ffmpeg`

@MasterPuffin
Copy link

I had the same problem after upgrading stepwise from Nextcloud 23 to 28 None of the mentioned occ commands helped.

I used phpmyadmin and removed the entry containing "merged-template-prepend.js.deps" from the oc_filecache table.

I use Nextcloud without Docker, upgrade from 28 to 29 failed somehow, this was the only way to resolve it.

@joshtrichards
Copy link
Member

@ndj888 Any chance /var/www/html/data is a symbolic link to /data in your environment?

@m3tabar0n
Copy link

php occ maintenance:repair resolved the issue for me. I was restoring a database and file backup.

@ndj888
Copy link
Author

ndj888 commented Jun 24, 2024

@ndj888 Any chance /var/www/html/data is a symbolic link to /data in your environment?

Without using any symbolic links, /data is Wulilu Jin, and it is mounted to /var/www/html in the Docker container. I only encountered this issue during the version 27.1 upgrade. After manually executing the repair command, the problem did not recur. Currently, I am using version 28.0.5 and have not observed this issue.

@mitroko
Copy link

mitroko commented Sep 24, 2024

Affected me as well, upgraded from 27 to 28 and then to 29
Fix with removing the na,e from oc_cache works, but when you run "php occ maintenance:repair --include-expensive" it appears again and fixed same way. Guess next upgrade will cause it again due to this function call.

@joshtrichards
Copy link
Member

Every situation this has come up in so far that I'm aware of has turned out to be config related somehow.

Please:

  • review your web server configs
  • check if the js file is accessible and, if so, what the http response code and it's mine type is (via your browser inspector under Network or using curl -I the_url.

For example: linuxserver/docker-nextcloud#410 (comment)

@joshtrichards joshtrichards added needs info needs review Needs review to determine if still applicable labels Oct 22, 2024
@mitroko
Copy link

mitroko commented Oct 22, 2024

Every situation this has come up in so far that I'm aware of has turned out to be config related somehow.

Please:

* review your web server configs

* check if the js file is accessible and, if so, what the http response code and it's mine type is (via your browser inspector under _Network_ or using `curl -I the_url`.

For example: linuxserver/docker-nextcloud#410 (comment)

I think "php occ maintenance:repair --include-expensive" has nothing to web server set up, but causes the issue to reproduce. I can access any other js file on the same level via curl too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap 27-feedback bug feature: apps management feature: install and update needs info needs review Needs review to determine if still applicable
Projects
None yet
Development

No branches or pull requests