-
-
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
Tried to log in "user" but could not verify token #37492
Comments
I also had this issue today and I could only fix it with a database maintenance run (command below). root@Nextcloud:# apache2 -v (PostgreSQL) 12.14 (Ubuntu 12.14-0ubuntu0.20.04.1) How I fix the loop: iOS is the latest 16.04 (20E247) here is an excerpt from my logs when I tried to log in with my admin account: Please answer to this if I should provide more info |
I gave it a try, but this didn't work for me. Same issue. It also happened to me on a clean new install. So we definitely need help here. At this time NC is completely unusable on Safari no matter what apple device... |
(moved from #33919) This problem does not seem to have been solved in v26.0.0.11 - even though #35419 was merged - seeing how as I'm currently unable to login using Firefox/Android on a device which had a single tab open yesterday. Deleting site data does not change this, nor does running occ maintenance:repair. I can login using a different browser but not with Firefox, all I get is an empty page showing the site logo and the footer - there is no error message but no login/password request either. This does not work:
This does work:
The error message in the log is the one which has been shown countless times already:
The really annoying thing is that I do not get a chance to login at all since the login/password request does not show up - only the site logo and the footer on an otherwise empty page. |
Another thing which does work:
This way I do get a login/password request. It seems that Firefox' Clear cookies and site data is not enough to actually clear everything related to the page. |
Update: This now happens multiple times per day, which is a lot worse than it was before updating to NC 26 |
This is really a serious issue. Right now, I can't use NC with Safari... I am getting logged out every page refresh, so it's completely unusable. Are there any updates? :) |
Some of the new issues could be related to a safari bug: https://bugs.webkit.org/show_bug.cgi?id=255524 |
Maybe iOS 17 brings a change or the root cause is found somewhere else, either way I hope this will soon be solved because sometimes I can’t log into my NC for days |
Seems to be fixed for me with iOS 16.5 and macOS 13.4. |
Updated a few days ago and for me it seems to be just as bad as before. Haven’t replied earlier because I wanted to gather some data. |
I'm no longer experiencing any issues, also on NC 27.0.0. We can close here. |
I updated ~12h ago and just had this issue reappear. Setup is NC in a Ubuntu 20.04 LXC run on Proxmox 7.4-3. Kernel: 5.15.107-2-pve Reverse Proxy: Nginx-Proxy-Manager Did you do anything else than simply updating NC to fix this? It is getting more and more frustrating to use NC since I can't access it ~50% of the time I need to |
Okay hm, I also didn’t experience the bug on NC 26 since iOS 16.5… I did not change anything, but it’s just working. So I reopen this issue for you. |
Thanks a lot that’s weird… Do you think my or any reverse proxy could be an issue since my TLS connection is terminated there? |
Honestly I don't think so, as I also had this issue and don't have a reverse proxy. I also did some debugging, but I haven't found anything... |
I rarely use other devices to access my NC, but I had a few situations where this error occurred with my employer provided laptop. Another possibility that just came to mind: I’m basically always connected to my VPN server at home, which gives my phone, my Mac and NC the same public IP address. Could this be an issue? (Just for clarification: the issue for me is almost exclusively in iOS, macOS only caused this error once since NC 24 plus the rare occurrences on windows or Linux with Firefox) |
Hm very interesting… Sorry, but I don’t know if your ip can be a source of the issue. Maybe someone else can help? |
Yeah me neither, I’m just throwing guesses at the wall here to see what sticks haha To anyone reading this: all suggestions are welcome Btw, I played around on my work phone (also iPhone and safari) and was able to provoke the error relatively quickly with two open tabs and some reloads/NC-App switching |
Hi, Even deleting the cookies only helps to a limited extent. After deleting them, they are simply set again and the problem is back. Our Nextcloud is connected to a very large LDAP directory of our institution. We have about 70 active users (once a week) and about 20 power users (every day, several hours). We are thinking that a connection to the LDAP could be increasing the problem, but probably the trigger is somewhere else. Access is via a reverse proxy (nginx). There, too, we have already changed some settings for header modification, but without any noticeable effect. It is frustrating. The error pattern is so varied that it is difficult for us to identify the origin of the error. |
Yes, that’s also my experience |
Yes, great idea. Sometimes our users are even logged out of the Nextcloud apps (iOS+Android). Talk in particular (which we use a lot). We initially thought there was a connection with the use of Nextcloud calendars via CardDAV or in connection with app passwords, which a handful of our users are using. However, we could not find any further evidence for this. |
Could you please apply https://github.com/nextcloud/server/commit/02591953bc488aa424f058035ad39fa7b3beb723.patch as well? It's an amendment to #40628 so that it logs the request that wins the race for the token. |
Will do when I’m home |
All-Messages-search-result-part-1.csv I applied the patch and played around a bit (I redacted any tokens, IPs and domains). |
The format is fine. Thanks! First:
Later:
But then also
so token2 is never used. token3 appears out of nowhere. Did you have more than one browser or devices connected? e.g. desktop+phone. |
I have a new idea. What if the remember-me logic does its job but the concurrent requests cause the web session to be deleted from the database? that would also end a session. I'll prepare some more logging patches 😩 |
This comment was marked as off-topic.
This comment was marked as off-topic.
password reset is off-topic. look for existing tickets or create a new one if there is none. Attached the log entries as text please to make it searchable. |
Thought this may be a related issue or a symptom of the same root cause |
I am experiencing frequent logouts, but I don't believe it's the same issue reported here, since I don't get the "Tried to login but couldn't verify token" error In fact I don't get an error at all. I did open a new ticket nextcloud/all-in-one#3674 but that's been closed and directed here. I've noticed that sometimes I get this issue where the header is logged in, and the content is logged out: I just clicked the Files icon in the header in a new tab and I am still logged in |
Today I was logged out and saw the login page without the header being logged in. Opening a new tab didn't have me logged in again |
We can't pinpoint it but #40879, #41318 or a related change must have helped with this problem because it now happens seldom. The theory is that we use
|
Wanted to mention that I'm seeing exactly the symptoms described here, but in Chromium and only after waking up from standby. I always have a few Nextcloud tabs open in my browser, and I assume at least some of them are polling the server and keep me logged in. When my computer goes to standby and wakes up again, the different Nextcloud apps that are open show error notifications or misbehave in different ways, and when I reload the page I get forwarded to the login page. The log shows a On the login page I have to log in twice. After the first attempt, the login page simply shows up again without any error. The second attempt works properly. It does not make a difference whether I type the right password on the first attempt. Reloading the login page does not count as an attempt. After the first attempt, I see |
What NC version are you on which and reverse proxy are you using with what settings? Also, in the past few days after updating, I’ve had a basic http login pop up sometimes while on mobile when I’m opening a new NC tab. I wanted to investigate further before I comment again here, so if anyone else has this problem, maybe we could crowd source how to reliably reproduce this |
I'm running the I'm running the docker image with 'trusted_proxies' =>
array (
0 => '127.0.0.0/8',
1 => '172.16.0.0/12',
2 => '192.168.0.0/16',
3 => '10.0.0.0/8',
4 => 'fc00::/7',
), Requests are coming in from a traefik reverse proxy running on Also, I have |
Every one on this thread that thinks they're experiencing this issue:
This variable (which is an invalid configuration) needs to be eliminated first so that only the logs/symptoms/code paths of any underlying bug(s) are visible. |
For my case, I'm pretty sure that traefik doesn't do any caching. (I'm not sure what you mean by NPM's Cache Assets.) |
I'm not sure if this is relevant or the best place to post, but I'm posting this here since this is the best thread I can find on the issue. I used to see this exact error in my log on occasion(While also being logged out), but now I do not see it anymore, and my issue has gotten worse (being logged out multiple times a day) ever since upgrading to 28.0.5. I also used to have to log in twice when I was logged out with a "Temporary error please try again" but now I sometimes won't even see that error. I originally thought it may have to do with having Nextcloud Mail(Since I had this happen multiple times with mail open), but it doesn't always happen with Nextcloud Mail so I think it's just a coincidence. I get errors like these in my logs, but an error isn't always logged when I get logged out.
I've been also getting these new errors since very recently:
This issue doesn't happen with the desktop client or mobile client, only with browsers. I've encountered this issue on both Brave and Graphene OS's Vanadium, but I haven't tested other browsers so I'm not sure if it's all browsers or just specific browsers. |
I have been affected the "could not verify token" error for at least months, and such errors seem more common recently. Those errors happen with Firefox on either Arch Linux or Windows. I tried the latest patch from #40628 (https://github.com/nextcloud/server/commit/908c381018ba95ee1c13d11d35414db3248782d8.patch) with Nextcloud 28.0.4, and got two errors:
The second error is from: server/lib/private/User/Session.php Lines 1062 to 1071 in 908c381
which is understandable as $token is null due to the first error.
As a record, I use nginx and I believe cache is disabled with the following configuration: (from NginxProxyManager/nginx-proxy-manager#389 (comment)) proxy_no_cache 1;
proxy_cache_bypass 1;
proxy_cache off; |
Got a different error message (redacted)
In the database, the token yyy is indeed missing. I got no results with: select * from nextcloud.oc_preferences where appid = 'login_token' and configKey = 'yyy'; |
Concurrent requests may not be the (only) issue. I still get the following error after disabling HTTP/2 altogether. I assume there are no concurrent requests with HTTP/1.1.
|
I had this same issue for almost a month now. It would happen sporadically. Restarting the Nextcloud server didn't make a difference. It would not work on Safari, but work on Firefox and Safari private window. I bumped into this thread via Google search and taking queues from here, I tried disabling "Cache Assets"option in my Nginx Proxy Manager. I didn't even clear the safari cookies and website data and the login started working now. I don't get this error anymore. |
Bug description
As soon as I open Nextcloud in a new tab, I get redirected to login page and have to login again. Then always the first login fails/nothing happens, so I have to login twice. I am seeing lots of "Tried to log in "user" but could not verify token" errors in log.
It is only happening on Safari (macOS, iOS, iPadOS), tried several versions, also did a clean install of Nextcloud 26 and still the same. Also tried with another user account on a different Mac.
At first I thought it could be related to #33919, but it doesn't seem to be the case. I really spent many hours in trying to get this fixed, but I have no clue, why it is not working.
Steps to reproduce
Expected behavior
The user should still be logged in and not be redirected to login page.
Installation method
Community Manual installation with Archive
Nextcloud Server version
26
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MySQL
Is this bug present after an update or on a fresh install?
Fresh Nextcloud Server install
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
Configuration report
List of activated Apps
Nextcloud Signing status
No response
Nextcloud Logs
Additional info
No response
The text was updated successfully, but these errors were encountered: