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

Crash when settings are changed right after fresh registration and linking a device #317

Open
direc85 opened this issue Aug 18, 2024 · 3 comments

Comments

@direc85
Copy link
Contributor

direc85 commented Aug 18, 2024

Observed with Whisperfish -- see https://gitlab.com/whisperfish/whisperfish/-/merge_requests/597

thread 'main' panicked at whisperfish/src/worker/client.rs:3409:18:
send configuration: UntrustedIdentity { address: ServiceAddress { uuid: MY-UUID, identity: AccountIdentity } }

Which in my case points to:

sender
    .send_configuration(&local_addr, configuration)
    .await
    .expect("send configuration");

Which, I believe, in turn comes from libsignal-service-rs sender.rs:

async fn try_send_message(...)
    // ...
    for missing_device_id in &m.missing_devices {
        // ...
        Err(ServiceError::MismatchedDevicesException(ref m)) => {
            // ...
            process_prekey_bundle(...)
                .await
                .map_err(|e| {
                    tracing::error!("failed to create session: {}", e);
                    MessageSenderError::UntrustedIdentity { // <-- here
                       address: recipient,
                    }
                })?;

So, uh, we don't trust ourselves at such early time? Perhaps we should trigger some session-creation actions after linking and/or registering...

@dryo
Copy link

dryo commented Sep 15, 2024

I wanted to report the same, while I don't know what you mean by 'when settings are changed'. I just installed WF and linked a device. WF wanted to restart but it fails. That's all I did, IIRC.

@direc85
Copy link
Contributor Author

direc85 commented Sep 16, 2024

The steps were:

  • Register Whisperfish as primary
  • Enter main page, settings, linked devices
  • Link Signal Desktop
  • Go back to settings
  • Enable read receipts (will cause Sync)
  • Go back to main page (triggers the Sync)
  • Crash

@gferon
Copy link
Collaborator

gferon commented Sep 16, 2024

So, uh, we don't trust ourselves at such early time? Perhaps we should trigger some session-creation actions after linking and/or registering...

So, for a long time, Signal actually never sent messages to yourself aside from notes to self (which happened later in the process). It looks like you have found a nice bug to solve 😄

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

No branches or pull requests

3 participants