nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.32k stars 4.06k forks source link

Login Page loads Twice #9354

Closed ghost closed 1 month ago

ghost commented 6 years ago
### Steps to reproduce 1. open nextcloud on webbrowser (Firefox >56, iOS Safari) 2. input login credentials in the empty fields 3. hit enter / press login button 4. Login page with empty fields is loading again ### Expected behaviour After entering the login and hit enter or the login button it should be logged in. ### Actual behaviour The login page is loading again. if i enter my login data again it will continue to login succesfull ### Server configuration **Operating system**: Ubuntu 16.04 LTS **Web server:** Apache (latest) **Database:** MySQL **PHP version:** 7.0 **Nextcloud version:** 13.0.2 **Updated from an older Nextcloud/ownCloud or fresh install:** Updated from fresh 13.0.1 **Where did you install Nextcloud from:** .zip downloaded from nextcloud homepage **Signing status:**
Signing status ``` No errors have been found. ```
**List of activated apps:**
App list ``` Enabled: - activity: 2.6.1 - admin_audit: 1.3.0 - announcementcenter: 3.2.1 - bruteforcesettings: 1.0.3 - calendar: 1.6.1 - comments: 1.3.0 - contacts: 2.1.3 - dav: 1.4.6 - encryption: 2.0.0 - end_to_end_encryption: 1.0.5 - external: 3.0.2 - federatedfilesharing: 1.3.1 - federation: 1.3.0 - files: 1.8.0 - files_automatedtagging: 1.3.0 - files_pdfviewer: 1.2.1 - files_sharing: 1.5.0 - files_texteditor: 2.5.1 - files_trashbin: 1.3.0 - files_versions: 1.6.0 - files_videoplayer: 1.2.0 - firstrunwizard: 2.2.1 - gallery: 18.0.0 - logreader: 2.0.0 - lookup_server_connector: 1.1.0 - nextcloud_announcements: 1.2.0 - notes: 2.3.2 - notifications: 2.1.2 - oauth2: 1.1.0 - password_policy: 1.3.0 - provisioning_api: 1.3.0 - quota_warning: 1.2.0 - serverinfo: 1.3.0 - sharebymail: 1.3.0 - socialsharing_email: 1.0.3 - systemtags: 1.3.0 - theming: 1.4.1 - twofactor_backupcodes: 1.2.3 - twofactor_totp: 1.4.1 - updatenotification: 1.3.0 - user_external: 0.4 - workflowengine: 1.3.0 Disabled: - files_external - mail - spreed - survey_client - user_ldap ```
**Nextcloud configuration:**
Config report ``` { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "www.lovelyfamily.de", ], "datadirectory": "***REMOVED SENSITIVE VALUE***", "overwrite.cli.url": "https:\/\/www.lovelyfamily.de", "dbtype": "mysql", "version": "13.0.2.1", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "memcache.local": "\\OC\\Memcache\\APCu", "maintenance": false, "updater.release.channel": "stable", "mail_smtpmode": "smtp", "mail_smtpauthtype": "LOGIN", "mail_smtpsecure": "tls", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpauth": 1, "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "htaccess.RewriteBase": "\/", "theme": "", "loglevel": 2, "updater.secret": "***REMOVED SENSITIVE VALUE***" } } ```
**Are you using external storage, if yes which one:** no **Are you using encryption:** yes **Are you using an external user-backend, if yes which one:** no ### Client configuration **Browser:** Firefox >56, iOS Safari **Operating system:** OSX 10.13.4 ; iOS 11.3
MorrisJobke commented 6 years ago

@blakkmaan We can't reproduce this error. Could you provide us with a test instance to check what is going on?

MorrisJobke commented 6 years ago

As there is no feedback since a while I will close this ticket. If this is still happening please feel free to reopen.

lichtbricht commented 5 years ago

I have got the same problem like blackkmaan. I fill in my login username and password, hit the login button and the same page appears. After repeating the same procedure, I get logged in to nextcloud. Nectcloud v15, Firefox v64

s-hemer commented 5 years ago

