Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Unable to send messages using latest build #31

Open
morph027 opened this issue Jan 24, 2021 · 22 comments
Open

Unable to send messages using latest build #31

morph027 opened this issue Jan 24, 2021 · 22 comments

Comments

@morph027
Copy link
Collaborator

I've just rebuild the signal commandline binary using the latest build and can't send messages.

The log says:

INFO[2021/01/24 20:39:56] Registration done.                           
DEBU[2021/01/24 20:39:56] [textsecure] missing my uuid defer           
DEBU[2021/01/24 20:39:56] [textsecure] get my uuid                     
DEBU[2021/01/24 20:39:57] [textsecure] GET /v1/accounts/whoami 200     
DEBU[2021/01/24 20:39:57] [textsecure] PUT /v1/messages/+.... 409 
DEBU[2021/01/24 20:39:57] [textsecure] Mismatched devices: {MissingDevices:[2] ExtraDevices:[]} 
DEBU[2021/01/24 20:39:57] [textsecure] PUT /v1/messages/+.... 200 
DEBU[2021/01/24 20:39:57] [textsecure] SendMessageResponse: {NeedsSync:false Timestamp:1611517197065}

The mobile phone only says "Unterhaltungssitzung aktualisert"

signal-2021-01-24-204355

@nanu-c
Copy link
Contributor

nanu-c commented Jan 24, 2021

that's because signal is starting to disable sending message by phone number and also you can't get the public key anymore:
PUT /v1/messages/+.... 409

Therefore i am writing the support for the contact discovery service.

@nanu-c
Copy link
Contributor

nanu-c commented Jan 24, 2021

To fetch the uuid and then send the message to the uuid. With that latest version, try to reset the conversation, then textsecure gets the uuid

@nanu-c
Copy link
Contributor

nanu-c commented Jan 24, 2021

@morph027
Copy link
Collaborator Author

Ah, okay. Just had a quick look into the branch already. Will try and let you know. As always, thanks for the work!!

@bertwesarg
Copy link
Contributor

One, question though. I use the CLI for 2FA with Nextcloud. Do you have an ETA, when the sending by number wont work anymore without your #27?

@morph027
Copy link
Collaborator Author

compiled w/ new_contacts branch:

INFO[2021/01/25 08:48:41] Registration done.                           
DEBU[2021/01/25 08:48:41] [textsecure] missing my uuid defer           
DEBU[2021/01/25 08:48:41] [textsecure] get my uuid                     
DEBU[2021/01/25 08:48:42] GET /v1/accounts/whoami 200                  
DEBU[2021/01/25 08:48:42] GET /v1/directory/auth 200                   
DEBU[2021/01/25 08:48:42] [textsecure] getCredentials                  
DEBU[2021/01/25 08:48:42] [textsecure] GetAndVerifyMultiRemoteAttestation 
DEBU[2021/01/25 08:48:43] [textsecure] PUT /v1/attestation/xxx 200 
DEBU[2021/01/25 08:48:43] [textsecure] GetAndVerifyMultiRemoteAttestation key  
DEBU[2021/01/25 08:48:43] [textsecure] validateAndBuildRemoteAttestation  <nil> 
DEBU[2021/01/25 08:48:43] [textsecure] GetRegisteredContacts assestations 
DEBU[2021/01/25 08:48:43] [textsecure] GetRegisteredContacts contactDiscoveryRequest 
DEBU[2021/01/25 08:48:43] [textsecure] getContactDiscoveryRegisteredUser 
DEBU[2021/01/25 08:48:45] [textsecure] PUT with auth & cookoie /v1/discovery/xxx 200  
DEBU[2021/01/25 08:48:45] [textsecure] GetAndVerifyMultiRemoteAttestation resp 
DEBU[2021/01/25 08:48:45] [textsecure] PUT /v1/messages/+xxx 409 
DEBU[2021/01/25 08:48:45] [textsecure] Mismatched devices: {MissingDevices:[2] ExtraDevices:[]} 
DEBU[2021/01/25 08:48:45] [textsecure] PUT /v1/messages/+xxx 200 
DEBU[2021/01/25 08:48:45] [textsecure] SendMessageResponse: {NeedsSync:false Timestamp:1611560925669}

@nanu-c
Copy link
Contributor

nanu-c commented Jan 25, 2021

Do you have added the user you are sending to the contacts?

@morph027
Copy link
Collaborator Author

Via id or via tel ?

@nanu-c
Copy link
Contributor

nanu-c commented Jan 25, 2021

I have added a WriteContactsToPath() call in the GetRegisteredContacts() so it should update the contacts.yml with the uuid and can you try if it works when you change in cmd/textsecure/main.go line 580 to to = c.UUID ?

@morph027
Copy link
Collaborator Author

INFO[2021/01/26 08:25:54] Registration done.                           
DEBU[2021/01/26 08:25:54] [textsecure] missing my uuid defer           
DEBU[2021/01/26 08:25:54] [textsecure] get my uuid                     
DEBU[2021/01/26 08:25:54] GET /v1/accounts/whoami 200                  
DEBU[2021/01/26 08:25:54] GET /v1/directory/auth 200                   
DEBU[2021/01/26 08:25:54] [textsecure] getCredentials                  
DEBU[2021/01/26 08:25:54] [textsecure] GetAndVerifyMultiRemoteAttestation 
DEBU[2021/01/26 08:25:55] [textsecure] PUT /v1/attestation/xxx 200 
DEBU[2021/01/26 08:25:55] [textsecure] GetAndVerifyMultiRemoteAttestation key  
DEBU[2021/01/26 08:25:55] [textsecure] validateAndBuildRemoteAttestation  <nil> 
DEBU[2021/01/26 08:25:55] [textsecure] GetRegisteredContacts assestations 
DEBU[2021/01/26 08:25:55] [textsecure] GetRegisteredContacts contactDiscoveryRequest 
DEBU[2021/01/26 08:25:55] [textsecure] getContactDiscoveryRegisteredUser 
DEBU[2021/01/26 08:25:57] [textsecure] PUT with auth & cookoie /v1/discovery/xxx 200  
DEBU[2021/01/26 08:25:57] [textsecure] GetAndVerifyMultiRemoteAttestation resp 
DEBU[2021/01/26 08:25:57] GET /v2/keys/xxx/1 404 
FATA[2021/01/26 08:25:57] status code 404

The contacts.yml has been updated with uuid and more data 👍 But sending still fails.

@morph027
Copy link
Collaborator Author

Hint: It works for devices already present (sent messages in the past). It just fails for any new device.

@nanu-c
Copy link
Contributor

nanu-c commented Jan 26, 2021

I missed the correct byte to string mapping for uuids, see if 16b9c60 works

@morph027
Copy link
Collaborator Author

Ahhh....yes, it works!

@morph027
Copy link
Collaborator Author

morph027 commented Jan 26, 2021

Update: works for single contact, not for groups (might be missing code in cli ... something related to the sendGroupHelper, as it's still using a tel number according to debug output)

@nanu-c
Copy link
Contributor

nanu-c commented Jan 26, 2021

054ae62 maybe this?

@morph027
Copy link
Collaborator Author

Hehe... works with group, but doesn't work with single contacts anymore ;) Sending to group does segfault also.

Group:

INFO[2021/01/26 20:39:12] Registration done.                           
DEBU[2021/01/26 20:39:12] [textsecure] missing my uuid defer           
DEBU[2021/01/26 20:39:12] [textsecure] get my uuid                     
DEBU[2021/01/26 20:39:12] GET /v1/accounts/whoami 200                  
DEBU[2021/01/26 20:39:12] [textsecure] GetRegisteredContacts           
DEBU[2021/01/26 20:39:12] GET /v1/directory/auth 200                   
DEBU[2021/01/26 20:39:12] [textsecure] getCredentials                  
DEBU[2021/01/26 20:39:12] [textsecure] GetAndVerifyMultiRemoteAttestation 
DEBU[2021/01/26 20:39:13] [textsecure] PUT /v1/attestation/xxx 200 
DEBU[2021/01/26 20:39:13] [textsecure] GetAndVerifyMultiRemoteAttestation key  
DEBU[2021/01/26 20:39:13] [textsecure] validateAndBuildRemoteAttestation  <nil> 
DEBU[2021/01/26 20:39:13] [textsecure] GetRegisteredContacts assestations 
DEBU[2021/01/26 20:39:13] [textsecure] GetRegisteredContacts contactDiscoveryRequest 
DEBU[2021/01/26 20:39:13] [textsecure] getContactDiscoveryRegisteredUser 
DEBU[2021/01/26 20:39:15] [textsecure] PUT with auth & cookoie /v1/discovery/xxx 200  
DEBU[2021/01/26 20:39:15] [textsecure] GetAndVerifyMultiRemoteAttestation resp 
DEBU[2021/01/26 20:39:15] GET /v2/keys/xxx/1 200 
DEBU[2021/01/26 20:39:15] no prekey for contact xxx, device 1 
DEBU[2021/01/26 20:39:15] [textsecure] PUT /v1/messages/xxx 409 
DEBU[2021/01/26 20:39:15] [textsecure] Mismatched devices: {MissingDevices:[2 5 6] ExtraDevices:[]} 
DEBU[2021/01/26 20:39:15] GET /v2/keys/xxx/2 200 
DEBU[2021/01/26 20:39:15] no prekey for contact xxx, device 2 
DEBU[2021/01/26 20:39:15] GET /v2/keys/xxx/5 200 
DEBU[2021/01/26 20:39:15] no prekey for contact xxx, device 5 
DEBU[2021/01/26 20:39:15] GET /v2/keys/xxx/6 200 
DEBU[2021/01/26 20:39:15] no prekey for contact xxx, device 6 
DEBU[2021/01/26 20:39:16] [textsecure] PUT /v1/messages/xxx 200 
DEBU[2021/01/26 20:39:16] [textsecure] SendMessageResponse: {NeedsSync:false Timestamp:1611689955275} 
DEBU[2021/01/26 20:39:16] [textsecure] sendGroupHelper message to group sent xxx 
DEBU[2021/01/26 20:39:16] [textsecure] PUT /v1/messages/xxx 409 
DEBU[2021/01/26 20:39:16] [textsecure] Mismatched devices: {MissingDevices:[2] ExtraDevices:[]} 
DEBU[2021/01/26 20:39:16] [textsecure] PUT /v1/messages/xxx 200 
DEBU[2021/01/26 20:39:16] [textsecure] SendMessageResponse: {NeedsSync:false Timestamp:1611689955275} 
DEBU[2021/01/26 20:39:16] [textsecure] sendGroupHelper message to group sent xxx 
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x92fd3a]

goroutine 1 [running]:
github.com/signal-golang/textsecure.sendGroupHelper(0x7ffdd8592791, 0x20, 0x7ffdd859277f, 0xd, 0x0, 0xc4bda62b00000000, 0xc0001e4a20, 0xc400000000a487c0, 0x1)
	/go/src/github.com/signal-golang/textsecure/groups.go:246 +0x21a
github.com/signal-golang/textsecure.SendGroupMessage(...)
	/go/src/github.com/signal-golang/textsecure/groups.go:274
main.sendMessage(0xc0002b2101, 0x7ffdd8592791, 0x20, 0x7ffdd859277f, 0xd, 0x0, 0xc00000e460)
	/go/src/github.com/signal-golang/textsecure/cmd/textsecure/main.go:145 +0x77
main.main()
	/go/src/github.com/signal-golang/textsecure/cmd/textsecure/main.go:622 +0x65c

Sending to single contact works for one device (desktop client) but my mobile just shows the same error as above (Unterhaltungssitzung aktualisert).

INFO[2021/01/26 20:43:54] Registration done.                           
DEBU[2021/01/26 20:43:54] [textsecure] missing my uuid defer           
DEBU[2021/01/26 20:43:54] [textsecure] get my uuid                     
DEBU[2021/01/26 20:43:55] GET /v1/accounts/whoami 200                  
DEBU[2021/01/26 20:43:55] [textsecure] GetRegisteredContacts           
DEBU[2021/01/26 20:43:55] GET /v1/directory/auth 200                   
DEBU[2021/01/26 20:43:55] [textsecure] getCredentials                  
DEBU[2021/01/26 20:43:55] [textsecure] GetAndVerifyMultiRemoteAttestation 
DEBU[2021/01/26 20:43:55] [textsecure] PUT /v1/attestation/xxx 200 
DEBU[2021/01/26 20:43:55] [textsecure] GetAndVerifyMultiRemoteAttestation key  
DEBU[2021/01/26 20:43:55] [textsecure] validateAndBuildRemoteAttestation  <nil> 
DEBU[2021/01/26 20:43:55] [textsecure] GetRegisteredContacts assestations 
DEBU[2021/01/26 20:43:55] [textsecure] GetRegisteredContacts contactDiscoveryRequest 
DEBU[2021/01/26 20:43:55] [textsecure] getContactDiscoveryRegisteredUser 
DEBU[2021/01/26 20:43:57] [textsecure] PUT with auth & cookoie /v1/discovery/xxx 200  
DEBU[2021/01/26 20:43:57] [textsecure] GetAndVerifyMultiRemoteAttestation resp 
DEBU[2021/01/26 20:43:58] [textsecure] PUT /v1/messages/xxx 409 
DEBU[2021/01/26 20:43:58] [textsecure] Mismatched devices: {MissingDevices:[2 5 6] ExtraDevices:[]} 
DEBU[2021/01/26 20:43:58] [textsecure] PUT /v1/messages/xxx 200 
DEBU[2021/01/26 20:43:58] [textsecure] SendMessageResponse: {NeedsSync:false Timestamp:1611690237887}

@nanu-c
Copy link
Contributor

nanu-c commented Jan 26, 2021

i found a check for invalid pointer, the problem is, we don't save uuid's for group members that aren't in our contact list, yet

@nanu-c
Copy link
Contributor

nanu-c commented Feb 5, 2021

I had to merge it, will work further on the groups uuid, the merge request already improves the situation

@teutat3s
Copy link

teutat3s commented Mar 23, 2021

For me with the latest build v1.2.14 the no prekey for contact error is gone - messages can be send out fine again! Thank you very much!

@Hetti
Copy link

Hetti commented May 27, 2021

I'm encountering this behaviour with the latest build in a different way:
I am getting the messages on my local phone when sending it with the CLI.
But on the Desktop Client it says it has the same behaviour with the: "Unterhaltungssitzung aktualisert" Message.

Although, I am getting the messages on the textsecure client, when sending it from the Desktop App.

The debug log:

DEBU[DATE] [textsecure] Websocket sending message
DEBU[DATE] GET /v2/keys/NUMBER/1 200
DEBU[DATE] GET /v2/keys/NUMBER/2 200
DEBU[DATE] [textsecure] makePreKeyBundle no prekey for contact NUMBER, device 2
DEBU[DATE] [textsecure] PUT /v1/messages/NUMBER 200
DEBU[DATE] [textsecure] SendMessageResponse: {NeedsSync:false Timestamp:TIMESTAMP}

Resetting the Session on the Desktop App doesn't make it work. Interestingly, when resetting the session on the Desktop Client, I am not able to send a message to the textsecure client with the Desktop Client (Mobile works fine)

Any Ideas? :-)
Or is this still Work in Progress (WiP)?

@nanu-c
Copy link
Contributor

nanu-c commented May 28, 2021

Actually what's wrong here is, that PUT /v1/messages/NUMBER 200 and DEBU[DATE] GET /v2/keys/NUMBER/1 200 should be DEBU[DATE] GET /v2/keys/UUID/1 200. Is there a phone number or a uuid?

@Hetti
Copy link

Hetti commented May 28, 2021

NUMBER was in this Case the Phone Number and Not the UUID.

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

No branches or pull requests

5 participants