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

NullPointerException on [...]crypto.UnidentifiedAccess.getUnidentifiedCertificate() on sending message to a group #1568

Closed Bergdoktor closed 2 months ago

Bergdoktor commented 3 months ago

hi, posting here for the first time since I'm facing a new issue with our signal-bot written in python. It used to work fine a few days ago but now I can't send any more messages to our group chat via the signal-cli. Tried "everything" from re-registering/re-linking, deleting local storage, sending simpler messages but I always get the same error and the message doesn't go through.

signal-cli is 0.13.5 running on an ubuntu 22.04 VM via proxmox.

I hope somebody can point me in the right direction :-)

Error message is following:

java.lang.NullPointerException: Cannot invoke "org.whispersystems.signalservice.api.crypto.UnidentifiedAccess.getUnidentifiedCertificate()" because the return value of "kotlin.collections.CollectionsKt.first(java.util.List)" is null`

Whole verbose output from the command is :

./signal-cli -vv -u _MYPHONENUMBER_ send -g _GROUPID_ -m 'Heute geht das Essen an @mention. -- Euer Essensverteiler-Bot' --mention 24:8:_USERID_

2024-08-19T11:35:26.806Z [main] DEBUG org.asamk.signal.App - Starting signal-cli 0.13.5
2024-08-19T11:35:27.111Z [main] TRACE org.asamk.signal.manager.Manager - Expected exception when checking libsignal-client: Failed to deserialize zkgroup::api::groups::uuid_ciphertext::UuidCiphertext
2024-08-19T11:35:27.111Z [main] DEBUG org.asamk.signal.util.IOUtils - XDG_DATA_HOME not set, falling back to home dir
2024-08-19T11:35:27.344Z [main] TRACE org.asamk.signal.App - Loading account file for +_MYPHONENUMBER_
2024-08-19T11:35:27.417Z [main] TRACE o.a.s.manager.storage.SignalAccount - Opening account file
2024-08-19T11:35:27.419Z [main] TRACE o.a.s.manager.storage.SignalAccount - Loading account file 876777
2024-08-19T11:35:27.502Z [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Starting...
2024-08-19T11:35:27.631Z [main] INFO  com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Added connection org.sqlite.jdbc4.JDBC4Connection@55342f40
2024-08-19T11:35:27.633Z [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Start completed.
2024-08-19T11:35:27.642Z [main] TRACE o.a.s.m.storage.AccountDatabase - Current database version: 26 Program database version: 26
2024-08-19T11:35:29.474Z [msl-cleanup] TRACE o.a.s.m.s.s.MessageSendLogStore - No outdated entries to be removed from message send log.
2024-08-19T11:35:29.480Z [main] TRACE o.a.s.m.h.UnidentifiedAccessHelper - Unidentified access not available for RecipientId[id=193]
2024-08-19T11:35:29.485Z [main] TRACE o.a.s.m.h.UnidentifiedAccessHelper - Using normal sender certificate for message to RecipientId[id=68]
2024-08-19T11:35:29.609Z [main] TRACE o.a.s.m.h.UnidentifiedAccessHelper - Using normal sender certificate for message to RecipientId[id=86]
2024-08-19T11:35:29.610Z [main] TRACE o.a.s.m.h.UnidentifiedAccessHelper - Unidentified access not available for RecipientId[id=122]
2024-08-19T11:35:29.612Z [main] TRACE o.a.s.m.h.UnidentifiedAccessHelper - Using normal sender certificate for message to RecipientId[id=107]
2024-08-19T11:35:29.613Z [main] TRACE o.a.s.m.h.UnidentifiedAccessHelper - Using normal sender certificate for message to RecipientId[id=109]
2024-08-19T11:35:29.615Z [main] TRACE o.a.s.m.h.UnidentifiedAccessHelper - Using normal sender certificate for message to RecipientId[id=30]
2024-08-19T11:35:29.616Z [main] TRACE o.a.s.m.h.UnidentifiedAccessHelper - Using normal sender certificate for message to RecipientId[id=46]
2024-08-19T11:35:29.617Z [main] DEBUG o.a.signal.manager.helper.SendHelper - Can use sender key for 2/8 recipients.
2024-08-19T11:35:29.620Z [main] TRACE o.a.s.m.h.UnidentifiedAccessHelper - Unidentified access not available for RecipientId[id=193]
2024-08-19T11:35:29.621Z [main] TRACE o.a.s.m.h.UnidentifiedAccessHelper - Unidentified access not available for RecipientId[id=122]
2024-08-19T11:35:29.656Z [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown initiated...
2024-08-19T11:35:29.658Z [main] INFO  com.zaxxer.hikari.HikariDataSource - HikariPool-1 - Shutdown completed.
2024-08-19T11:35:29.659Z [msl-cleanup] DEBUG o.a.s.m.s.s.MessageSendLogStore - Stopping msl cleanup thread
java.lang.NullPointerException: Cannot invoke "org.whispersystems.signalservice.api.crypto.UnidentifiedAccess.getUnidentifiedCertificate()" because the return value of "kotlin.collections.CollectionsKt.first(java.util.List)" is null
        at org.whispersystems.signalservice.api.crypto.SealedSenderAccess$GroupUnidentifiedAccess.<init>(SealedSenderAccess.kt:100)
        at org.whispersystems.signalservice.api.crypto.SealedSenderAccess$Companion.forGroupSend(SealedSenderAccess.kt:185)
        at org.whispersystems.signalservice.api.crypto.SealedSenderAccess.forGroupSend(SealedSenderAccess.kt)
        at org.whispersystems.signalservice.api.SignalServiceMessageSender.sendGroupMessage(SignalServiceMessageSender.java:2506)
        at org.whispersystems.signalservice.api.SignalServiceMessageSender.sendGroupDataMessage(SignalServiceMessageSender.java:607)
        at org.asamk.signal.manager.helper.SendHelper.lambda$sendGroupMessage$14(SendHelper.java:385)
        at org.asamk.signal.manager.helper.SendHelper.sendGroupMessageInternalWithSenderKey(SendHelper.java:614)
        at org.asamk.signal.manager.helper.SendHelper.sendGroupMessageInternal(SendHelper.java:488)
        at org.asamk.signal.manager.helper.SendHelper.sendGroupMessage(SendHelper.java:422)
        at org.asamk.signal.manager.helper.SendHelper.sendAsGroupMessage(SendHelper.java:331)
        at org.asamk.signal.manager.helper.SendHelper.sendAsGroupMessage(SendHelper.java:112)
        at org.asamk.signal.manager.internal.ManagerImpl.sendMessage(ManagerImpl.java:633)
        at org.asamk.signal.manager.internal.ManagerImpl.sendMessage(ManagerImpl.java:599)
        at org.asamk.signal.manager.internal.ManagerImpl.sendMessage(ManagerImpl.java:727)
        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)`
AsamK commented 2 months ago

Thanks for reporting, should be fixed in the latest master version: https://github.com/AsamK/signal-cli/actions/runs/10475419280

Bergdoktor commented 2 months ago

Tested and working. Thanks for the quick response!