Nextcloud-snap: ResourceLocator can not find a web root on several extensions

Created on 19 Feb 2019  路  29Comments  路  Source: nextcloud/nextcloud-snap

Server configuration

Operating system: Ubuntu 18.04.2

Nextcloud version: 15.0.2

Updated from an older Nextcloud/ownCloud or fresh install: Upgraded from 14.0.6

Where did you install Nextcloud from: Snappy

Are you using external storage, if yes which one: Using S3 as primary storage

Are you using encryption: no

Client configuration

Browser: Mozilla Firefox 65 and Google Chrome 72

Operating system: Linux (Ubuntu/Fedora) and Windows 10

Logs

Nextcloud error logs


Error log: Talk/Spreed

[lib] Error: ResourceLocator can not find a web root (root: /var/snap/nextcloud/11336/nextcloud/extra-apps/spreed, file: index.php/css/spreed/656a-c5cf-merged-files.css?v=f7fbce5eca1c766bdf8f93c3337c21ac, webRoot: , throw: true)

GET /index.php/apps/files/
from  200.00.200.200 by [email protected] at 2019-02-18T16:11:30-05:00


Error log: Calendar

[lib] Error: ResourceLocator can not find a web root (root: /var/snap/nextcloud/11336/nextcloud/extra-apps/calendar, file: index.php/css/calendar/029b-c5cf-app.min.css?v=f7fbce5eca1c766bdf8f93c3337c21ac, webRoot: , throw: true)

GET /index.php/apps/calendar/
from  200.00.200.200 by [email protected] at 2019-02-18T14:17:03-05:00


Error log: Deck

[lib] Error: ResourceLocator can not find a web root (root: /var/snap/nextcloud/11336/nextcloud/extra-apps/deck, file: index.php/css/deck/7822-c5cf-style.css?v=f7fbce5eca1c766bdf8f93c3337c21ac, webRoot: , throw: true)

GET /index.php/apps/deck/
from 200.00.200.200 by [email protected] at 2019-02-18T13:50:15-05:00

upstream

Most helpful comment

Thanks for this, @asadana. We had to fix a bug in upstream Nextcloud for this a while back, I think various apps have the bug as well.

All 29 comments

Possible duplicate of #625.

~Spreed/Talk has had much more frequent errors than other two. Basically any use of Talk spawns these errors. Calendar and deck errors are more sparsely seen.~

I am actually seeing an error from each of the three whenever tab is opened for that extension.

Thanks for this, @asadana. We had to fix a bug in upstream Nextcloud for this a while back, I think various apps have the bug as well.

Can confirm, this happens to me too.
Additionally to the already listed apps the error also occurs for the collabora app.

Please tell the individual apps about this, these are bugs in the apps, not the snap.

confirm - same issue with Talk/Spreed

This should not be a bug in the apps, but in the way the config.php in the snap is.
It looks like the given webroot for the app directories is not correct/reachable from the web

@nickvergessen we've dealt with this issue in the past in upstream Nextcloud (and upstream apps), for example:

Nothing has changed in the snap to cause this (the config has always been the same), which leads me to suspect the apps themselves, unless something broke in Nextcloud itself again.

It looks like the given webroot for the app directories is not correct/reachable from the web.

If that was true no app would work. See this and this. These apps are making assumptions that are only valid for a subset of possible Nextcloud configs (a subset that seemingly does not include the one we use, and have used from the beginning).

since devs can't agree on where the problem lies, it sounds like this will never get fixed in some apps. is it just cosmetic?

This problem has been around for more than a year, really can't fix it?

I've tried to give guidance on how to fix it :man_shrugging: .

The dropit app I referenced above seems to function just fine despite this error being spammed in my logs. For us as users, does that mean the error is inconsequential or is there some side effect that I'm just not seeing?

In https://github.com/nextcloud/spreed/issues/1615 , @nickvergessen definitively says it is not an issue with the talk app and points to the snap or how the server repo loads apps. @kyrofa definitively says it isn't the snap. Is there anything we can do to try to pinpoint the problem and get it in front of the right devs?

For us as users, does that mean the error is inconsequential or is there some side effect that I'm just not seeing?

First, a note that I am also a user. I also see these annoying messages in my logs. However, I also have noticed no ill effects, which is why I haven't taken it upon myself to fix these issues, regardless of what is causing them. I assure you I would, otherwise (as I have done for exactly this issue in the past).

