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

🐛 [Nextcloud] latest upstream version does not allow to install apps #1333

Closed
dafunkydan opened this issue Apr 5, 2024 · 51 comments
Closed
Labels
bug Something isn't working

Comments

@dafunkydan
Copy link

Description

I can't enable the External Storage Support App in Nextcloud. When trying to enable it, it says:
Error: This app cannot be enabled because it makes the server unstable

I set the Share up as CIFS networkdisks in the Addon Options and rebooted, it looks like sucessful:

[09:22:50] INFO: ...... //192.168.xxx.xxx/SERVER/SHARE1/Subfolder successfully mounted to /mnt/Subfolder with options rw,file_mode=0775,dir_mode=0775,username=user-smb-nextcloud,password=XXXXXXXXXX,nobrl,uid=1000,gid=1000,iocharset=utf8

Any Idea how to resolve that Issue?

Reproduction steps

1. Set up CIFS Share
2. Reboot the Nextcloud-Addon
3. Open the Nextcloud UI, navigate to Apps-> Find "External Storage Support"
4. Click on "Enable"

Addon Logs

Add-on version: 28.0.4
 You are running the latest version of this add-on.
 System: Home Assistant OS 12.1  (aarch64 / raspberrypi4-64)
 Home Assistant Core: 2024.3.3
 Home Assistant Supervisor: 2024.03.1
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums
-----------------------------------------------------------
 Provided by: https://github.com/alexbelgium/hassio-addons 
-----------------------------------------------------------
 Defining permissions for main user : 
User UID: 1000
User GID : 1000
-----------------------------------------------------------
/etc/cont-init.d/00-global_var.sh: executing
Full_Text_Search='false'
OCR='false'
OCRLANG='fra'
PGID='1000'
PUID='1000'
additional_apps='inotify-tools'
certfile='fullchain.pem'
cifspassword='xxxxxxxxxxxxx'
cifsusername='xxxxxxxxxxxxx'
default_phone_region='DE'
elasticsearch_server='<ip:port>'
enable_thumbnails='false'
keyfile='privkey.pem'
networkdisks='//192.168.xxx.xxx/SERVER/SHARE1/Subfolder/'
trusted_domains='ha.mydomain.com, ha-dev.mydomain.com'
use_own_certs='true'
/etc/cont-init.d/00-local_mounts.sh: executing
/etc/cont-init.d/00-smb_mounts.sh: executing
Mounting smb share(s)...
... using PUID 1000 and PGID 1000
... mounting //192.168.xxx.xxx/SERVER/SHARE1/Subfolder
[09:22:50] INFO: ...... //192.168.xxx.xxx/SERVER/SHARE1/Subfolder successfully mounted to /mnt/Subfolder with options rw,file_mode=0775,dir_mode=0775,username=user-smb-nextcloud,password=XXXXXXXXXX,nobrl,uid=1000,gid=1000,iocharset=utf8
/etc/cont-init.d/01-config_yaml.sh: executing
Setting permissions for the config.yaml directory

Load environment variables from /config/addons_config/nextcloud-ocr/config.yaml if existing
If accessing the file with filebrowser it should be mapped to /homeassistant/addons_config/nextcloud-ocr/config.yaml
---------------------------------------------------------
Wiki here on how to use : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables

... no env variables found, exiting
/etc/cont-init.d/01-custom_script.sh: executing
Execute /homeassistant/addons_config/nextcloud-ocr/nextcloud-ocr.sh if existing
Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation
/etc/cont-init.d/01-folders.sh: executing
Setting user to 1000:1000
Updating permissions...
... Config directory : /data
... data directory detected : /share/nextcloud
... setting permissions
... done
 
/etc/cont-init.d/02-init_steps.sh: executing
/etc/cont-init.d/02-mariadb_discovery.sh: executing
/etc/cont-init.d/30-ssl.sh: executing
Using referenced ssl certificates
... checking if referenced files exist
... done
/etc/cont-init.d/99-add_packages.sh: executing
/etc/cont-init.d/99-elasticsearch.sh: executing
/etc/cont-init.d/99-ocr.sh: executing
/etc/cont-init.d/99-trusted_domains.sh: executing
 
Starting the upstream container
 
[migrations] started
[migrations] 01-nginx-site-confs-default: skipped
[migrations] 02-default-location: skipped
[migrations] done
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    1000
User GID:    1000
───────────────────────────────────────

using keys found in /data/config/keys
Initializing nextcloud 28.0.4.1 (this can take a while) ...
Setting permissions
Initializing finished
Starting...
/etc/cont-init.d/02-init_steps.sh: executing
Setting logs
 
----------------------------------------
 Nextcloud 28.0.4.1 is installed 
----------------------------------------
 
... checking for app updates
... Clean potential errors
Maintenance mode already disabled
... Remove CODE if installed as not compatible
... Define default_phone_region
System config value default_phone_region set to string DE
... Disabling check_data_directory_permissions
System config value check_data_directory_permissions set to boolean false
... disabling thumbnails
System config value enable_previews set to string false
/etc/cont-init.d/02-mariadb_discovery.sh: executing
    0 [>---------------------------]    0 [->--------------------------]---
MariaDB addon was found! It can't be configured automatically due to the way Nextcloud works, but you can configure it manually when running the web UI for the first time using those values :
Database user : service bashio::log.blue Database user : service
Database password : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Database name : nextcloud
Host-name : core-mariadb:3306
---
/etc/cont-init.d/99-add_packages.sh: executing
[09:23:32] INFO: Installing additional apps :
... inotify-tools
/etc/cont-init.d/99-elasticsearch.sh: executing
/etc/cont-init.d/99-ocr.sh: executing
/etc/cont-init.d/99-trusted_domains.sh: executing
[09:23:35] INFO: Currently set trusted domains :
192.168.xxx.xxx:8099
ha.mydomain.com
ha-dev.mydomain.com
[09:23:36] INFO: Trusted domains set in the configuration. Refreshing domains.
[09:23:36] INFO: ... removing previously added trusted domain (except for first one created)
System config value trusted_domains => 2 deleted
System config value trusted_domains => 3 deleted
System config value trusted_domains => 4 deleted
System config value trusted_domains => 5 deleted
[09:23:41] INFO: ... alignement with trusted domains list : ha.mydomain.com, ha-dev.mydomain.com
[09:23:41] INFO: ... adding ha.mydomain.com
System config value trusted_domains => 6 set to string ha.mydomain.com
[09:23:42] INFO: ... adding ha-dev.mydomain.com
System config value trusted_domains => 7 set to string ha-dev.mydomain.com
[09:23:43] INFO: Remaining configurated trusted domains :
[09:23:44] INFO: 192.168.xxx.xxx:8099
ha.mydomain.com
ha-dev.mydomain.com
 
Starting the upstream container
 
[custom-init] No custom files found, skipping...
crond: crond (busybox 1.36.1) started, log level 8
[ls.io-init] done.
[05-Apr-2024 09:23:45] NOTICE: fpm is running, pid 1406
[05-Apr-2024 09:23:45] NOTICE: ready to handle connections

Architecture

No response

OS

HAos

@dafunkydan dafunkydan added the bug Something isn't working label Apr 5, 2024
@alexbelgium
Copy link
Owner

Hi, I see the same issue on my instance but I think it is more due to nextcloud than the addon... Perhaps an incompatibility of version? I think you'd have more chance posting on their forum where they have seemed to have encountered that issue before : https://help.nextcloud.com/t/external-storage-support-cannot-be-enabled/120830

But anyway you don't really need it : you can use the /mnt/Subfolder folder as if it was a native folder - this app is only used if you want to mount the SMB drive from nextcloud

@alexbelgium
Copy link
Owner

According to this "https://www.reddit.com/r/NextCloud/comments/1bqf8wp/2804_error_this_app_cannot_be_enabled_because_it/" you could enable it manually by running occ app:enable files_external after going in the container using portainer. This link also confirms that it is not linked to the addon, but to the upstream container... Good luck!

@dafunkydan
Copy link
Author

Wow, Superfast! Thanks and sorry, i could (no, should!) have looked for the Containers Issues.
But now your Answers lead to more Questions ;-) If i may ask:

you can use the /mnt/Subfolder folder as if it was a native folder

I guess that doesnt work for me, using HAOS and having the Nextcloud Data Folder in /share/nextcloud/ ?
Even if i'd know how to, my /mnt/ appears to be empty.
Did i terribly overlook an Option in Nextcloud to add a custom folder on my HAos to a Nextcloud Users' Files? And how could i sync the Data to be shown (see below)?

I use your Nextcloud-Addon to give all Users at Home a centralized Drop / Pickup Structure. Now, my Scanner uploads Scans via FTP to an SMB-Share on my NAS. Users should be able to grab their Scans with just one Click, which is possible when using the Share-Link from Nextcloud, no matter what Device they use...

you could enable it manually by running occ app:enable files_external after going in the container using portainer.

So i need to wait :-D Or install the Addon Portrainer... mhmm...
While i might get this to work for this Case, i still would need to regulary trigger occ files:scan --path="/to/external/added/files/"
Is there a Way i can run the occ Command via Terminal or similar, so i can add it to my shell_command: in HomeAssistant and Trigger that whenever needed?

Thanks for your great Support and, by the Way, awesome Addon-Collection! Highly Appreciate it :-)

@alexbelgium
Copy link
Owner

Hello! Indeed if you want to use your external drive it would likely be more preferable that you restart from scratch, and directly use /mnt/subfolder/nextcloud as a data folder. This is how my own system is configured. I don't think nextcloud allows to add additional folders after initial config but I might be wrong...

Another way would be that you could have a script that periodically moves your files. For example, an automation that executes every 30 minutes a cp command so that everytime someone uploads to the folder it gets copied to a folder visible by nextcloud ? Usually I simply use the nextcloud app, which allows uploading directly to the nextcloud folders :-)

To run custom commands I don't think it's easy to do it from a shell_command as those run in the homeassistant container, while you would need to run it in the nextcloud container... The easiest way is to use my autoscript feature, that allows you to manually run commands when the addon starts : https://github.com/alexbelgium/hassio-addons/wiki/Add%E2%80%90ons-feature-:-customisation . As this is injected as addon start, it will also stay there even when updating the addon, which would not be the case if you modify the code directly using portainer. There is then two ways to run it regularly:

  • By restarting the addon : What I've done to trigger a backup of my files for example is embed a "cp -rnf /mnt/disk/* /mnt/backupdisk/*" in the startup script of one of my addon, and make an automation to restart this addon nightly. This allows the code to run nightly within the addon.
  • By cron : Of course here you would likely prefer a regular trigger, so the best way would be to use this code injection to create a cron job...

Hope this is helpful to you :-)

And thanks for the very kind words and appreciation !

@dafunkydan
Copy link
Author

Thank you so much for taking your Time and showing and explaining my Option!
As im still in the Phase of observing how it works with my system, i think ill keep the standard Setup by now. Sooner or later (maybe sooner :-D) ill start from scratch anyway, using a big ssd as storage.

The Hint with autoscript, and Options to run that is superhelpful! Thanks! Will give it a shot during the next Days...

I'll keep that Ticket open in Case something change.
I can just add: I restored the second last Version from an older Homeassistant-Backup. Indeed, with Nextcloud 28.0.3 there is no problem at all, i could add external Folders right away. In case somebody has the same Problems and an older Backup....

Thanks again mate! The only Problem with your great Addon-Collection: Too many Temptations. If id use all interesting ones it's surely screw my RPi... :-D

@alexbelgium
Copy link
Owner

Well downgrading for the moment is another one I hadn't thought of ;-) Glad it works again for you! Ah ah I see what you mean for the number of addons ; actually I've tried a lot but in the end only have a handful running all the time on my rpi4... But it's surprising how little resources most addons used once they have started!

@dafunkydan
Copy link
Author

The easiest way is to use my autoscript feature, that allows you to manually run commands when the addon starts : https://github.com/alexbelgium/hassio-addons/wiki/Add%E2%80%90ons-feature-:-customisation .

I feel really dumb, but could you point me to the right direction / path?
I would love to be able to perform sudo -u abc php occ files:scan --all at startup (and/or probably with a cronjob)
I refrain to post all variants i tried, so i dont spread wrong lines :-p
In the End i suspect i just dont know the correct path and dont know how to get it.
Always either getting Error : /etc/cont-init.d/01-custom_script.sh exiting 1 or it silently runs through, but added files simply dont show up :-(

It would be really awesome if you could give me an example of how to properly let nextcloud rescan during startup!

PS: Really great to know that even with rpi4 the addons dont consume that much! Too bad - now even more tempted for more addons :-D

@alexbelgium
Copy link
Owner

Hi,

To begin with, I've encoutered the same issue as you regarding the unability to install new apps. After investigating it is confirmed to be an upstream issue : linuxserver/docker-nextcloud#422 . To solve it I've installed portainer, then manually enabled additional apps using for example occ app:enable external for the "external" app

Regarding the usage of startup script, you probably should try with

echo "Scanning files"
sudo -u abc php /app/www/public/occ files:scan --all
echo "This is done !"

In theory it should work :-)

@dafunkydan
Copy link
Author

Again, Thank you so much for taking you Time! Although:

In theory it should work :-)

Practice speaks a different Language :-D I tried this command as well before, but without success :-(
Merely by accident i found out the following works for me, when i run it just in Homeassistants Terminal Window:

docker exec addon_db21ed7f_nextcloud_ocr sudo -u abc php /app/www/public/occ files:scan --all

But this need protection mode disabled, so not possible to integrate as shell_command, thus not really practical.
So to me it looks like while booting the addon, either php or that path isnt available already. I tried my Luck with ls and find, but no chance.
Do you have any ideas or advices what i could do?

@alexbelgium
Copy link
Owner

Mmh that's strange what is the error code? And the exact content of the file including header? Thanks!

I wonder if the code is running before occ is started... If yes then you could try :

#!/usr/bin/with-contenv bashio

# Runs only after initialization done
# shellcheck disable=SC2128
if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi

echo "Scanning files"
sudo -u abc php /app/www/public/occ files:scan --all
echo "This is done !"

@dafunkydan
Copy link
Author

I wonder if the code is running before occ is started

Based on my very little no none knowledge, i have the feeling it running way too early.
What i tried via addons_autoscripts\nextcloud-ocr.sh, and what i got in log when Restarting the Addon:

  • sudo -u abc php /app/www/public/occ files:scan --all
    Could not open input file: /app/www/public/occ
    Error : /etc/cont-init.d/01-custom_script.sh exiting 1
  • ls /app/www/public/
    ls: cannot access '/app/www/public/': No such file or directory
    Error : /etc/cont-init.d/01-custom_script.sh exiting 2
  • ls /app/www/
    src
  • if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi
    cp: cannot stat '/etc/cont-init.d/nextcloud-ocr.sh': No such file or directory

@alexbelgium
Copy link
Owner

alexbelgium commented Apr 10, 2024

Hi, sorry I wrote that code from my couch without testing it :-) Here is a code tested as working :

#!/usr/bin/with-contenv bashio
# shellcheck shell=bash

#################
# CODE INJECTOR #
#################

# Any commands written in this bash script will be executed at addon start
# See guide here : https://github.com/alexbelgium/hassio-addons/wiki/Add%E2%80%90ons-feature-:-customisation

# Runs only after initialization done
# shellcheck disable=SC2128
mkdir -p /scripts
if [ ! -f /app/www/public/occ ]; then cp /config/addons_autoscripts/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi

echo "Scanning files"
sudo -u abc php /app/www/public/occ files:scan --all
echo "This is done !"

@dafunkydan
Copy link
Author

Awesome, yes its working Great and instantly!
I wish i would have as much as Knowledge. Thank you so much for helping me out there! 👍 👍

