(SOLVED) Nextcloud 12: Login button not working

Hi,

I’ve installed the latest daily update of Nextcloud 12from 16th May on my Debian system and encountered a grave error: My Login button is not working: I can’t click on it on my web login screen. The sync client works perfectly.

My specs: I’m running Debian 8 with php 7.1.

My login screen looks like this:

Can somebody help me out? I’ve attached the latest lines from nextcloud.log:

Nextcloud.log:
{“reqId”:“cagw4itENczAMPesNbht”,“level”:3,“time”:“2017-05-17T11:45:07+00:00”,“remoteAddr”:“92.218.233.220”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/apps/theming/loginbackground?v=116”,“message”:“Invalid argument supplied for foreach() at /var/www/html/nextcloud/lib/private/Template/JSCombiner.php#107”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36”,“version”:“12.0.0.20”}
{“reqId”:“cagw4itENczAMPesNbht”,“level”:3,“time”:“2017-05-17T11:45:07+00:00”,“remoteAddr”:“92.218.233.220”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/apps/theming/loginbackground?v=116”,“message”:“Invalid argument supplied for foreach() at /var/www/html/nextcloud/lib/private/Template/SCSSCacher.php#145”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36”,“version”:“12.0.0.20”}
{“reqId”:“cagw4itENczAMPesNbht”,“level”:3,“time”:“2017-05-17T11:45:07+00:00”,“remoteAddr”:“92.218.233.220”,“user”:“–”,“app”:“PHP”,“method”:“GET”,“url”:“/index.php/apps/theming/loginbackground?v=116”,“message”:“Invalid argument supplied for foreach() at /var/www/html/nextcloud/lib/private/Template/SCSSCacher.php#145”,“userAgent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36”,“version”:“12.0.0.20”}

Thanks,

Christian

I have the same problem with Firefox 53.0.2 mentioned here: Earn a t-shirt by testing Nextcloud 12 Beta 2! and here: Earn a t-shirt by testing Nextcloud 12 Beta 2!

1 Like

Thanks for your reply, I have the problem with every browser… Tested Chrome, Safari and Firefox.

Can somebody help me?

@trontus45 seems like there is a problem with theming.

If you have some coding-experience you could check line 145 in /var/www/html/nextcloud/lib/private/Template/SCSSCacher.php

Correct me if im wrong. This function checks if the CSS-File is cached or not.
Did you edit any css-Files manually?

Thanks for your answer. Well, it doesn’t seem to be a theming issue since I didn’t edit any files nor do I have a theme set in config.php. What I’ve tried is rolling back to NC 11, that worked perfectly but once I upgrade to NC 12 Beta 4, any buttons stop working, including the “Start upgrade button” once I’ve copied and replaced the NC 11 files with NC 12 B4 files… I don’t know what could be the issue, but possibly some js errors?

Did you copy the nc11 files into your existing nc12b4 Installation? Did i understand that correctly?

No, I didn’t mean to say that. I set up a new NC 11 installation and copied the data directory from my NC12 installation over. And then I upgraded that NC 11 installation (which is working fine) to NC 12 b4 and the same problem as before occured: login / upgrade buttons were not working at all.

You could Try to upgrade again without copying your data into the the new instance

1 Like

Thanks, I solved the problem. I think it was due to the setting theme => ‘’ in my config.php. I setup a new installation and copied over my data directory again and used the same database but created a new config.php, that worked. Topic may be closed.

Hi, for me, comment the instanceid entry, has triggerred the generation of appdata_instanceid folder and solve the problem.

3 Likes

Wow! After days of trying the commenting of the instanceid entry is the solution for me. Thanks for that.

2 Likes

had the same problem, my hoster solved the issue: “It was caused by Google’s page cache and I disabled it.”

I had the same problem, too. My solution was the reworking of my nginx configuration. I used https://docs.nextcloud.com/server/12/admin_manual/installation/nginx.html as new basic.

If you have cloudflare enabled on your domain, try disabling it and clearing the cache.

2 Likes

in which file is this instanceid entry?

I am trying to install nextcloud with the Tomcat server.
Neither commenting out instanceid nor commenting out theme => ‘’ in my config.php solved the problem.
Firefox cache is cleared.
The server error log contains a lot of empty lines.
Nothing in data/nextcloud.log.

I just upgraded from version 12.0.0 to 12.0.2, but that didn’t help.

How can I debug this?

I managed to attach an Eclipse debugger session to nextcloud. I can go step by step through the code, but I have no idea, where to start debugging this issue…
I set a breakpoint in base.php static function handleLogin(…), but it just goes through and returns false…

The html code of the login dialog gives no clue, what string I could search in the source code…
Is this whole login stuff entirely handled by javascript?

If I forcibly enable the login button (with Firefox Inspect element (Q)) login seems to work. See screenshot from after the login… Does this mean, login worked (but no CSS etc. are loaded)?

Bildschirmfoto von »2017-09-07 10-37-28|548x500

Ich hatte das selbe Problem. Allerdings fiel mir irgendwann oben in den Webseiten-Informationen auf, dass dort “diese Seite ist nicht sicher steht”. Ich habe “SSL erzwingen” bei meinem Hoster eingetragen und seither funktioniert es einwandfrei.

Ich hatte das selbe Problem. Allerdings fiel mir irgendwann oben in den Webseiten-Informationen auf, dass dort “diese Seite ist nicht sicher steht”. Ich habe “SSL erzwingen” bei meinem Hoster eingetragen und seither funktioniert es einwandfrei.

Also der Browser sagt das? Nicht Nextcloud?
Ja, ich gehe auch noch nicht über SSL, weil es noch eine Testinstallation ist.
Das könnte ich natürlich mal versuchen.
Danke für den Hinweis.

Addendum: I tried to connect with SSL (https://). I have a self signed certificate. The button is still disabled=“disabled”.
Help please… especially if you have an idea on how to debug this.

There is a reference to this help thread in https://github.com/nextcloud/server/issues/5003

I searched where to start debugging:

$ find . -type f -name "*.js" -exec grep -Hi "Angemeldet bleiben" \{} \;
./core/l10n/de.js:    "Stay logged in" : "Angemeldet bleiben",
./core/l10n/de_DE.js:    "Stay logged in" : "Angemeldet bleiben",
$ find . -type f -name "*.php" -exec grep -H "Stay logged in" \{} \;
./core/templates/login.php:				<label for="remember_login"><?php p($l->t('Stay logged in')); ?></label>

I’ll try to set some breakpoints in core/templates/login.php.

… Ok, nothing to debug… disabled=“disabled” is hardcoded in login.php.

In the header of login.php I find

<?php
vendor_script('jsTimezoneDetect/jstz');
script('core', 'merged-login');
?>

I find core/js/merged-login.json…
In merged-login.json I find “login.js”…

The button is not enabled here…

In merged-login.json I find “visitortimezone.js”…
Here i find

// only enable the submit button once we are sure that the timezone is set

How can I find out, if the timezone is set? And if it’s not, what do I have to do to set it?