Skip to content
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

fix "QR process failed" error and add a test #2725

Merged
merged 5 commits into from
Oct 3, 2021
Merged

Conversation

r10s
Copy link
Contributor

@r10s r10s commented Oct 1, 2021

as already pointed out at #2611, the issue was that a stale/running secure-join/setup-contact made any subsequent joins unusable.

this pr aborts any existing secure-join/setup-contact, as it is also described in the docs ("Subsequent calls of dc_join_securejoin() will abort unfinished tasks")

nb: calls to stop_ongoing_process() does not help, however, in case of setup-contact the function is not blocking anyway (and the same is planned for secure-join)

fixes #2611

r10s added 3 commits October 1, 2021 16:49
before, a stale secure-join or setup-contact
made the whole qr-scanning unusable until
the app is restarted,
resulting in "QR process failed" errors.

this commit fixes the issue by
aborting existing scans -
in cases, a user really wants two concurrect joins running,
this is not perfect, but that did not worked before as well.
@r10s r10s requested a review from flub October 1, 2021 16:33
@r10s r10s mentioned this pull request Oct 1, 2021
4 tasks
@link2xt
Copy link
Collaborator

link2xt commented Oct 2, 2021

@r10s Remove the AlreadyRunning variant, it is not used anymore.

@r10s r10s requested a review from link2xt October 2, 2021 23:27
@link2xt
Copy link
Collaborator

link2xt commented Oct 3, 2021

Clippy is unhappy too

Copy link
Collaborator

@link2xt link2xt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is also an "ongoing process", so it is probably possible to hit JoinError::OngoingRunning now. This change is an improvement nevertheless.

@r10s
Copy link
Contributor Author

r10s commented Oct 3, 2021

There is also an "ongoing process", so it is probably possible to hit JoinError::OngoingRunning now.

might be, yes. in general, however, ui call dc_stop_ongoing_process() when the user aborts a group-join (setup-contact is not affected as that does not use ongoing at all).

however, that is not really worth fixing as with #2508 we get of "ongoing" and "blocking" for all qr-joins :)

@r10s r10s merged commit b18bdd1 into master Oct 3, 2021
@r10s r10s deleted the fix-qr-process-failing branch October 3, 2021 11:17
Copy link
Contributor

@flub flub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@r10s r10s mentioned this pull request Oct 29, 2021
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.

QR code scanning failing sometimes
3 participants