For Reference: If somebody is looking for a Way to do file Operations directly in the Nextcloud Data Folder, and to make them visible in Nextcloud via syncing - this is your Copy, Paste and Restart Addon Solution 💯

Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Element will be closed automatically label Apr 15, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 18, 2024
@alexbelgium alexbelgium reopened this Apr 18, 2024
@alexbelgium alexbelgium changed the title 🐛 [Nextcloud] External Storage Support not possible 🐛 [Nextcloud] latest upstream version does not allow to install apps Apr 18, 2024
@github-actions github-actions bot removed the stale Element will be closed automatically label Apr 19, 2024
@alexbelgium
Copy link
Owner

Hi, relevant PR upstream that should fix it : nextcloud/server#44939

@litinoveweedle
Copy link

There seems to be also fix by changing proxy configuration:

nextcloud/server#44685 (comment)

@alexbelgium
Copy link
Owner

There seems to be also fix by changing proxy configuration:

nextcloud/server#44685 (comment)

thanks ! I'm using the linuxserver's upstream proxy configuration so it's not really easy to inject it without breaking things. I've tried using portainer and reloading nginx but it didn't yield positive results...

@litinoveweedle
Copy link

thanks ! I'm using the linuxserver's upstream proxy configuration so it's not really easy to inject it without breaking things. I've tried using portainer and reloading nginx but it didn't yield positive results...

I didn't test it myself, so I can't neither confirm nor deny it.

Is it really so hard to inject the change like this into upstream docker?

@litinoveweedle
Copy link

litinoveweedle commented Apr 25, 2024

I would propose to fix it very easily - apply this simple commit in the Docker file.

nextcloud/server@0f450d7

it is as simple like patch -p ;-) Or if you not not like patch then sed or awk.

sed 's|return api.get(generateUrl('apps/files'))|return api.get(generateUrl('apps/files/'))|g' apps/settings/src/store/apps.js

@alexbelgium
Copy link
Owner

alexbelgium commented Apr 25, 2024

isn't the upstream app compiled which would prevent this ? If I do find / -name apps.js in portainer from the Nextcloud container I don't find any hits.

@litinoveweedle
Copy link

litinoveweedle commented Apr 25, 2024

Compile php app???

