Skip to content

fix(3127): Only run the qss log sync interval once the auth connection is properly up and running#3126

Open
islathehut wants to merge 3 commits intodevelopfrom
fix/qss-log-pull-delay
Open

fix(3127): Only run the qss log sync interval once the auth connection is properly up and running#3126
islathehut wants to merge 3 commits intodevelopfrom
fix/qss-log-pull-delay

Conversation

@islathehut
Copy link
Collaborator

@islathehut islathehut commented Mar 10, 2026

Pull Request Checklist

  • I have linked this PR to a related GitHub issue.
  • I have added a description of the change (and Github issue number, if any) to the root CHANGELOG.md.

(Optional) Mobile checklist

Please ensure you completed the following checks if you did any changes to the mobile package:

  • I have run e2e tests for mobile
  • I have updated base screenshots for visual regression tests

@islathehut islathehut changed the title fix: Only run the qss log sync interval once the auth connection is properly up and running fix(3127): Only run the qss log sync interval once the auth connection is properly up and running Mar 10, 2026
@islathehut islathehut added this to Quiet Mar 11, 2026
@islathehut
Copy link
Collaborator Author

The overview of why this works:

We were triggering the log pull interval in two places under normal circumstances:

  1. immediately after starting the connection if the connection was "active" and we are a member on the chain
  2. when the auth connection emits the connected event

The first trigger is what was causing issues. In this context the "active" status was based solely on whether the connection had been stopped or not. Trying to pull log entries would be impossible at this point as both quiet and qss would reject since the connection wasn't fully established.

The second trigger was firing correctly but since the interval already existed we ignored it and continued waiting for the timer to finish before starting a new attempt.

The fix here is to track the LFA connection status in more detail so we know which stage of its lifecycle its in and migrate actions like "start pulling logs from qss" on whether we have completed the identity challenge or not and only using the more vague "active" state of the connection (i.e. is the connection actively doing something) for actions such as restarting/replacing stopped connections that don't rely on the LFA lifecycle.

Something odd to note here:

I originally migrated to using a new event, connectionSecured that fired when we derived the encryption key the auth connection used since that's guaranteed to happen after the identity challenge and I was seeing two instances of the connected event being fired at two points in the LFA connection lifecycle. I migrated back because while checking the logs to provide an accurate write-up here I'm no longer seeing the duplicate events and I don't have the old logs to double check. I may have hallucinated it but if I didn't and it is intermittent we should keep it in mind in the future if the delay shows up again or any other weird behavior happens when triggered by this event.

@islathehut islathehut removed this from Quiet Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix: Delay between joining/signing in to QSS and syncing historical log entries

1 participant