If someone wants to take it upon themselves to get to the bottom of this, we'd all appreciate it I'm sure. The path I've taken in the past is to install Nextcloud on its own, without the snap, but with a config similar to the snap's. Specific details are given here. Once you have that put together, you should be able to reproduce the issue. If so, you can literally start printing stuff out or putting things in the logs until you get to the bottom of where the code is going and why.

I appreciate the info, thank you!

This is most likely an issue of https://github.com/nextcloud/server/blob/0eebff152a177dd59ed8773df26f1679f8a88e90/lib/private/Template/ResourceLocator.php#L128 that doesn't detect the webroot properly if the apps directory is in a different place.

This is most likely an issue of https://github.com/nextcloud/server/blob/0eebff152a177dd59ed8773df26f1679f8a88e90/lib/private/Template/ResourceLocator.php#L128 that doesn't detect the webroot properly if the apps directory is in a different place.

Nice to know and how can that be resolved? This issue is very annoying...

Indeed, that setup is very similar to how the snap does things, and those log warnings are of course the same. I'd be willing to bet that it is the same issue.

So it turns out this may be more than just a cosmetic logging issue. I didn't realize that the new text app was missing an entire toolbar for me until I saw the comment here:
https://github.com/nextcloud/text/issues/187#issuecomment-514387337

That toolbar is missing in both the default and dark themes for me though.

@kyrofa, you had mentioned you would like to know if the bug starts causing actual problems. I tagged you in a summary post over on the server issue, but here's the stuff that may be relevant to us for the text app in particular. The discussion begins at this comment:
https://github.com/nextcloud/text/issues/187#issuecomment-514609669

I don't know if this is related, but i can't use the Nextcloud Talk for Android app, with many log lines like these one using this Snap (it just displays a loading animation).

No problem using a "manually" installed Nextcloud+Talk app.

@the-sane I'm sorry for the delay-- thank you for tagging me over there, and for the very helpful comment.

v17 has been released and has made the new text editor the default for all installs. Due to the broken toolbar we'd experience, this should probably be sorted out before pushing it to stable. I assume we have a good month or so before that would normally happen anyway with a point release.

Thanks for the heads up, @the-sane, I agree.

Hi,
I am receiving the same error whenever I change the tab between different apps:
ResourceLocator can not find a web root (root: /var/snap/nextcloud/18204/nextcloud/extra-apps/richdocuments
ResourceLocator can not find a web root (root: /var/snap/nextcloud/18204/nextcloud/extra-apps/tasks
ResourceLocator can not find a web root (root: /var/snap/nextcloud/18204/nextcloud/extra-apps/notes
ResourceLocator can not find a web root (root: /var/snap/nextcloud/18204/nextcloud/extra-apps/text
ResourceLocator can not find a web root (root: /var/snap/nextcloud/18204/nextcloud/extra-apps/calendar

Was there any solution?

@bakharzy this is a bug in upstream Nextcloud. We're awaiting a fix. However, note that while the warnings are annoying, they don't seem to actually cause problems. The text editor issue is seemingly being fixed without also fixing the warnings, so that's not the root cause.

Thanks @kyrofa for the quick reply. Yes, I also noticed the error does not cause any issues. However, I still have problem with the text editor toolbar not showing up for .txt files. It shows up for .md file.

Thanks @kyrofa for the quick reply. Yes, I also noticed the error does not cause any issues. However, I still have problem with the text editor toolbar not showing up for .txt files. It shows up for .md file.

This is by design.

You're in good company @bakharzy, that expectation bit me as well. But @szaimen is correct, that's by design. It makes sense if you think about it-- .txt files are plain text, and don't support formatting. .md files can actually be formatted. Not sure if it support .rtf files, but you get the idea.

can people please try if https://github.com/nextcloud/server/pull/22550/files solves the issue for them?

After updating to the 19.0.3snap1 version, I'm not seeing these errors on the logs anymore when accesing the Calendar or the Tasks applications. Thanks @nickvergessen !!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kyrofa picture kyrofa  路  6Comments

edrohler picture edrohler  路  3Comments

gabrielmongefranco picture gabrielmongefranco  路  4Comments

pachulo picture pachulo  路  4Comments

aptanet picture aptanet  路  7Comments