I just recently see this behaviour on two different nextcloud instances (both 15.0.5, on Debian 9.8/Apache/PHP 7.0.33), one with quite some extensions, one without. It seems to happen only on the '"first login of the day", no matter which client (so logging in from a different client does not produce the behaviour if previously logged in from another client). The less bloated one only complains about the "referer-policy" (althought it is set) and php-version. Browser used: Firefox 65.0.1.

s-hemer commented 5 years ago

Ok, it is not the "first login of the day" but randomly.

PhieF commented 5 years ago

Same problem here ! :)

Grosskopf commented 5 years ago

Same Problem here with Nextcloud 16.0.2, happens sometimes, maybe when the internet connection is bad?... Nginx, Mariadb and Ubuntu 16.04LTS, can i give a dev an account on my nextcloud do check it out? :)

lineinthesand commented 3 years ago

Same problem here with Nextcloud 19, php 7.4 (with only 256 MB instead of 512 as recommended – could that be the cause?). Sometimes I get logged in with content shown but I get the message Problem loading page, reloading in ... seconds, then I'm dropped back to the login screen.

etyrnal commented 3 years ago

still happens on my 21/stable instances

is this some asinine behaviour of the 'suspicious login' app? or the 'brute force app' ?

michnovka commented 2 years ago

I have the same issue on v22

themilkman commented 2 years ago

Same here on v22, didn't seem to happen in the past, started a few months ago - probably since a patch level upgrade.

michnovka commented 2 years ago

People, are any of you using Redis? For me the problems started after I tried to tweak performance and enabled some caching

abhi-maybe commented 1 year ago

After entering the credentials the loading stops after 5 seconds. But You are not logged in yet, just reload the page and boom you're into Dashboard

It happens when I use MySQL database instead of SQLite

lukas-schaetzle commented 1 year ago

Please reopen this issue. Same happening for me for every 2nd login when using:

Disabling 'suspicious login' app or the 'brute force app' did not change the behavior. It does not happen with Firefox, Safari or Chrome, though.

Edit: Deleting browser cookies and cache fixed it also for Edge. So it must have something to do with that...

Y3Z0N commented 1 year ago

issue happens still in 26.0.2

etyrnal commented 1 year ago

it happens to me every single time I try to log in normally. you know where it doesn't happen? if I open up a new incognito tab and login from there. it lets me in on the first time every time.

On Thu, Jun 15, 2023, 9:28 PM Y3Z0N @.***> wrote:

issue happens still in 26.0.2

— Reply to this email directly, view it on GitHub https://github.com/nextcloud/server/issues/9354#issuecomment-1594004184, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILOVRAHWAFL32LKIRPCTTLXLPAE3ANCNFSM4E5WZJLQ . You are receiving this because you commented.Message ID: @.***>

sapfeer0k commented 1 year ago

Same issue for me , running latest official Nextcloud docker container with sqlite DB

Tha-Fox commented 1 year ago

it happens to me every single time I try to log in normally. you know where it doesn't happen? if I open up a new incognito tab and login from there. it lets me in on the first time every time.

The same with Firefox private mode. I'm running official Docker image 27.0.0-fpm-alpine on k8s but it happened also on 26.x.

Pilzinsel64 commented 1 year ago

It also happens on three difference instances with 27. Firefox & Chrome. MariaDB & MySQL. PHP8.2 & 8.1. All use Apache & Redis.

socram70 commented 1 year ago

Same here, running redis, apache and nginx proxy manager via Docker.

etyrnal commented 1 year ago

this has never NOT happened for me thru any of the versions i've used and any of my three instances [i have three instances because updates almost always borks something].

itsthejb commented 11 months ago

Commenting here since I've had the same issue for many versions. Currently on latest. Seems to happen after you've been automatically logged out (actually not even sure why that happens)

Pilzinsel64 commented 11 months ago

For me this happened nearly every day. Since the last version (21.1.3) this stopped, there were a few improvements to keep the session alive. Well, after one/two weeks it still happens, but definetly not that often.

In the browser log I sometimes can see "CSRF cehck failed". That probably were the point where the auto login in previous version.