see: https://github.com/linuxserver/docker-nextcloud/blob/master/Dockerfile

 echo "**** install nextcloud ****" && \
  mkdir -p \
    /app/www/src/ && \
  if [ -z ${NEXTCLOUD_RELEASE+x} ]; then \
    NEXTCLOUD_RELEASE=$(curl -sX GET https://api.github.com/repos/nextcloud/server/releases \
      | jq -r '.[] | select(.prerelease != true) | .tag_name' \
      | sed 's|^v||g' | sort -rV | head -1); \
  fi && \
  curl -o \
    /tmp/nextcloud.tar.bz2 -L \
    https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_RELEASE}.tar.bz2 && \
  tar xf /tmp/nextcloud.tar.bz2 -C \
    /app/www/src --strip-components=1 && \
  rm -rf /app/www/src/updater && \
  mkdir -p /app/www/src/data && \
  chmod +x /app/www/src/occ && \
  echo "**** cleanup ****" && \
  rm -rf \
    /tmp/*

This is copy paste from linuxserver Docker file. So whole Nextcloud is unpack into /app/www/src

@alexbelgium
Copy link
Owner

alexbelgium commented Apr 25, 2024

well the file for sure isn't there ;-) but given that you seen quite knowledgeable I guess you have already applied it to your own system using terminal or portainer !

grep -rl "generateUrl('apps/files')" /app also only provides one hit, which is /app/www/public/dist/settings-vue-settings-apps-users-management.js.map

@litinoveweedle
Copy link

Nope, that is not how it works.

You you upstream Docker image is from from linuxsever.io - I see something like: FROM ${BUILD_FROM}${BUILD_UPSTREAM} in you Docker file https://github.com/alexbelgium/hassio-addons/blob/master/nextcloud/Dockerfile where you build.json is

{
  "build_from": {
    "aarch64": "lscr.io/linuxserver/nextcloud:arm64v8-",
    "amd64": "lscr.io/linuxserver/nextcloud:amd64-"
  },
  "codenotary": {
    "signer": "[email protected]"
  }
}

You can't change directly content of the that existing upstream Docker image, but you can change/extend it in you Docker layer. So if you patch given file at place using your Docker file, it will add extra layer with the corrected file. So the command I am referring to shall be put into your Docker file.

@alexbelgium
Copy link
Owner

alexbelgium commented Apr 25, 2024

I don't understand - the linuxserver Dockerfile does not uses the nextcloud server git tree but the release file https://download.nextcloud.com/server/releases/nextcloud-28.0.5.tar.bz2. When I download and extract the file, there is no apps.js file ; which is the same result as searching for the file in the container given than this release is extracted to /app/www/src.

There is no additional files in the docker layer so don't see how performing this in the Dockerfile changes the output ?

@alexbelgium
Copy link
Owner

Well, that's the great part of github - learning together while achieving useful things both for oneselves and others ;-) the addon is still restarting - my system isn't fast

@litinoveweedle
Copy link

Yep, as I am afraid that single function in src is on many more places...

# nextcloud$ grep -R 'apps/files' * | wc -l 
174

@alexbelgium
Copy link
Owner

alexbelgium commented Apr 25, 2024

argh... I'll try a grep -R 'apps/files' /app/www/src | xargs sed -i "s|apps/files|apps/files/|g" but I fear that for the moment the best way is to activate manually the apps through the command line or my script (#1333 (comment))

I tried to avoid reverting to a previous nexctloud version as I fear that it might cause issues in the database...

@litinoveweedle
Copy link

Not all are javascripts, only those

# nextcloud$ grep -R -l 'apps/files' * | grep '.js'
apps/files_pdfviewer/js/files_pdfviewer-public.js.map
apps/files_pdfviewer/js/files_pdfviewer-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-DBGB1Rec_mjs.js
apps/files_pdfviewer/js/files_pdfviewer-main.js
apps/files_pdfviewer/js/files_pdfviewer-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-DBGB1Rec_mjs.js.map
apps/files_pdfviewer/js/files_pdfviewer-main.js.map
apps/files_pdfviewer/js/files_pdfviewer-public.js
apps/bruteforcesettings/js/bruteforcesettings-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-DBGB1Rec_mjs.js
apps/bruteforcesettings/js/bruteforcesettings-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-DBGB1Rec_mjs.js.map
apps/files_sharing/js/public.js
apps/files_sharing/openapi.json
apps/federatedfilesharing/js/external.js
apps/files_trashbin/openapi.json
apps/files_reminders/openapi.json
apps/viewer/js/viewer-main.mjs.map
apps/viewer/js/viewer-main.mjs
apps/files_downloadlimit/js/files_downloadlimit-admin.mjs
apps/files_downloadlimit/js/files_downloadlimit-admin.mjs.map
apps/files_downloadlimit/js/files_downloadlimit-main.mjs
apps/files_downloadlimit/js/files_downloadlimit-main.mjs.map
apps/text/js/vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-DM4uLuEW_mjs-node_modules_nextc-b13f7b.js.map
apps/text/js/vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-DM4uLuEW_mjs-node_modules_nextc-b13f7b.js
apps/files_external/js/settings.js
apps/files_external/openapi.json
apps/notifications/js/notifications-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-ClzJbciL_mjs.js.map
apps/notifications/js/notifications-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-ClzJbciL_mjs.js
apps/photos/js/photos-vendors-node_modules_nextcloud_upload_node_modules_nextcloud_dialogs_dist_chunks_FilePicker-0-aee94f.js
apps/photos/js/photos-node_modules_vue-material-design-icons_ArrowLeft_vue-src_views_Timeline_vue.js
apps/photos/js/photos-vendors-node_modules_nextcloud_upload_node_modules_nextcloud_dialogs_dist_chunks_FilePicker-0-aee94f.js.map
apps/photos/js/photos-node_modules_vue-material-design-icons_ArrowLeft_vue-src_views_Timeline_vue.js.map
apps/files_versions/openapi.json
apps/privacy/js/privacy-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-DBGB1Rec_mjs.js.map
apps/privacy/js/privacy-vendors-node_modules_nextcloud_dialogs_dist_chunks_FilePicker-DBGB1Rec_mjs.js
apps/privacy/js/privacy-main.js.map
apps/privacy/js/privacy-main.js
apps/files/js/filelist.js
apps/files/js/tagsplugin.js
apps/files/js/recentfilelist.js
apps/files/js/files.js
apps/files/js/app.js
apps/files/openapi.json
core/js/tests/specs/coreSpec.js
core/js/tests/specHelper.js
dist/files_external-init.js
dist/settings-vue-settings-apps-users-management.js.map
dist/files_sharing-personal-settings.js
dist/files_sharing-additionalScripts.js.map
dist/files_sharing-main.js.map
dist/core-unified-search.js.map
dist/9558-9558.js
dist/files-main.js.map
dist/files_reminders-init.js
dist/files_sharing-init.js.map
dist/files-init.js.map
dist/files_versions-files_versions.js
dist/files_sharing-files_sharing_tab.js.map
dist/files_sharing-collaboration.js.map
dist/files_trashbin-main.js.map
dist/7560-7560.js
dist/4997-4997.js.map
dist/files-init.js
dist/files_sharing-init.js
dist/files-personal-settings.js
dist/files-main.js
dist/files_reminders-init.js.map
dist/files_external-init.js.map
dist/files_sharing-additionalScripts.js
dist/files_trashbin-main.js
dist/systemtags-init.js.map
dist/files-personal-settings.js.map
dist/files_sharing-personal-settings.js.map
dist/4997-4997.js
dist/files-search.js.map
dist/7560-7560.js.map
dist/files-reference-files.js.map
dist/files-sidebar.js
dist/files_versions-files_versions.js.map
dist/core-unified-search.js
dist/settings-vue-settings-apps-users-management.js
dist/files-reference-files.js
dist/files-sidebar.js.map
dist/settings-vue-settings-apps-users-management.js.map.ptched
dist/core-main.js.map
dist/9558-9558.js.map

@litinoveweedle
Copy link

litinoveweedle commented Apr 25, 2024

BUT beware, this are not the issues! just check some of them, they are completely fine, having inside strings like.

		/**
		 * @type UserConfig
		 * @see /apps/files/lib/Service/UserConfig.php
		 */
		_filesConfig: undefined,

