GithubHelp home page GithubHelp logo

Comments (23)

morph027 avatar morph027 commented on August 19, 2024 2

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

from textsecure.

nanu-c avatar nanu-c commented on August 19, 2024 1

I am on it, but it still needs 2 or 3 days

from textsecure.

NiTRoeSE avatar NiTRoeSE commented on August 19, 2024 1

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! :)

from textsecure.

nanu-c avatar nanu-c commented on August 19, 2024 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.

from textsecure.

morph027 avatar morph027 commented on August 19, 2024

Not sure if the Signal API recently changed. Looks like as it just stoppey working yesterday.

from textsecure.

nanu-c avatar nanu-c commented on August 19, 2024

Hey @morph027 signal changed that messages can only send with unidentified senders. I am on it, but it's quite a lot of work.

from textsecure.

nanu-c avatar nanu-c commented on August 19, 2024

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.

from textsecure.

morph027 avatar morph027 commented on August 19, 2024

No pressure, glad you found the reason.

from textsecure.

morph027 avatar morph027 commented on August 19, 2024

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

from textsecure.

nanu-c avatar nanu-c commented on August 19, 2024

I think this finally solved it. ec7fe01

from textsecure.

morph027 avatar morph027 commented on August 19, 2024

Mhm, looks the same with the new build. Should i re-register again?

from textsecure.

achaiah avatar achaiah commented on August 19, 2024

Hi @nanu-c, just wondering if you had any more time to look into this. Would love to see it work again!

from textsecure.

nanu-c avatar nanu-c commented on August 19, 2024

Hey we have it working again but it involves another rust subprocess and i am still undecided how to do it.

from textsecure.

nanu-c avatar nanu-c commented on August 19, 2024

A fast workaround would be register with axolotl and copy the files around.

from textsecure.

achaiah avatar achaiah commented on August 19, 2024

Sadly I know very little of go so I am not of great help here :(

from textsecure.

NiTRoeSE avatar NiTRoeSE commented on August 19, 2024

A fast workaround would be register with axolotl and copy the files around.

...register with axolotl fails in ubuntu 20.04

from textsecure.

Hetti avatar Hetti commented on August 19, 2024

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 👍

from textsecure.

Hetti avatar Hetti commented on August 19, 2024

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

from textsecure.

Hetti avatar Hetti commented on August 19, 2024

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?

from textsecure.

nanu-c avatar nanu-c commented on August 19, 2024

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?

from textsecure.

Hetti avatar Hetti commented on August 19, 2024

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>

from textsecure.

Hetti avatar Hetti commented on August 19, 2024

Thanks to @nanu-c for the Guidance where to look.

I fixed the Regex for the GroupID and made a pull request #53

Messaging into groups works now with the GroupID

from textsecure.

nanu-c avatar nanu-c commented on August 19, 2024

In this issue are many issues combined. Feel free to open them again in new issues. @morph027 is it working now for you?

from textsecure.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.