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

verification in DM is cancelled by second syncing device when receiving .ready event #11765

Closed
bwindels opened this issue Jan 3, 2020 · 2 comments

Comments

@bwindels
Copy link
Contributor

bwindels commented Jan 3, 2020

No description provided.

@bwindels
Copy link
Contributor Author

bwindels commented Jan 3, 2020

e.g. we're bob, and we're trying to verify alice:
- bob1 sends .request
- alice1 sends .ready
- bob2 send .cancel saying .ready is unexpected in phase PHASE_UNSENT

see VerificationRequest._cancelOnError:

const isUnexpectedRequest = type === REQUEST_TYPE && this.phase !== PHASE_UNSENT;
        const isUnexpectedReady = type === READY_TYPE && this.phase !== PHASE_REQUESTED;
        if (isUnexpectedRequest || isUnexpectedReady) {
            logger.warn(`Cancelling, unexpected ${type} verification ` +
                `event from ${event.getSender()}`);
            const reason = `Unexpected ${type} event in phase ${this.phase}`;
            await this.cancel(errorFromEvent(newUnexpectedMessageError({reason})));
            return true;
        }

@bwindels
Copy link
Contributor Author

It's not sending a .cancel anymore but the UX is still off, filed #11964 for that and closing this.

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

No branches or pull requests

2 participants