I really think, that that fix is only where the original nextcloud commit has:

return api.get(generateUrl('apps/files'))

and that seems to be only at one place - the one you already fixed:

# nextcloud$ grep -R -l "generateUrl('apps/files')" *
dist/settings-vue-settings-apps-users-management.js.map

and correspondig minified dist/settings-vue-settings-apps-users-management.js:

grep -R -l '"apps/files"' *
dist/settings-vue-settings-apps-users-management.js

So to my best knowledge it shall be working...

@litinoveweedle
Copy link

litinoveweedle commented Apr 25, 2024

Could it be caching? OP server cache is only IMHO for PHP, so browser cache?

and one more question, is the file path in sed correct?

@alexbelgium
Copy link
Owner

alexbelgium commented Apr 25, 2024

yes I've checked using portainer that the files are modifed and I've tried in incognito mode to avoid the cache ; I'll try again tomorrow but don't see what else to do

For sure the file is used though - if I delete it then the apps page doesn't work anymore

@litinoveweedle
Copy link

litinoveweedle commented Apr 26, 2024

I reported our failed backport attempt to the related Nextcloud upstream issue. Meanwhile we can try to focus on the second proposed fix.

Fix needs to be applied to this nginx conf into following block:

/defaults/nginx/site-confs/default.conf

    # Support for the Client Push (notify_push) plugin, needs mod installed https://github.com/linuxserver/docker-mods/tree/nextcloud-notify-push
    location ^~ /push/ {
        proxy_pass http://127.0.0.1:7867/;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }

to become this:

    # Support for the Client Push (notify_push) plugin, needs mod installed https://github.com/linuxserver/docker-mods/tree/nextcloud-notify-push
    location ^~ /push/ {
        proxy_pass http://127.0.0.1:7867/;
        proxy_redirect http://$host https://$host;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
    }

Due to S6 init system, I am afraid, that you will not be able to modify nginx site config for testing at place via portainer, as you will not be able to restart nginx after file modification (and probably whole container will be restarted and change lost - but you can try it). If not possible we will need to overwrite the /defaults/nginx/site-confs/default.conf in your Docker file.

If we will succeed we can prepare PR for linuxserver.io upstream an temporarily overwrite file it in own Docker file, till it will be fully fixed in Nexcloud and/or Linuxserver upstreams;-)

@alexbelgium
Copy link
Owner

alexbelgium commented Apr 26, 2024

Hi, thanks! to reload the config from portainer you need to do nginx -s reload I'll test that a bit later

We'll have to make this line dependent on whether ssl is enabled or not btw

@litinoveweedle
Copy link

Any news?

@frb01
Copy link

frb01 commented Apr 30, 2024

Bonjour, comment faire pour installer une version précédente afin de pouvoir éviter ce soucis ?

@alexbelgium
Copy link
Owner

Hélas il est peu recommandé de revenir sur des versions précédentes de Nextcloud, car cela peut causer des problèmes de corruption de database... La solution la plus simple a court terme est d'éviter d'utiliser ssl car le problème de base est sur la redirection https -> http ; sinon je vais tenter de regarder mais cela ne dois pas être évident à faire car l'issue est ouverte depuis un moment sur nextcloud : nextcloud/server#44685

@frb01
Copy link

frb01 commented May 1, 2024

Merci pour ton retour rapide Alexbelgium ;), dans mon cas, la base de données est plus que light car c'est une installation de zéro donc je voulais commencer avec une version précédente mais est-ce possible ?

@alexbelgium
Copy link
Owner

a priori j'ai la solution dans 1h ce sera bon

@litinoveweedle
Copy link

Sorry guys, my Klingon is little bit rusty, would you please prefer to speak UN galactic standard?

@frb01
Copy link

frb01 commented May 1, 2024

Bonsoir Alexbelgium, j'avais juste une petite question. J'ai branché un second disque ssd (sdb1) sur mon raspberry5 (le 1er (sda1), c'est le système) et je voulais que les données et stockage nextcloud soient sur le second disque. J'ai donc monté le disque sur share/nextcloud mais je retrouve mon sda1 en premier dans nextcloud et l'autre en second. Si je le monte sur /mnt/dossier/nextcloud (en prenant soin de monté le sdb1 sur ce chemin), il refuse l'installation. Pourtant, j'ai mis sdb1 dans localdisk et en ssh "chmod 777 /mnt/dossier/nextcloud rwxrwxrwx. Je ne vois pas le soucis ?

@litinoveweedle
Copy link

Ok, you probably didn't get the message. So I will try to explain in more straightforward way.

It is rude to start switch to other language that the one in which given topic is discussed. It is rude because you automatically expect that other people who cooperate on the issuse will now start using translator just to overcome your inabilities.

So thank you, that next time you will try to use English.

Ok, vous n'avez probablement pas compris le message. Je vais donc essayer de vous expliquer de manière plus simple.

Il est impoli de commencer à passer à une autre langue que celle dans laquelle le sujet donné est abordé. C'est impoli car vous vous attendez automatiquement à ce que d'autres personnes qui coopèrent sur le problème commencent désormais à utiliser un traducteur juste pour surmonter vos incapacités.

Alors merci, la prochaine fois, vous essaierez d'utiliser l'anglais.

@alexbelgium
Copy link
Owner

Hi, could you please confirm if the issue is solved with latest update? At least on my system it does, thanks

@senna1992
Copy link

According to this "https://www.reddit.com/r/NextCloud/comments/1bqf8wp/2804_error_this_app_cannot_be_enabled_because_it/" you could enable it manually by running occ app:enable files_external after going in the container using portainer. This link also confirms that it is not linked to the addon, but to the upstream container... Good luck!

i can confirm this is workaround working!

@alexbelgium
Copy link
Owner

alexbelgium commented May 3, 2024

The latest version works i'll close this except if someone still has the same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants