Giter Site home page Giter Site logo

Comments (51)

alexbelgium avatar alexbelgium commented on June 2, 2024 1

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

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024 1

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!

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024 1

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 !

from hassio-addons.

dafunkydan avatar dafunkydan commented on June 2, 2024 1

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

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024 1

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 :-)

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024 1

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 !"

from hassio-addons.

dafunkydan avatar dafunkydan commented on June 2, 2024 1

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 💯

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 2024 1
wget https://download.nextcloud.com/server/releases/latest.zip
unzip latest.zip
cd nextcloud/
grep -R "return api.get(generateUrl('apps/files'))" *
> dist/settings-vue-settings-apps-users-management.js.map
....
garbage one line output here...

So yep, it seem that source js is minified...

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 2024 1

I'll try to use this file on my instance at boot to check if it works
As there are two files!

dist/settings-vue-settings-apps-users-management.js

and

dist/settings-vue-settings-apps-users-management.js.map

Based on my knowledge minified file would be used. So to be safe you need to modify both.

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 2024 1

Based on my knowledge minified file would be used. So to be safe you need to modify both.

I was wrong

you need to edit:

settings-vue-settings-apps-users-management.js

and replace string "apps/files" by "apps/files/"

The map file is just kind of optional to modify.

this is how it look in the minified code:

(e.commit("startLoading",n),e.commit("startLoading","install"),v((0,p.Jv)("settings/apps/enable"),{appIds:n,groups:i}).then((r=>(e.commit("stopLoading",n),e.commit("stopLoading","install"),n.forEach((t=>{e.commit("enableApp",{appId:t,groups:i})})),g((0,p.Jv)("apps/files")).then((()=>{r.data.update_required&&((0,c.cf)(t("settings","The app has been enabled but needs to be updated. You will be redirected to the update page in 5 seconds."),{onClick:()=>window.location.reload(),close:!1}),setTimeout((function(){location.reload()}),5e3))})).cat

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 2024 1

No worry, I don't know anything about JS either, just quick googled info. :-)

echo "Modifying source"
sed -i 's|apps/files|apps/files/|g' /app/www/src/dist/settings-vue-settings-apps-users-management.js.map
sed -i 's|apps/files|apps/files/|g' /app/www/src/dist/settings-vue-settings-apps-users-management.js

Yep, this modified version should do the trick.

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 2024 1

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

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

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 2024 1

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

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 2024 1

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...

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024 1

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

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024 1

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

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 2024 1

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

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 2024 1

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.

from hassio-addons.

senna1992 avatar senna1992 commented on June 2, 2024 1

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!

from hassio-addons.

dafunkydan avatar dafunkydan commented on June 2, 2024

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 :-)

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024

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!

from hassio-addons.

dafunkydan avatar dafunkydan commented on June 2, 2024

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

from hassio-addons.

dafunkydan avatar dafunkydan commented on June 2, 2024

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?

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024

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 !"

from hassio-addons.

dafunkydan avatar dafunkydan commented on June 2, 2024

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

from hassio-addons.

github-actions avatar github-actions commented on June 2, 2024

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.

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024

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

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 2024

There seems to be also fix by changing proxy configuration:

nextcloud/server#44685 (comment)

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024

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...

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 2024

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?

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 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

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 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.

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 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

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 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

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 2024

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.

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 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 ?

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024

I'll try to use this file on my instance at boot to check if it works

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 2024

BTW minification is not compilation. It is stripping of unnecessary characters. Don't ask me why someone doing it. ;-p

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024

Thanks ! Indeed as you see I don't know js much ;-)

I've a system to inject scripts at boot (https://github.com/alexbelgium/hassio-addons/wiki/Add%E2%80%90ons-feature-:-customisation) ; I'm currently trying it by adding the following script in /homeassistant/addons_autoscripts/nextcloud-ocr.sh

If it works indeed I'll add it to the Dockerfile and push a new version

#!/usr/bin/with-contenv bashio
echo "Modifying source"
sed -i 's|apps/files|apps/files/|g' /app/www/src/dist/settings-vue-settings-apps-users-management.js.map
sed -i 's|apps/files|apps/files/|g' /app/www/src/dist/settings-vue-settings-apps-users-management.js

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024

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

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 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...

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 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?

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 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;-)

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 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

from hassio-addons.

litinoveweedle avatar litinoveweedle commented on June 2, 2024

Any news?

from hassio-addons.

frb01 avatar frb01 commented on June 2, 2024

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

from hassio-addons.

frb01 avatar frb01 commented on June 2, 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 ?

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024

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

from hassio-addons.

frb01 avatar frb01 commented on June 2, 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 ?

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024

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

from hassio-addons.

alexbelgium avatar alexbelgium commented on June 2, 2024

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

from hassio-addons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.