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

[uploadAttachmentV2] Pipe unavailable #1613

Closed DL6ER closed 3 weeks ago

DL6ER commented 3 weeks ago

I am getting

Failed to send message: [404] Not found (NotFoundException)

when trying to send any attachments, e.g.,

root@7bae440ed216:/work# /signal-cli/bin/signal-cli --config /signal-cli-config -u <my FROM> send <my TO> -a /tmp/figure.png

However, the file should be accessible just fine

root@7bae440ed216:/work# ls -lh /tmp
total 124K
-rw-r--r-- 1 root root  37K Oct 23 21:20  figure.png

and sending messages without attachments works flawlessly, e.g.,

root@7bae440ed216:/work# /signal-cli/bin/signal-cli --config /signal-cli-config -u <my FROM> send <my TO> -m "Test 123"

With --verbose, I am getting:

2024-10-27T07:42:35.039Z [main] DEBUG org.asamk.signal.util.IOUtils - XDG_RUNTIME_DIR not set, falling back to temp dir
2024-10-27T07:42:35.047Z [main] DEBUG org.asamk.signal.App - Starting signal-cli 0.12.8
2024-10-27T07:42:35.230Z [main] INFO  LibSignal - [libsignal]: rust/bridge/jni/src/logging.rs:158: Initializing libsignal version:0.36.1
2024-10-27T07:42:35.463Z [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2024-10-27T07:42:35.536Z [main] INFO  com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.sqlite.jdbc4.JDBC4Connection@3b0c9195
2024-10-27T07:42:35.538Z [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
2024-10-27T07:42:36.845Z [main] WARN  LibSignal - [PhoneNumberFormatter]: Got local CC: DE
2024-10-27T07:42:36.957Z [main] WARN  LibSignal - [SignalServiceMessageSender]: Using legacy attachment upload endpoint.
2024-10-27T07:42:36.974Z [main] WARN  LibSignal - [SignalServiceMessageSender]: [uploadAttachmentV2] Pipe unavailable, falling back... (WebSocketUnavailableException: WebSocket not currently available.)
2024-10-27T07:42:37.076Z [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2024-10-27T07:42:37.077Z [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
Failed to send message: [404] Not found (NotFoundException)
org.whispersystems.signalservice.api.push.exceptions.NotFoundException: [404] Not found
        at org.whispersystems.signalservice.internal.push.PushServiceSocket.validateServiceResponse(PushServiceSocket.java:2062)
        at org.whispersystems.signalservice.internal.push.PushServiceSocket.makeServiceRequest(PushServiceSocket.java:2037)
        at org.whispersystems.signalservice.internal.push.PushServiceSocket.makeServiceRequest(PushServiceSocket.java:1974)
        at org.whispersystems.signalservice.internal.push.PushServiceSocket.makeServiceRequest(PushServiceSocket.java:1968)
        at org.whispersystems.signalservice.internal.push.PushServiceSocket.getAttachmentV2UploadAttributes(PushServiceSocket.java:1403)
        at org.whispersystems.signalservice.api.SignalServiceMessageSender.uploadAttachmentV2(SignalServiceMessageSender.java:850)
        at org.whispersystems.signalservice.api.SignalServiceMessageSender.uploadAttachment(SignalServiceMessageSender.java:830)
        at org.asamk.signal.manager.helper.AttachmentHelper.uploadAttachment(AttachmentHelper.java:64)
        at org.asamk.signal.manager.helper.AttachmentHelper.uploadAttachments(AttachmentHelper.java:52)
        at org.asamk.signal.manager.internal.ManagerImpl.applyMessage(ManagerImpl.java:668)
        at org.asamk.signal.manager.internal.ManagerImpl.sendMessage(ManagerImpl.java:642)
        at org.asamk.signal.commands.SendCommand.handleCommand(SendCommand.java:235)
        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:61)

out of which

2024-10-27T07:42:36.974Z [main] WARN  LibSignal - [SignalServiceMessageSender]: [uploadAttachmentV2] Pipe unavailable, falling back... (WebSocketUnavailableException: WebSocket not currently available.)

is looking really suspicious. Any further tips what I could try? At the time of speaking, I am bound to 0.12.8 as I don't have a more recent Java in my current Debian Bullseye VM.

DL6ER commented 3 weeks ago

Duplicate of closed https://github.com/AsamK/signal-cli/issues/1609, just found it now as there is no open issue ticket about this.