-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
[regression] symlinked apps and CSS - ResourceLocator can not find a web root #13556
Comments
Ref #10437 |
This also happens with the Cloudron app package with Nextcloud version 16.0.0 |
Confirming that this remains an issue in the v16 release series. It affects the new text app (nextcloud/text#157) I believe this is the same issue that's being discussed over on the snap here: nextcloud-snap/nextcloud-snap#902. @juliushaertl stated in nextcloud-snap/nextcloud-snap#902 (comment):
|
Please fix this issue finally! That issue is very annoying and now also affects the usability (especially when enabling the dark mode through accessibility settings. If doing so there are a lot of icons missing in many apps (also in nextcloud_files). |
I think these are also the same error: |
Symlink is resolved to early. findWebRoot method tries to determinate the webroot from the path. Nextcloud is installed to /home/nextcloud and the apps are in /home/nextcloud-apps. /home/nextcloud/apps2 is a symlink to /home/nextcloud/apps2. Its possible to detect the webroot for /home/nextcloud/apps2 but not /home/nextcloud-apps. This one is the faulty commit b0d2966 |
I'm not sure that's accurate given that the commit you reference is very old (it's what fixed things back in v12). Behavior around it might have changed in order to cause this regression, though. |
That's right! I'm sorry my statement was misleading.
I think so. Could you check if it works for snap without realpath? |
Summoning our experts here: @skjnldsv @juliushaertl :) @skjnldsv suspects it's just a debug log accidentally logged as error. |
I don't think so as i mentioned in nextcloud/text#187 |
@skjnldsv Could you specify what kind if info is missing here? :) |
@skjnldsv I can also confirm the missing toolbar buttons as a result of this problem, and I also have Nextcloud installed via snap. @georgehrke, thank you for pointing the experts here! As for the info requested, okay, I think this is everything we know about this issue so far, gathered from this and related issues: @szaimen posted a screenshot of the missing buttons in the new text app here: @juliushaertl has said this server issue is the cause of the problem, also explaining why it's not just a bug in the logger:
It is an issue with many apps for anyone using Nextcloud via snap, as is being discussed here: @kyrofa, the snap maintainer, has said it's not a problem that the snap can fix:
@Daryes ,the OP, has stated this was fixed in a previous version of Nextcloud but has re-presented itself.
Here are some examples of the apps that have problems: @juliushaertl has given some guidance on where the problem may lie:
As for how many people are affected by this, @jospoortvliet noted the last time something similar was fixed in 2017 that many thousands use Nextcloud via snap:
|
It's around 30k today, ignoring folks using similar configurations outside the snap (like the OP). |
@georgehrke Julius's input :) |
Well currently the insight given in the text ticket which @the-sane has quoted is all I have. I didn't have time to look further into it or setup a test system with this special setup. |
@juliushaertl I know you're all focused on the v17 beta right now, so please let me know if there's any information that I can provide from my own install that would help here. |
Any news? I'm still having this issue. |
Using Snap on Ubuntu 18.04 ResourceLocator can not find a web root (root: /var/snap/nextcloud/16739/nextcloud/extra-apps/spreed, file: index.php/css/spreed/41bb-1b6e-merged-files.css?v=xxxxxxxxxxx, webRoot: , throw: true) errors in log for Snap v15.0.11 (15910) also in (15565) |
@juliushaertl could really use some help here, it's simply been a log annoyance for several major releases but it negatively impacts the text app (as mentioned by @the-sane here) which is default in v17, thus blocking the snap's update to v17. |
This comment has been minimized.
This comment has been minimized.
I wrote a patch to fix the |
@kesselb you're exactly correct.
Sure thing,
Unpack it:
And then you can "try" it instead of installing it, which is a developer tool for essentially installing it read/write from the "unpacked" directory you just created:
Now the snap is installed and listening on localhost:80, but you can modify Note that I don't develop against Nextcloud that way, though, I typically just setup a similar config. |
server/core/Controller/SvgController.php Lines 99 to 105 in 05381f0
Fails.
Hmm. I don't see the reason for
cc @juliushaertl @skjnldsv @rullzer does that make sense? 🤔 Smoke test looked good to me. I don't have time next week to create a pull request and look into the tests 🙈 |
A note as a user: While fixing the actual problem is obviously more important, those ResourceLocator errors are extremely annoying and have made our logs entirely unreadable. Nearly every app installed produces at least one of those errors every time a page is accessed. |
That sounds very familiar to the issue in the JS and CSS resource locator back in the day (fix here). Your patch also looks similar to the theming fix. |
Made the web root detection work with https://gist.github.com/kesselb/d035c4a7334b155143686466370bc1eb but the generated path for the resources is wrong. I assume that for scss files the webRoot is not relevant. SCSS file is compiled and served by
|
Thanks for working on this, all, been following this and related issues for some time. Anyway, sorry for the dumb question but: I was interested in trying this as well, but... just wanted to clarify: is applying the inlined patch by itself intended to be what is tested, or should the gist patch be used as well? Thanks again and I'll of course report if I find anything useful but so far I've been quiet as I've only found ways to not solve my variant of the issue 😸 . |
Good question, I took a crack at applying the changes here (just the ones given here, not the gist), but at least at first blush it doesn't appear to work. I need to test some more. |
No. Only the patches in this thread: #13556 (comment) & #13556 (comment)
More digging ;)
I checked the setup from post 1 #13556 (comment) and the snap package #13556 (comment) Feel free to use the original code and something like below. Change the loglevel in
|
It was my soluition to get rid of this logs, after this my log is readable. You can make a cronjob to clear the nextcloud.log file. Example: |
I'm loathe to admit that I apparently didn't fully understand this issue and how it impacted the text app. I missed two key points:
@the-sane finally hammered those two points home, and I realize now that these patches DO work @kesselb. Ship them! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
#19084 is merged |
@kyrofa I have noticed that syncing my calendar with Emacs org-mode has stopped working. I suspect this issue. I'm using org-caldav, which has worked nicely for a long time, but lately am getting this:
Using nextcloud snap on ubuntu 18.04:
Will this fix be coming soon to the snap? Or is it already in, and I have a different problem? Thanks for your work on this, BTW. The snap is a hugely convenient way to get a nextcloud server up and running. |
@ddoherty03 looks like #19084 won't be backported to v18, so it's not in the snap you have installed. However, I'd be a bit surprised if that was your issue. This has been a problem for a long time, so if something suddenly stopped working I suspect you have unrelated issues. |
Ok. Thanks, @kyrofa . |
can people please try if https://github.com/nextcloud/server/pull/22550/files solves the issue for them? |
Just applied, seems good at first glance, no more log warnings, and no problem in the UI, BTW, as I'm not using snap for Nexcloud, I can't speak for it. |
This appears to still be an issue, or at least something related?
As you can see, I have my apps directory stored in Had to do this in order to use the Files app (everything else seemed to work fine though, including Photos...), otherwise I got an Internal Server Error (what led me to find the log entry). Nextcloud 21.0.2 on Fedora 34 if it matters. |
Seems to be the same problem as #5057 and others simlar.
Given the logs, it seems this was fixed in 12.x, but a change somewhere later removed the fix partially. I can go back to at least v13.0.1.1, up to 15.0.2.0
Currently, the apps work fine, while stored in a different dir symlinked back to the nextcloud main directory. But each time a user access them in the UI, an entry is generated in the log with an access error to a css file.
Steps to reproduce
/server/websites/nextcloud/nextcloud-<version>/
/server/websites/nextcloud/conf/apps2/
ln -s /server/websites/nextcloud/nextcloud-<version> /server/websites/nextcloud/nextcloud
ln -s /server/websites/nextcloud/conf/apps2 /server/websites/nextcloud/nextcloud/apps2
Expected behaviour
no warning in the logs
Actual behaviour
these entries in the log, one for each application under a symlink in the path, each time a user selects the application panel in his browser. Given the filename, I suppose this is automatically generated, as nothing like this exists physically.
Server configuration
Operating system: Ubuntu 18.04
Web server: Apache 2.4
Database: Mariadb 10.3
PHP version: PHP 7.2.14
Nextcloud version: 15.0.2.0
Updated from an older Nextcloud/ownCloud or fresh install: upgraded from 14.0.4
Where did you install Nextcloud from: : tar.gz from nextcloud.com
The text was updated successfully, but these errors were encountered: