clients icon indicating copy to clipboard operation
clients copied to clipboard

Session out again

Open baek-sang opened this issue 1 year ago • 2 comments
trafficstars

Steps To Reproduce

You have a fresh installation of the Firefox extension.

Logout occurred while the browser was still working (2 different PC)

Expected Result

Keeping sessions alive

Actual Result

logout

Screenshots or Videos

No response

Additional Context

https://github.com/bitwarden/clients/issues/8873

Operating System

Windows

Operating System Version

11

Web Browser

Firefox

Browser Version

130

Build Version

2024.7.1

Issue Tracking Info

  • [X] I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.

baek-sang avatar Aug 25 '24 17:08 baek-sang

@baek-sang Thank you for reporting this issue. To help us reproduce and diagnose the problem, could you please provide some additional information?

  • Are you logged in to multiple accounts on the extension when this occurs?
  • What are your vault timeout settings?
    • Vault timeout length
    • Vault timeout action
  • Does this seem to occur only after a certain period of time (e.g. 1 hour of no activity)?

Thank you for your help.

trmartin4 avatar Aug 26 '24 13:08 trmartin4

  • Only one account.
  • 15 min / lock
  • It doesn't happen often - I haven't had the problem for a while, but it happened while I was away for a while. The browser had been running for more than 6 hours.

baek-sang avatar Aug 29 '24 03:08 baek-sang

@baek-sang hello! Have you continued to experience this logout at any interval over the past few months? We have not had reports of this elsewhere and want to see if it has potentially been resolved.

trmartin4 avatar Oct 08 '24 15:10 trmartin4

Yes. Logout issue when updating a self-hosted server.

Addons and servers always have the latest version.

baek-sang avatar Oct 09 '24 00:10 baek-sang

@baek-sang Thank you for your reply. Could you clarify what you mean by "updating a self-hosted server"? What is being done when you experience a logout? Are you saying that you are logged in to a self-hosted instance on your Firefox extension, update your self-hosted server version, and are logged out?

trmartin4 avatar Oct 09 '24 02:10 trmartin4

  1. Addon login ( self-hosting unified, docker ). No problems for more than 1 month
  2. upgrade version ( 9.x -> 10.0 )
  3. Logout occurred

baek-sang avatar Oct 11 '24 12:10 baek-sang

@baek-sang thank you! So, to summarize, you are experiencing logout after updating the version of your Unified self-hosted instance?

trmartin4 avatar Oct 12 '24 14:10 trmartin4

Yes. When updating from 9.2 > 2024.10.0, I experienced a logout, but with 2024.8.x I had no issues.

Additional) 100% logout occurs on windows portable version.

baek-sang avatar Oct 12 '24 19:10 baek-sang

Hello. Can you confirm whether you experience the same behavior with an upgrade to 2024.11.0, which was released this week?

trmartin4 avatar Nov 15 '24 15:11 trmartin4

I have the same issue with the Safari extension. However, I must admit that this issue only occurs on one of my two Macs (MacBook Pro with Intel and Mac Mini M2). I only experience this problem with the Mac Mini. One possible reason I can think of is that I have only one user on the MacBook, but multiple users on the Mac Mini.

dgrinin avatar Nov 19 '24 22:11 dgrinin

I got the same question when i was in 2024.11.5 (19461 beta version), then I reinstall the 2024.11.5 (19461 standard version) and it was ok. #4318 Now I upgraded to 2024.11.6 (19499 standard version) it went bad and log me out again.

AndrewLauu avatar Nov 26 '24 02:11 AndrewLauu

Hello @dgrinin and @AndrewLauu,

Are you using a self-hosted Bitwarden server, or the Bitwarden cloud infrastructure (vault.bitwarden.com/eu)?

Thank you in advance,

SergeantConfused avatar Dec 14 '24 15:12 SergeantConfused

Also experiencing this, support ticket: #574006.

MineGene avatar Dec 27 '24 10:12 MineGene

Hello everyone,

Is anyone still encountering this with Bitwarden browser extension 2024.12.4 or newer?

Thank you,

SergeantConfused avatar Jan 18 '25 14:01 SergeantConfused

I will next be able to check 24th-27th Jan, I’ll update my findings then.

MineGene avatar Jan 20 '25 02:01 MineGene

@SergeantConfused Issue still exists for me.

MineGene avatar Feb 06 '25 18:02 MineGene

  • Firefox 136
  • Bitwarden v2024.12.4

still session out

baek-sang avatar Feb 16 '25 17:02 baek-sang

  • Windows 11 24H2
  • Bitwarden-Portable-2025.2.0.exe
  • Self-host version 2.0

I use the Desktop client very rarely, and when I do, I'm always logged out. Is there something wrong with my environment?

baek-sang avatar Mar 03 '25 09:03 baek-sang

This has been an issue since Aug 2024, and still unfixed?

markrosan8 avatar Mar 17 '25 03:03 markrosan8

Is there any progress on this bug? The logout issue also occurred in Firefox 2025.6.1. I've been logged out multiple times, and I believe it happened when I upgraded my self-hosted version using docker compose pull && docker compose up -d.

Sometimes, I'm logged out for no apparent reason, which seems to occur when the server is offline. This is very inconvenient because the logout issue happens not only with the Firefox addon but also with the Windows portable app.

