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

scan.nextcloud.com causing exception in theming? #4987

Closed
nursoda opened this issue May 19, 2017 · 8 comments
Closed

scan.nextcloud.com causing exception in theming? #4987

nursoda opened this issue May 19, 2017 · 8 comments
Assignees
Labels
1. to develop Accepted and waiting to be taken care of bug feature: theming

Comments

@nursoda
Copy link

nursoda commented May 19, 2017

It seem that there's OC/NC some confusion caused by an external server (scan.nextcloud.com in my case). Well-formed requests should not cause exceptions.

{"reqId":"J99RZCXHoFUdhdt24kzI","level":3,"time":"2017-05-20T01:02:20+02:00","remoteAddr":"127.0.0.1","user":"--","app":"no app in context","method":"GET","url":"/cloud/oc/status.php","message":"Exception: {"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"theming.Theming.getLogo\" as such route does not exist.","Code":0,"Trace":"#0 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/Route\/Router.php(339): Symfony\\Component\\Routing\\Generator\\UrlGenerator->generate('theming.Theming...', Array, 1)\n#1 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/Route\/CachingRouter.php(60): OC\\Route\\Router->generate('theming.Theming...', Array, false)\n#2 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/URLGenerator.php(70): OC\\Route\\CachingRouter->generate('theming.Theming...', Array)\n#3 \/server\/www\/domain.de\/htdocs\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php(156): OC\\URLGenerator->linkToRoute('theming.Theming...')\n#4 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/public\/Defaults.php(186): OCA\\Theming\\ThemingDefaults->getLogo(true)\n#5 \/server\/www\/domain.de\/htdocs\/nextcloud\/core\/templates\/layout.guest.php(45): OCP\\Defaults->getLogo()\n#6 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/Template\/Base.php(176): include('\/server\/www\/dat...')\n#7 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/Template\/Base.php(151): OC\\Template\\Base->load('\/server\/www\/dat...', NULL)\n#8 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/legacy\/template.php(202): OC\\Template\\Base->fetchPage(NULL)\n#9 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/legacy\/template.php(224): OC_Template->fetchPage()\n#10 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/Template\/Base.php(132): OC_Template->fetchPage()\n#11 \/server\/www\/domain.de\/htdocs\/nextcloud\/core\/templates\/404.php(10): OC\\Template\\Base->printPage()\n#12 {main}","File":"\/server\/www\/domain.de\/htdocs\/nextcloud\/3rdparty\/symfony\/routing\/Generator\/UrlGenerator.php","Line":130}","userAgent":"scan.nextcloud.com","version":"12.0.0.24"}
{"reqId":"XmSWmt65qnH3kghTJiYx","level":3,"time":"2017-05-20T01:02:20+02:00","remoteAddr":"127.0.0.1","user":"--","app":"no app in context","method":"GET","url":"/cloud/oc-shib/status.php","message":"Exception: {"Exception":"Symfony\\Component\\Routing\\Exception\\RouteNotFoundException","Message":"Unable to generate a URL for the named route \"theming.Theming.getLogo\" as such route does not exist.","Code":0,"Trace":"#0 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/Route\/Router.php(339): Symfony\\Component\\Routing\\Generator\\UrlGenerator->generate('theming.Theming...', Array, 1)\n#1 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/Route\/CachingRouter.php(60): OC\\Route\\Router->generate('theming.Theming...', Array, false)\n#2 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/URLGenerator.php(70): OC\\Route\\CachingRouter->generate('theming.Theming...', Array)\n#3 \/server\/www\/domain.de\/htdocs\/nextcloud\/apps\/theming\/lib\/ThemingDefaults.php(156): OC\\URLGenerator->linkToRoute('theming.Theming...')\n#4 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/public\/Defaults.php(186): OCA\\Theming\\ThemingDefaults->getLogo(true)\n#5 \/server\/www\/domain.de\/htdocs\/nextcloud\/core\/templates\/layout.guest.php(45): OCP\\Defaults->getLogo()\n#6 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/Template\/Base.php(176): include('\/server\/www\/dat...')\n#7 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/Template\/Base.php(151): OC\\Template\\Base->load('\/server\/www\/dat...', NULL)\n#8 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/legacy\/template.php(202): OC\\Template\\Base->fetchPage(NULL)\n#9 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/legacy\/template.php(224): OC_Template->fetchPage()\n#10 \/server\/www\/domain.de\/htdocs\/nextcloud\/lib\/private\/Template\/Base.php(132): OC_Template->fetchPage()\n#11 \/server\/www\/domain.de\/htdocs\/nextcloud\/core\/templates\/404.php(10): OC\\Template\\Base->printPage()\n#12 {main}","File":"\/server\/www\/domain.de\/htdocs\/nextcloud\/3rdparty\/symfony\/routing\/Generator\/UrlGenerator.php","Line":130}","userAgent":"scan.nextcloud.com","version":"12.0.0.24"}

@blizzz
Copy link
Member

blizzz commented May 22, 2017

I can confirm. The effect is also, that on your 404 page not a themed logo is shown, but the default one.

Steps to reproduce:

  1. In theming settings, set up a custom logo
  2. Request a URL that does not exist and does not do redirect to login, e.g. https://my.server.tld/oc/status.php (scanner uses this for example)

Expected: 404 page with customized log

Actual: stock logo, exception on the log

cc @nextcloud/theming

@blizzz blizzz added 1. to develop Accepted and waiting to be taken care of bug feature: theming labels May 22, 2017
@blizzz blizzz added this to the Nextcloud 12.0.1 milestone May 22, 2017
@blizzz
Copy link
Member

blizzz commented May 22, 2017

Backtrace:

Symfony\Component\Routing\Exception\RouteNotFoundException: Unable to generate a URL for the named route "theming.Theming.getLogo" as such route does not exist.

    /path/to/nextcloud/lib/private/Route/Router.php - line 339: Symfony\Component\Routing\Generator\UrlGenerator->generate('theming.Theming...', Array, 1)
    /path/to/nextcloud/lib/private/Route/CachingRouter.php - line 60: OC\Route\Router->generate('theming.Theming...', Array, false)
    /path/to/nextcloud/lib/private/URLGenerator.php - line 70: OC\Route\CachingRouter->generate('theming.Theming...', Array)
    /path/to/nextcloud/apps/theming/lib/ThemingDefaults.php - line 156: OC\URLGenerator->linkToRoute('theming.Theming...')
    /path/to/nextcloud/lib/public/Defaults.php - line 186: OCA\Theming\ThemingDefaults->getLogo(true)
    /path/to/nextcloud/core/templates/layout.guest.php - line 45: OCP\Defaults->getLogo()
    /path/to/nextcloud/lib/private/Template/Base.php - line 176: include('/var/www/minion...')
    /path/to/nextcloud/lib/private/Template/Base.php - line 151: OC\Template\Base->load('/var/www/minion...', NULL)
    /path/to/nextcloud/lib/private/legacy/template.php - line 202: OC\Template\Base->fetchPage(NULL)
    /path/to/nextcloud/lib/private/legacy/template.php - line 224: OC_Template->fetchPage()
    /path/to/nextcloud/lib/private/Template/Base.php - line 132: OC_Template->fetchPage()
    /path/to/nextcloud/core/templates/404.php - line 10: OC\Template\Base->printPage()
    {main}

@mxschmitt
Copy link

I can't confirm this issue.

Version: 13.0.0 alpha Build:2017-06-10T22:01:11+00:00 b289227

I tried to use scan.nextcloud.com and manually visiting the URL from above. For both scenarios no log entry with an stack trace is appearing.

@Krautmaster
Copy link

I also get that error in my log

2017-06-19 07_47_08-administrator - proud kraut cloud

Let me know if I can provide additional help or files

@mxschmitt
Copy link

@Krautmaster which Nextcloud Version?

@Krautmaster
Copy link

Krautmaster commented Jun 19, 2017

"system": {
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"localhost",
"192.168.1.200",
"nextcloud",
"cloud.krautmaster.de"
],
"datadirectory": "/var/ncdata",
"overwrite.cli.url": "https:\/\/cloud.XXX.de\/nextcloud",
"trusted_proxies": [
"192.168.1.103"
],
"overwriteprotocol": "https",
"overwritecondaddr": "^192\.168\.1\.103$",
"dbtype": "mysql",
"version": "12.0.0.29",
"dbname": "nextcloud_db",
"dbhost": "localhost",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"instanceid": "ocab8j3aaavu",
"appstore.experimental.enabled": "true",
"mail_smtpmode": "smtp",
"mail_smtpauth": 1,
"mail_smtpport": "465",
"mail_smtphost": "smtp.gmail.com",
"mail_smtpauthtype": "LOGIN",
"mail_from_address": "XXXX",
"mail_domain": "gmail.com",
"mail_smtpsecure": "ssl",
"mail_smtpname": "REMOVED SENSITIVE VALUE",
"mail_smtppassword": "REMOVED SENSITIVE VALUE",
"preview_libreoffice_path": "/usr/bin/libreoffice",
"memcache.local": "\OC\Memcache\Redis",
"filelocking.enabled": true,
"memcache.distributed": "\OC\Memcache\Redis",
"memcache.locking": "\OC\Memcache\Redis",
"redis": {
"host": "localhost",
"port": 6379,
"timeout": 0,
"dbindex": 0
},
"htaccess.RewriteBase": "/",
"maintenance": false
},

@phatair
Copy link

phatair commented Jun 21, 2017

Same error here. I can not reproduce it by myself but i have a lot of error in my logging.
If i open a page that is not existing i dont see my custom logo and backgroud - i see the default logo and background.
I'm using NC12.0.0

nc12-error

@juliusknorr juliusknorr self-assigned this Jun 21, 2017
@MorrisJobke
Copy link
Member

Looks like a duplicate of #5347

Fixes are backported to 12.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1. to develop Accepted and waiting to be taken care of bug feature: theming
Projects
None yet
Development

No branches or pull requests

7 participants