AsamK / signal-cli

signal-cli provides an unofficial commandline, JSON-RPC and dbus interface for the Signal messenger.
GNU General Public License v3.0
3.22k stars 306 forks source link

linking account is failed (exceptions.MissingCapabilitiesException: StatusCode: 409) #1556

Closed bohart closed 3 months ago

bohart commented 4 months ago

Account linking is not working. It always returns StatusCode: 409 with the exception MissingCapabilitiesException.

Here is the debug output:

./signal-cli --config /home/.local/share/signal-cli --verbose link --name "MacbookCLI"
2024-07-20T13:08:02.539Z [main] DEBUG org.asamk.signal.util.IOUtils - XDG_RUNTIME_DIR not set, falling back to temp dir
2024-07-20T13:08:02.554Z [main] DEBUG org.asamk.signal.App - Starting signal-cli 0.13.4
2024-07-20T13:08:02.706Z [main] INFO  LibSignal - [libsignal]: rust/bridge/jni/src/logging.rs:161: Initializing libsignal version:0.47.0
2024-07-20T13:08:03.181Z [main] INFO  LibSignal - [OkHttpWebSocketConnection]: [provisioning:1045731788] connect()
2024-07-20T13:08:03.873Z [OkHttp https://chat.signal.org/...] INFO  LibSignal - [OkHttpWebSocketConnection]: [provisioning:1045731788] onOpen() connected
sgnl://linkdevice?uuid=PeBEDvgQ1r3xqyNMV80-CQ&pub_key=BTYt9nuQQKp34u6t%2FfdqbOuJeUMR2jzGAwoNQ7t92Msw
2024-07-20T13:08:18.656Z [main] INFO  LibSignal - [OkHttpWebSocketConnection]: [provisioning:1045731788] disconnect()
2024-07-20T13:08:18.673Z [main] INFO  o.a.s.m.i.ProvisioningManagerImpl - Received link information from +MYCORRECTNUMBER, linking in progress ...
2024-07-20T13:08:18.780Z [OkHttp https://chat.signal.org/...] INFO  LibSignal - [OkHttpWebSocketConnection]: [provisioning:1045731788] onClosing()
2024-07-20T13:08:18.781Z [OkHttp https://chat.signal.org/...] INFO  LibSignal - [OkHttpWebSocketConnection]: [provisioning:1045731788] onClose()
2024-07-20T13:08:18.788Z [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2024-07-20T13:08:18.933Z [main] INFO  com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.sqlite.jdbc4.JDBC4Connection@6a1ebcff
2024-07-20T13:08:18.935Z [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
2024-07-20T13:08:19.057Z [main] DEBUG o.a.s.m.s.r.MergeRecipientHelper - Got new recipient, serviceId, PNI, number, username are unknown
2024-07-20T13:08:19.081Z [main] DEBUG o.a.s.m.s.recipients.RecipientStore - Added new recipient RecipientId[id=1] with address RecipientAddress[aci=Optional[9abc55a7-2a89-4ce0-97c2-5207ae6d1685], pni=Optional[PNI:2bf142d5-946e-487a-aefa-2acbf6272094], number=Optional[+MYCORRECTNUMBER], username=Optional.empty]
2024-07-20T13:08:19.183Z [main] DEBUG o.a.s.m.s.i.IdentityKeyStore - Storing new identity for recipient 9abc55a7-2a89-4ce0-97c2-5207ae6d1685 with trust TRUSTED_UNVERIFIED
2024-07-20T13:08:19.234Z [main] DEBUG o.a.s.m.s.i.IdentityKeyStore - Updating trust level for recipient 9abc55a7-2a89-4ce0-97c2-5207ae6d1685 with trust TRUSTED_VERIFIED
2024-07-20T13:08:19.278Z [main] DEBUG o.a.s.m.s.i.IdentityKeyStore - Storing new identity for recipient PNI:2bf142d5-946e-487a-aefa-2acbf6272094 with trust TRUSTED_UNVERIFIED
2024-07-20T13:08:19.330Z [main] DEBUG o.a.s.m.s.i.IdentityKeyStore - Updating trust level for recipient PNI:2bf142d5-946e-487a-aefa-2acbf6272094 with trust TRUSTED_VERIFIED
2024-07-20T13:08:19.469Z [main] DEBUG o.a.s.m.i.ProvisioningManagerImpl - Finishing new device registration
2024-07-20T13:08:20.397Z [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2024-07-20T13:08:20.401Z [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
Link request error: StatusCode: 409
org.whispersystems.signalservice.internal.push.exceptions.MissingCapabilitiesException: StatusCode: 409
        at org.whispersystems.signalservice.internal.push.PushServiceSocket.lambda$static$0(PushServiceSocket.java:667)
        at org.whispersystems.signalservice.internal.push.PushServiceSocket.makeServiceRequest(PushServiceSocket.java:2221)
        at org.whispersystems.signalservice.internal.push.PushServiceSocket.makeServiceRequest(PushServiceSocket.java:2159)
        at org.whispersystems.signalservice.internal.push.PushServiceSocket.finishNewDeviceRegistration(PushServiceSocket.java:661)
        at org.whispersystems.signalservice.api.SignalServiceAccountManager.finishNewDeviceRegistration(SignalServiceAccountManager.java:758)
        at org.asamk.signal.manager.internal.ProvisioningManagerImpl.finishDeviceLink(ProvisioningManagerImpl.java:151)
        at org.asamk.signal.commands.LinkCommand.handleCommand(LinkCommand.java:46)
        at org.asamk.signal.commands.CommandHandler.handleProvisioningCommand(CommandHandler.java:25)
        at org.asamk.signal.App.handleProvisioningCommand(App.java:255)
        at org.asamk.signal.App.handleCommand(App.java:158)
        at org.asamk.signal.App.init(App.java:144)
        at org.asamk.signal.Main.main(Main.java:56)

Would appreciate any suggestions on how to fix this. Thanks!

AsamK commented 4 months ago

It's related to a new feature flag, that will be included in the next signal-cli version (https://github.com/AsamK/signal-cli/commit/5ff66728e32237a23fdffda4515031d24dad7cf0) If you want you can try running the latest development build and see if it works: https://github.com/AsamK/signal-cli/actions/runs/9681344917

nlpsl202 commented 3 months ago

Hi, How do I download the lastest build version to my local?

m-ueberall commented 3 months ago

Hi, How do I download the lastest build version to my local?

@nlpsl202: Maybe you overlooked it because you did not scroll down ...

  1. Go to the link mentioned by @AsamK (https://github.com/AsamK/signal-cli/actions/runs/9681344917#artifacts has the artifacts of the latest test build at the bottom of said page)
  2. Select one of the three offered alternatives: signal-cli-archive-21.zip, signal-cli-archive-22.zip, or signal-cli-native.zip
  3. Extract the contents of the downloaded .zip archive; the "native" variant contains a binary, the other two contain a .tar.gz archive with the required Java 21/22 archives and shell scripts, similar to the archives for the regular release (https://github.com/AsamK/signal-cli/releases/download/v0.13.4/signal-cli-0.13.4.tar.gz and https://github.com/AsamK/signal-cli/releases/download/v0.13.4/signal-cli-0.13.4-Linux-native.tar.gz).
DanShaqFu commented 3 months ago

Having the same issue. Unfortunately, this breaks the home assistant plugin for me (and others). Releasing the already available fix would enable the authors of

k-bx commented 3 months ago

Issue isn't fixed in latest master unfortunately

UPD: THIS IS WRONG, IT WORKS. see below

k-bx commented 3 months ago

Apologies. Latest master does work, my bad, tested with older version by mistake!