Whatever I change the config values (config.php) "remember_login_cookie_lifetime", this never took effect in the past because before it fails to renew the session at some point and loggs out. Let's see what happens now with 27.1.3.

At the moment I look the browser console eacfh single every time I open access the site. I will post anything here if a logout happens and what the erros are on the first try to login that normally fails. :)

nakatomy76 commented 11 months ago

Same here... I wanted to make sure this wasn't a security hole.

Tha-Fox commented 11 months ago

I just upgraded my fpm-alpine container from 27.1.1 to 27.1.3. After upgrade I watched the container logs while trying to login. I had to login twice and the only thing in the logs that wasn't normal GET line was this:

WARNING: [pool www] server reached pm.max_children setting (5), consider raising it

Is anyone else seeing the same line when this happens?

itsthejb commented 11 months ago

@Tha-Fox Just checked and not found in my case

In my case, it appears pretty clear: I'm signed out quite quickly after inactivity (24hrs?), which is rather annoying and I'd like to avoid it. Signing in again always results in the double sign-in page

Pilzinsel64 commented 11 months ago

Alright, in advance to my last comment here: The problem were solved in v27.1.3. But since v27.1.4 the problem is back. I now get logged out automatically several times per day and need to login at least two times before the cloud gain me access again.

meonkeys commented 11 months ago

Anyone have a "clean room" repro? e.g. starting with a default/un-customized install of the latest stable release (v27.1.4). Ideally something we can manually re-check against the next release (v28) and/or put in an automated test.

I did docker run -d -p 8080:80 nextcloud, performed the bare minimum setup, then tried (and failed) to repro.

We need either a miracle or a reliable repro to make progress on this issue.

Pilzinsel64 commented 10 months ago

Alright, I got the error that probably is relevant for here. Before the login-page appears (and will fail on first login) the page tries to load and have some errors in the browser console, e.g.: grafik

Then I reload the page and the login form appears. I try to login and without an error in the borwser console or the nextcloud log and the page just shows the login form once again. Then try to log-in once again and it works.

This happens nearly daily, sometimes twice a day.

z3ntu commented 10 months ago

For me in the inspector it looks like this, getting a redirect to Location: /login?user=luca&direct=1 on the first login request.

image

The second POST request to /login looks the same except that there's now also direct: 1 in the form data

meonkeys commented 7 months ago

I'm no longer seeing this issue. I think it stopped since upgrading my server to v28.

Side note: I do get logged out often, mostly on my desktop (#37492, I think). I did just start seeing a HTTP basic auth browser popup (also after upgrading to v28?)... I see that mentioned in https://github.com/nextcloud/server/issues/37492#issuecomment-1937842479

gmta commented 7 months ago

I'm no longer seeing this issue. I think it stopped since upgrading my server to v28.

I can confirm this as well; problem is solved for me.

itsthejb commented 7 months ago

Just got notification of comments on this. I can confirm that this issue appears to have stopped for me - but specifically because the login session is holding properly, I'm not often logged out due to expired sessions

michnovka commented 7 months ago

I can also confirm I have not encountered this issue since nextcloud 28. Thanks!

sapfeer0k commented 7 months ago

I can confirm this issue is gone for me as well

michnovka commented 2 months ago

This has been solved since v28

z3ntu commented 2 months ago

fwiw I also haven't seen this in a couple of months.

etyrnal commented 2 months ago

solved? or inexplicably went away? what was the solution?

On Thu, Aug 22, 2024 at 5:39 AM michnovka @.***> wrote:

This has been solved since v28

— Reply to this email directly, view it on GitHub https://github.com/nextcloud/server/issues/9354#issuecomment-2304338894, or unsubscribe https://github.com/notifications/unsubscribe-auth/AILOVRC6MXHY7YJ2INM3TPDZSW5WNAVCNFSM4E5WZJL2U5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMZQGQZTGOBYHE2A . You are receiving this because you commented.Message ID: @.***>

--

DorraJaouad commented 1 month ago

This issue is solved in version 28 and above.