baek-sang avatar Jul 26 '25 07:07 baek-sang

I am experiencing this with the current versions of Firefox (144.0) and Firefox extension (2025.10), on Windows. I have not seen it on my other computers though. I have uninstalled the extension and reinstalled.

Overnight the browser extension gets logged out. Timeout action is to lock, Timeout is on browser restart.

The log from when it was working last night, and then logged out this morning.

It looks like the computer (Windows 11) woke up by itself at 09:05 this morning, I didn't start using it until 09:29. Firefox was open the whole time.

21:04:25.038 [SignalR] Close message received from server. console-log.service.ts:43:17
21:04:25.040 [SignalR] Connection disconnected with error 'Error: Server returned an error on close: Connection closed with an error.'. console-log.service.ts:51:17

09:05:17.655 XHRGET https://api.bitwarden.com/accounts/revision-date [HTTP/2 401  1430649ms]
09:29:07.552 Firefox can’t establish a connection to the server at wss://notifications.bitwarden.com/hub?access_token=... vendor.js:2:37879

09:29:07.560 [SignalR] (WebSockets transport) There was an error with the transport. console-log.service.ts:43:17
09:29:07.561[SignalR] Failed to start the connection: Error: WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled. console-log.service.ts:51:17

09:29:09.084 [PhishingDetectionService] No active account. console-log.service.ts:43:17
09:29:09.098 Retrieving application id

09:29:09.902 Environment did not respond in time, emitting previous config. console-log.service.ts:43:17
09:29:09.902 [PhishingDetectionService] No active account. console-log.service.ts:43:17
09:29:10.086 can't access property "id", e is null console-log.service.ts:47:17

09:29:10.949 GET wss://notifications.bitwarden.com/hub?access_token=...
[HTTP/1.1 401 Unauthorized 3544ms]

09:29:11.052 can't access property "id", e is null console-log.service.ts:47:17
09:29:11.187 Cannot find menu item with id autofill console-log.service.ts:47:17
09:29:11.374 can't access property "id", e is null console-log.service.ts:47:17
09:29:11.451 Cannot find menu item with id copy-password console-log.service.ts:47:17
09:29:12.098 [PhishingDetectionService] Initialize called. Checking prerequisites... console-log.service.ts:43:17
09:29:12.112 WebAssembly is supported in this environment browser-sdk-load.service.ts:51:13
09:29:12.120 Retrieving application id console-log.service.ts:43:17
09:29:12.182 Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.
    Fx index.ts:116
background.js:1:1035362

09:29:12.279 WASM SDK loaded in 166ms console-log.service.ts:43:17
09:29:12.284 State version: 72

hmoffatt avatar Oct 27 '25 01:10 hmoffatt

@hmoffatt is this something that occurs regularly?

The issue appears to be this line in the logs:

09:05:17.655 XHRGET https://api.bitwarden.com/accounts/revision-date [HTTP/2 401  1430649ms]

This request took 1430649ms (almost 24 minutes), and what most likely happened was that the access token used to make the request was no longer valid when it actually executed, which the application responded to by logging you out.

Can you provide more detail on exactly what mode the Windows 11 machine was in overnight? You said that it "woke up by itself" - which of the modes was it in overnight?

What I believe happened was that:

  1. At 9:05 AM, a background sync was attempted. This initiated a request to the Bitwarden server with the valid access token as of 9:05 AM. Bitwarden's access tokens are short-lived (1 hour).
  2. Due to the state of the machine at the time, the request didn't actually execute until you logged in at 9:26 AM.
  3. By 9:26 AM, that access token was no longer valid.

While we investigate further, any information you can provide about the state of the machine overnight might help us reproduce and fix this.

Thank you!

trmartin4 avatar Nov 14 '25 14:11 trmartin4

  • Firefox 145
  • Extension 2025.10.0

The logging-out error is still occurring. The problem is occurring even though I haven't upgraded the server and I am not offline.

Furthermore, I had never been logged out of the mobile app before, but I was logged out after the iOS 26 upgrade. The Windows Portable App used to log me out every time the version was upgraded; although the current version (2025.11.0) doesn't have this issue yet, it is a very frustrating problem for this error to occur intermittently.

baek-sang avatar Nov 15 '25 11:11 baek-sang

@hmoffatt is this something that occurs regularly?

On one particular computer, it happens every day. I generally login again in the morning, the computer sleeps overnight, and I'm logged out again next morning.

What I believe happened was that:

1. At 9:05 AM, a background sync was attempted.  This initiated a request to the Bitwarden server with the valid access token _as of 9:05 AM_.  Bitwarden's access tokens are short-lived (1 hour).

2. Due to the state of the machine at the time, the request didn't actually execute until you logged in at 9:26 AM.

3. By 9:26 AM, that access token was no longer valid.

I agree, from my reading of the console. I don't know why the computer woke at 9:05 AM, it should still have been asleep, though Windows can be odd in this respect.

This doesn't happen on my other Windows PC, which also sleeps overnight, nor my Linux machines. I am away from that computer for a while and unfortunately not able to get any more information from it for now.

hmoffatt avatar Nov 16 '25 22:11 hmoffatt