bbernhard / signal-cli-rest-api

Dockerized Signal Messenger REST API
https://bbernhard.github.io/signal-cli-rest-api/
MIT License
1.29k stars 154 forks source link

Issue with latest release: Username must contain a '.' #547

Open shim895 opened 3 months ago

shim895 commented 3 months ago

The problem

I am a Home Assistant user, running signal-cli-rest-api in a docker container. I recently updated the signal rest api to the latest release. I am now getting an error upon attempting a send, either via Home Assistant or via a curl command.

Is there a new username requirement?

java.lang.RuntimeException: org.signal.libsignal.usernames.MissingSeparatorException: Username must contain a '.' at org.asamk.signal.manager.helper.RecipientHelper.resolveRecipientByUsernameOrLink(RecipientHelper.java:105) at org.asamk.signal.manager.helper.RecipientHelper.resolveRecipient(RecipientHelper.java:93) at org.asamk.signal.manager.internal.ManagerImpl.sendMessage(ManagerImpl.java:622) at org.asamk.signal.manager.internal.ManagerImpl.sendMessage(ManagerImpl.java:598) at org.asamk.signal.manager.internal.ManagerImpl.sendMessage(ManagerImpl.java:726) at org.asamk.signal.commands.SendCommand.handleCommand(SendCommand.java:245) at org.asamk.signal.commands.CommandHandler.handleLocalCommand(CommandHandler.java:35) at org.asamk.signal.App.handleLocalCommand(App.java:278) at org.asamk.signal.App.handleCommand(App.java:179) at org.asamk.signal.App.init(App.java:144) at org.asamk.signal.Main.main(Main.java:56) at java.base@21/java.lang.invoke.LambdaForm$DMH/sa346b79c.invokeStaticInit(LambdaForm$DMH) Caused by: org.signal.libsignal.usernames.MissingSeparatorException: Username must contain a '.' at org.signal.libsignal.internal.Native.Username_Hash(Native Method) at org.signal.libsignal.usernames.Username.lambda$hash$6(Username.java:148) at org.signal.libsignal.internal.FilterExceptions.filterExceptions(FilterExceptions.java:143) at org.signal.libsignal.usernames.Username.hash(Username.java:148) at org.signal.libsignal.usernames.Username.(Username.java:57) at org.asamk.signal.manager.helper.RecipientHelper.getUsernameFromUsernameOrLink(RecipientHelper.java:137) at org.asamk.signal.manager.helper.RecipientHelper.resolveRecipientByUsernameOrLink(RecipientHelper.java:103) ... 11 more

Are you using the latest released version?

Have you read the troubleshooting page?

What type of installation are you running?

signal-cli-rest-api Docker Container

In which mode are you using the docker container?

Native Mode

What's the architecture of your host system?

x86-64

Additional information

No response

bbernhard commented 3 months ago

That looks like a upstream behavioral change in libsignal. I guess you need to change your username to match that requirement.

shim895 commented 3 months ago

OK, I found a new requirement to have a username in the signal frontend, which I have added. I removed my signal-cli-rest-api docker container and started. Still getting the error. Do I need to go through registration again? Thanks!

bbernhard commented 3 months ago

How/where did you set the username?

shim895 commented 3 months ago

I set it in the Signal app under Settings >> Profile. However, doing this has still not solved the original issue for me.


From: Bernhard B. @.> Sent: Monday, June 17, 2024 1:15:58 PM To: bbernhard/signal-cli-rest-api @.> Cc: Ryan Schilmoeller @.>; Author @.> Subject: Re: [bbernhard/signal-cli-rest-api] Issue with latest release: Username must contain a '.' (Issue #547)

How/where did you set the username?

— Reply to this email directly, view it on GitHubhttps://github.com/bbernhard/signal-cli-rest-api/issues/547#issuecomment-2174034080, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGBMQIVWA5ME3BBP3O45ATTZH4RV5AVCNFSM6AAAAABJI2IEN2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZUGAZTIMBYGA. You are receiving this because you authored the thread.Message ID: @.***>

bbernhard commented 3 months ago

I guess you are using a linked device?

shim895 commented 3 months ago

Yes, using a linked device. Scanned with QR code. Should I be doing something different?

bbernhard commented 3 months ago

Unfortunately, I do not have much experience with linked devices. So, not really sure how signal-cli syncs with the primary device. Do you periodically call the receive endpoint?

You could also try to set the username via the API: https://bbernhard.github.io/signal-cli-rest-api/#/Accounts/post_v1_accounts__number__username