ProtonMail / proton-bridge

Proton Mail Bridge application
GNU General Public License v3.0
1.14k stars 152 forks source link

Random Loss of State #419

Closed DarkArc closed 10 months ago

DarkArc commented 1 year ago

Expected Behavior

When proton mail's bridge starts, it should always maintain its previous state (i.e., it should still be logged in, or at the very least remember the messages it's downloaded).

Current Behavior

Occasionally, proton mail's bridge seems to lose my credentials and revert to the "Welcome to the new ProtonMail Bridge!" screen.

Steps to Reproduce

I think it's related to the automatic update functionality in bridge that's seemingly outside of the package manager. Perhaps happens every update.

Version Information

v3.3.2

Context (Environment)

This has affected me by disrupting my workflow with a time consuming step of reconfiguring the bridge and my local email client to work with the bridge.

Operating System: Fedora Linux 38 KDE Plasma Version: 5.27.6 KDE Frameworks Version: 5.108.0 Qt Version: 5.15.10 Kernel Version: 6.4.9-200.fc38.x86_64 (64-bit) Graphics Platform: Wayland Processors: 32 × AMD Ryzen 9 7950X 16-Core Processor Memory: 61.9 GiB of RAM Graphics Processor: AMD Radeon RX 6700 XT Manufacturer: ASUS

Using the RPM:

Last metadata expiration check: 0:07:37 ago on Sun 13 Aug 2023 12:05:54 PM EDT.
Installed Packages
Name         : protonmail-bridge
Version      : 2.2.2
Release      : 1
Architecture : x86_64
Size         : 160 M
Source       : protonmail-bridge-2.2.2-1.src.rpm
Repository   : @System
From repo    : @commandline
Summary      : Proton Mail Bridge
URL          : https://www.protonmail.com/bridge
License      : GPLv3
Description  : The Bridge is an application that runs on your computer in the background and seamlessly encrypts and decrypts your mail as it enters and leaves your
             : computer.
DarkArc commented 1 year ago

I've emailed bridge@protonmail.ch with the associated log files.

LBeernaertProton commented 1 year ago

@DarkArc that RPM is quite old. Could you just confirm you have updated to 3.3.2 over time with the builtin auto updater mechanism?

LBeernaertProton commented 1 year ago

I took a peak at the logs. I don't see anything suspicious. We suspect it may be related to something that may have been fixed in 3.4.1. Could you try again with that release? It should become available soon.

DarkArc commented 1 year ago

@DarkArc that RPM is quite old. Could you just confirm you have updated to 3.3.2 over time with the builtin auto updater mechanism?

Yes, I have, I suspect the update to 3.3.2 is what caused the latest occurrence of this issue for me yesterday.

mattiaverga commented 1 year ago

This is something I've also randomly seen as well (running Fedora 38). Today I had to re-login into the client. Note that I didn't upgraded the client as I was already using 3.3.2. What is mostly annoying is that every time I need to wipe the Thunderbird account and recreate it as new, because I cannot reconfigure the existing account with the new settings. I tried to:

When I try to reconnect the existing account with the new settings I get queried to acquire the new certificate, but then TB remains stuck without asking for the new password. In Bridge log I get:

time="Aug 27 09:11:57.855" level=debug msg="Received IMAP event" event=events.SessionAdded
time="Aug 27 09:11:57.855" level=debug msg="Received IMAP event" event=events.SessionAdded
time="Aug 27 09:11:57.855" level=debug msg="Received IMAP event" event=events.SessionAdded
time="Aug 27 09:11:57.855" level=debug msg="12 STARTTLS"
time="Aug 27 09:11:57.856" level=debug msg="27 STARTTLS"
time="Aug 27 09:11:57.856" level=debug msg="51 STARTTLS"
time="Aug 27 09:11:57.896" level=error msg="Cannot upgrade connection" error="remote error: tls: bad certificate"
time="Aug 27 09:11:57.896" level=error msg="Cannot upgrade connection" error="remote error: tls: bad certificate"
time="Aug 27 09:11:57.896" level=debug msg="Received IMAP event" event=events.SessionRemoved
time="Aug 27 09:11:57.896" level=debug msg="Received IMAP event" event=events.SessionRemoved
time="Aug 27 09:11:57.897" level=error msg="Cannot upgrade connection" error="remote error: tls: bad certificate"
time="Aug 27 09:11:57.897" level=debug msg="Received IMAP event" event=events.SessionRemoved

UPDATE: after several minutes (or after many retries) TB eventually got unstuck and allowed me to enter the new password, so I was able to reconnect the existing account with the new settings.

LBeernaertProton commented 1 year ago

@mattiaverga Unfortunately, this is a recurring issue with Thunderbird. When Bridge regenerates the certificate thunderbird fails to noticed and manual intervention is necessary. Usually after deleting the saved certificates and restarting thunderbird the issue is solved.

ChristianKuhn commented 10 months ago

Have this issues on two machines running Fedora 38 after updating from the previous version to 3.5.4. This is very annoying, since I have to reconfigure two Proton accounts on two machines.

LBeernaertProton commented 10 months ago

@ChristianKuhn can you check your logs and see if you have the following text snippet: The vault is corrupt and has been wiped

ChristianKuhn commented 10 months ago

@ChristianKuhn can you check your logs and see if you have the following text snippet: The vault is corrupt and has been wiped

Yes. That's in the log.

LBeernaertProton commented 10 months ago

@ChristianKuhn would you be okay with sending me the logs? You can find my email in the git commit history.

LBeernaertProton commented 10 months ago

@ChristianKuhn thanks for your email, unfortunately, in that one I didn't find anything suspicious. Could you check your older logs and grep for any of the following strings:

Edit: Could you also let me know what your implementation for the sercet service is? E.g.: Gnome Keychain, KeypassXC, pass?

LBeernaertProton commented 10 months ago

After further investigation this seems to be related to #426. Closing this ticket as duplicate.

Please follow the other ticket for more info.