Closed morph027 closed 2 years ago
Not sure if the Signal API recently changed. Looks like as it just stoppey working yesterday.
Hey @morph027 signal changed that messages can only send with unidentified senders. I am on it, but it's quite a lot of work.
It's like that now, when you register you get an id + PW to make API calls. But now you can only use this for downloading a certificate.
With that certificate, your private and some crypto magic you can create new credentials to access the API. That means, you use your credentials including your uuid only once for login. That way, signal can ensure, they don't know who is knocking on their doors. Axolotl hasn't implemented that yet, we only used always the credentials from the registration. And that was turned off now.
I am on it, but it still needs 2 or 3 days
No pressure, glad you found the reason.
Build a new binary and created a new registration.
Registration done.
Get new uidentified sender certificate
[textsecure] Getting SenderCertificate
[textsecure] GET /v1/certificate/delivery 401
[textsecure] Sender certificate: &{}
[textsecure] GetRegisteredContacts
[textsecure] GET /v1/directory/auth 401
[textsecure] getCredentials
[textsecure] GetAndVerifyMultiRemoteAttestation
[textsecure] PUT with auth /v1/attestation/xxx 401
[textsecure] GetRegisteredContacts assestations
[textsecure] GetRegisteredContacts contactDiscoveryRequest
[textsecure] getContactDiscoveryRegisteredUser
[textsecure] PUT with auth & cookie /v1/discovery/xxx 401
[textsecure] GetAndVerifyMultiRemoteAttestation resp
Could not get contacts: Could not get get ContactDiscovery invalid character 'C' looking for beginning of value
[textsecure] Websocket Connecting to signal-server
websocket: bad handshake
websocket: bad handshake
I think this finally solved it. https://github.com/signal-golang/textsecure/commit/ec7fe01df1511a659b19e7499ef34c9af7948aab
Mhm, looks the same with the new build. Should i re-register again?
Hi, are there any news about this problem ? I build new image for signal-web-gateway and tried to re-register but get:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x91f817]
goroutine 1 [running]:
github.com/signal-golang/textsecure.requestCode(0xc000026ef0, 0xd, 0xc000026f38, 0x5, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/go/textsecure/server.go:164 +0x1f7
github.com/signal-golang/textsecure.registerDevice(0xc000022480, 0xc000130480)
/go/textsecure/textsecure.go:396 +0xdc
github.com/signal-golang/textsecure.Setup(0xc0001f8000, 0xc0001f8000, 0x0)
/go/textsecure/textsecure.go:285 +0x13a7
main.main()
/go/textsecure/cmd/textsecure/main.go:507 +0x10a
Thanks in advanced! :)
Hi @nanu-c, just wondering if you had any more time to look into this. Would love to see it work again!
Hey we have it working again but it involves another rust subprocess and i am still undecided how to do it.
A fast workaround would be register with axolotl and copy the files around.
Sadly I know very little of go so I am not of great help here :(
Got a new build including rust crayfish:
INFO[2021/11/14 09:25:19] [textsecure-crayfish] Starting crayfish-backend
DEBU[2021/11/14 09:25:19] [texsecure] register Device
DEBU[2021/11/14 09:25:19] [textsecure] loading config
INFO[2021/11/14 09:25:19] [textsecure] request verification code for +xxx
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x20 pc=0x94a498]
goroutine 1 [running]:
github.com/signal-golang/textsecure.requestCode(0xc0000a0f00, 0xe, 0xac732f, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...)
/home/signal-gateway/textsecure/server.go:125 +0x1f8
github.com/signal-golang/textsecure.registerDevice(0xc0000ea400, 0xc0000f0400)
/home/signal-gateway/textsecure/textsecure.go:421 +0x12d
github.com/signal-golang/textsecure.Setup(0xc0000ea300, 0xc0000ea300, 0x1)
/home/signal-gateway/textsecure/textsecure.go:297 +0x13dd
main.main()
/home/signal-gateway/textsecure/cmd/textsecure/main.go:507 +0x117
A fast workaround would be register with axolotl and copy the files around.
...register with axolotl fails in ubuntu 20.04
So I am not able to send a message because of 404.
ERRO[2021/12/09 xx.xx.xx] [textsecure] invalid recipient id +00000000000
DEBU[2021/12/09 xx.xx.xx] getPreKeys +00000000000 1
DEBU[2021/12/09 xx.xx.xx] [textsecure] GET /v2/keys/+00000000000/1 404
ERRO[2021/12/09 xx.xx.xx] status code 404
+0000000000
is the dummy number replacing the real one.
Would reregistering fix it?
And how a example contacts.yml
should look like? Do I need to set up contacts there?
thanks a lot for your help :+1:
I havn't looked into the cli for a while, best workaround is now to send first a message from the receiver to the cli, extract the uuid and send the message not to the phone number but to the uuid.
Thanks, getting the right session name from the sessions folder works for sending messages. The group invite still not works, but this is now at least some semi working status now :) thanks
Group Invite works :)
I don't have a clue how to send messages via JSON to the group. It doesn't work like sending messages to users:
curl -X POST -d '{"message":"hello"}' https://<GWURL>/json/<USER_ID>
when setting the groupid instead of the USER_ID the response is 404 and the client tries to get the PreKeys
getPreKeys <GROUP_ID> 1
[textsecure] GET /v2/keys/<GROUP_ID>/1 404
Error: status code 404
Any ideas?
actually a group message is like a private message with an group id. It has to be sent individually to each user of the group. In the textsecure backend are functions for triggering a group message. So how do you do your rest api?
When I skipped through the code I saw the group messaging functions. Because I'm not familiar with rust, I couldn't completly understand the API function parameters. Is there an API Call, where I can specify the group, where the message will be sent or does this needs to be implemented?
My Textsecure Server is running in Gateway Mode. I currently loop through the User-UUIDs and send every user a message.
I want to send messages to a group, where I need just to specify the Group ID.
As mentioned I tried to send it via Api with following call:
curl -X POST -d '{"message":"hello"}' https://<GATEWAY-URL>/json/<GROUP_ID>
Thanks to @nanu-c for the Guidance where to look.
I fixed the Regex for the GroupID and made a pull request https://github.com/signal-golang/textsecure/pull/53
Messaging into groups works now with the GroupID ✨
In this issue are many issues combined. Feel free to open them again in new issues. @morph027 is it working now for you?
Somehow it suddenly stopped sending messages and receives a mix of 401 and 404 on requests.