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

ResourceLocator can not find a web root on several extensions #902

Closed
weirdion opened this issue Feb 19, 2019 · 29 comments
Closed

ResourceLocator can not find a web root on several extensions #902

weirdion opened this issue Feb 19, 2019 · 29 comments
Labels

Comments

@weirdion
Copy link

weirdion commented Feb 19, 2019

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
@weirdion
Copy link
Author

weirdion commented Feb 19, 2019

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.

@kyrofa
Copy link
Member

kyrofa commented Feb 22, 2019

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.

@bn4t
Copy link
Contributor

bn4t commented Mar 11, 2019

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

@kyrofa
Copy link
Member

kyrofa commented Mar 12, 2019

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

@Famku
Copy link

Famku commented Mar 13, 2019

confirm - same issue with Talk/Spreed

@nickvergessen
Copy link

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

@kyrofa
Copy link
Member

kyrofa commented Mar 14, 2019

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

@z3dx95g7
Copy link

z3dx95g7 commented May 8, 2019

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?

@ohbob
Copy link

ohbob commented May 31, 2019

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

@kyrofa
Copy link
Member

kyrofa commented May 31, 2019

I've tried to give guidance on how to fix it 🤷‍♂️ .

@the-sane
Copy link

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 nextcloud/spreed#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?

@kyrofa
Copy link
Member

kyrofa commented May 31, 2019

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.

@the-sane
Copy link

the-sane commented Jun 1, 2019

I appreciate the info, thank you!

@juliusknorr
Copy link

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.

@szaimen
Copy link
Contributor

szaimen commented Jul 11, 2019

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

@the-sane
Copy link

Is this the same issue? nextcloud/server#13556

@kyrofa
Copy link
Member

kyrofa commented Jul 15, 2019

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.

@the-sane
Copy link

the-sane commented Aug 5, 2019

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:
nextcloud/text#187 (comment)

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:
nextcloud/text#187 (comment)

@solracsf
Copy link

solracsf commented Sep 8, 2019

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.

@kyrofa
Copy link
Member

kyrofa commented Sep 27, 2019

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

@the-sane
Copy link

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.

@kyrofa
Copy link
Member

kyrofa commented Sep 30, 2019

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

@bakharzy
Copy link

bakharzy commented Feb 1, 2020

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?

@kyrofa
Copy link
Member

kyrofa commented Feb 1, 2020

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

@bakharzy
Copy link

bakharzy commented Feb 2, 2020

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.

@szaimen
Copy link
Contributor

szaimen commented Feb 2, 2020

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.

@kyrofa
Copy link
Member

kyrofa commented Feb 2, 2020

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.

@nickvergessen
Copy link

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

@pachulo
Copy link
Member

pachulo commented Sep 14, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests