Skip to content

Element is logged out if started when no server connection is available (and using OAuth) #34834

Description

@hughns

Steps to reproduce

There are multiple ways to reproduce this as the token expiry can happen at any point.

This is most likely to affect Element Desktop, since it is unlikely that Element Web itself can be loaded with no network connectivity; however in a scenario where the Element Web webserver is reachable but the authentication server is not (e.g. auth server outage, auth server only reachable via VPN, etc), it would also affect Element Web. (Also of note: Element Web is unaffected by #34833, so the failure mode is a little more obvious there.)

Repro method 1

  1. Using Element Desktop connected to a homeserver via OAuth API
  2. Quit Element Desktop
  3. Wait for the OAuth access token to expire
  4. Disconnect computer from network
  5. Launch Element Desktop again
  6. Re-connect computer to network

Repro method 2

  1. Using Element Desktop connected to a homeserver via OAuth API
  2. Quit Element Desktop
  3. Disconnect computer from network
  4. Wait for the OAuth access token to expire
  5. Launch Element Desktop again
  6. Re-connect computer to network

Repro method 3 (with video)

  1. Using Element Desktop connected to a homeserver via OAuth API
  2. Quit Element Desktop
  3. Disconnect computer from network
  4. Launch Element Desktop again
  5. Wait for the OAuth access token to expire
  6. Re-connect computer to network
Element.Desktop.Nightly.logout.after.start.with.no.network.connectivity.mov

Repro method 4

  1. Using Element Desktop connected to a homeserver via OAuth API
  2. Disconnect computer from network
  3. Quit Element Desktop
  4. Launch Element Desktop again
  5. Re-connect computer to network
  6. Wait for the OAuth access token to expire

Outcome

What did you expect?

Element Desktop recovers from the network being down and refreshes the OAuth access token.

What happened instead?

I am logged out and my session is lost. (A convoluted sequence of screens is shown to get to a stable Sign In screen)

Operating system

macOS

Application version

No response

How did you install the app?

No response

Homeserver

No response

Will you send logs?

Yes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-OIDCO-OccasionalAffects or can be seen by some users regularly or most users rarelyS-CriticalPrevents work, causes data loss and/or has no workaroundT-Defect

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions