-
-
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
Symfony RouteNotFoundException for /data/.ocdata #2558
Comments
Feels like a side effect of #2513 |
It looks like your webserver config is using the /core/templates/403.php as error document and the theming app is not in place there. I can reproduce when running the php cli server in the server repo and opening localhost:8080/core/templates/403.php. |
I can't really reproduce this error. As you are using Nginx: Are you sure that the data dir protection is properly in place and how to do you handle 403 errors on the web server level? |
@MorrisJobke How should it behave? Apache default is to throw everything to index.php, right? |
Line 439 in 04f8521
My nginx is set to
|
And to add to that, if I browse to /updater/missing.file I get the correct "file not found return to nextcloud" page and /data/.ocdata gives me the nc themed "Access forbidden" page. EDIT: And browsing to /data/.ocdata gets logged into nginx errorlog but not nextcloud.log |
EDIT: Reproduced on both servers, memcache.locking Redis does not play part in making the error disappear. |
Weird.
This causes for me no entry in the logs but only the 403 error page.
@juliushaertl Also this would not make sense, because the data/.ocdata file is only retrieved by a JS that is only loaded on the admin settings. I would rate this approach a dead end.
@LukasReschke Any idea why APCu caching should interfere with the route handling? And why does it get to the Router at all. This should be blocked on webserver level. @Lartza Could you open the Webdev tools in your browser, go the the admin page and check the network tab for the .ocdata request. Could you send over the details for this request (screenshots are fine). |
(For me browsing to /core/templates/403.php on the production server redirects to Files for some reason, but shows Access forbidden on the dev server... weird. Probably unrelated since both consistently get the error with APCu disabled.) This turned out to be a typo in the URL... http://i.imgur.com/B9VYiCW.png EDIT: Typo... APCu enabled -> disabled, error happens when APCu is disabled for sure |
For me, both servers log /core/templates/403.php as the Symfony error but for /core/templates/403.php not /data/.ocdata |
Nothing here. I only get the redirect without anything logged. |
Looks good and seems to work. Sadly I have no idea why this error appears in the logs |
When doing this:
I get this in the error log:
and nothing in the nextcloud log. |
Same error on my installatation:
|
The error occurs when the webserver config is not redirecting and instead rendering the /core/templates/403.php file as a standalone error page. @MorrisJobke This is basically all PHP code that is running there:
|
@MorrisJobke What redirect are you referring to? There is no redirect in place for me away from the 403.php and I don't think there should be.
@juliushaertl I am not 100% sure what you mean by this. Apache's ErrorDocument and nginx's error_page seem to be identical in fuction according to the docs causing an internal redirect to whatever page is given to them. /core/templates/403.php exists so it's redirected to and fetched I assume, should there be another redirect in place or...? Would be nice if someone could reproduce this with Apache. |
Not for me - there are no errors when I open this |
I debugged a little bit further and when calling 403.php directly the theming app is not loaded (from base.php, so #2587 adds a check to only return a route to theming when the app has been loaded. |
Gave #2587 a shot on my test server, exception is gone. Couldn't see any new errors either or any other obvious problems. 403 page works correctly and everything seems to work normal. Enabling APCu again did not cause any new issues either. |
Fixed with #2587 |
Steps to reproduce
Expected behaviour
No errors are logged
Actual behaviour
Two Symfony errors for /data/.ocdata are logged
Server configuration
Operating system: Arch Linux
Web server: nginx 1.10.2 and 1.11.6
Database: PostgreSQL 9.6.1
PHP version: 7.0.13 and 7.0.14
Nextcloud version: 11.0 RC1
Updated from an older Nextcloud/ownCloud or fresh install:
Upgraded 10.0.1 > 10.0.2RC > 11RC did not IIRC experience this error, in-place reinstalling NC11 using the manual upgrade instructions (extract, copy config.php and data, no occ upgrade) and it appeared. Also happens on fresh install.
Where did you install Nextcloud from:
zip or tar.bz2
Signing status:
Signing status
List of activated apps:
App list
``` - activity: 2.4.1 - comments: 1.1.0 - dav: 1.1.1 - federatedfilesharing: 1.1.1 - federation: 1.1.1 - files: 1.6.1 - files_pdfviewer: 1.0.1 - files_sharing: 1.1.1 - files_texteditor: 2.2 - files_trashbin: 1.1.0 - files_versions: 1.4.0 - files_videoplayer: 1.0.0 - firstrunwizard: 2.0 - gallery: 16.0.0 - logreader: 2.0.0 - lookup_server_connector: 1.0.0 - nextcloud_announcements: 1.0 - notifications: 1.0.1 - password_policy: 1.1.0 - provisioning_api: 1.1.0 - serverinfo: 1.1.1 - sharebymail: 1.0.1 - survey_client: 0.1.5 - systemtags: 1.1.3 - theming: 1.1.1 - twofactor_backupcodes: 1.0.0 - updatenotification: 1.1.1 - workflowengine: 1.1.1 Disabled: - admin_audit - encryption - external - files_accesscontrol - files_automatedtagging - files_external - files_retention - templateeditor - user_external - user_ldap - user_saml ```The content of config/config.php:
Config report
Are you using external storage, if yes which one: No
Are you using encryption: no
Are you using an external user-backend, if yes which one: No
Client configuration
Browser: Firefox 50.0.2 and Chrome 54.0.2840.99
Operating system: Windows 10
Logs
Web server error log
Web server error log
Nextcloud log (data/nextcloud.log)
Nextcloud log
Browser log
Browser log
The text was updated successfully, but these errors were encountered: