signal-cli-rest-api icon indicating copy to clipboard operation
signal-cli-rest-api copied to clipboard

Exception on message received: org.signal.libsignal.protocol.NoSessionException: missing sender key state for distribution ID

Open continue47 opened this issue 2 years ago • 5 comments

The problem

{
  exception: {
    message: 'org.signal.libsignal.protocol.NoSessionException: missing sender key state for distribution ID 96839a83-c7f4-46dd-b0cf-60f1c96a7437',
    type: 'ProtocolNoSessionException'
  },
  envelope: {
    source: 'REDACTED',
    sourceNumber: null,
    sourceUuid: 'REDACTED',
    sourceName: 'Eduard',
    sourceDevice: 1,
    timestamp: 1712416714163
  },
  account: 'REDACTED'
}

This is the output when receiving a message in a group from a specific user only, while messages from other users work fine, with no exception.

I'm running signal-cli-rest-api in in docker with docker compose, and the user is on the latest version of signal on android.

version: "3"
services:
  signal-cli-rest-api:
    image: bbernhard/signal-cli-rest-api:latest
    environment:
      - MODE=json-rpc #supported modes: json-rpc, native, normal
      #- AUTO_RECEIVE_SCHEDULE=0 22 * * * #enable this parameter on demand (see description below)
    ports:
      - "8081:8080" 
    volumes:
      - "./signal-cli-config:/home/.local/share/signal-cli" #map "signal-cli-config" folder on host system into docker container. the folder contains the password and cryptographic keys when a new number is registered

Are you using the latest released version?

  • [X] Yes

Have you read the troubleshooting page?

  • [X] Yes

What type of installation are you running?

signal-cli-rest-api Docker Container

In which mode are you using the docker container?

JSON-RPC Mode

What's the architecture of your host system?

x86-64

Additional information

No response

continue47 avatar Apr 06 '24 15:04 continue47

Do you see the same error also in other (e.g normal) modes?

bbernhard avatar Apr 06 '24 16:04 bbernhard

might also be related: https://github.com/signalapp/Signal-Desktop/issues/5849#issuecomment-1182010332

bbernhard avatar Apr 06 '24 16:04 bbernhard

Do you see the same error also in other (e.g normal) modes?

I will test this when the person whose messages are giving the errors is available for this.

might also be related: signalapp/Signal-Desktop#5849 (comment)

Thanks! I'm checking it out.

continue47 avatar Apr 07 '24 09:04 continue47

[...] Signal clients will request message retries in this case. 169 of your 246 errors were successfully retried, leaving 77 messages as Delivery Issue in your conversations. For those messages, the sending devices perhaps weren't online when they needed to be for the retry.

Are you familiar with this retry mechanism mentioned in the post you linked? Do you know if I need to call a certain endpoint to trigger these retries?

continue47 avatar Apr 07 '24 10:04 continue47

I think this might be done automatically - at least I am not aware of any retry mechanism (in json-rpc mode). I would also expect that those errors only happen rarely, given that the all the people that you are sending the message to use Signal on a semi regular basis.

bbernhard avatar Apr 08 '24 14:04 bbernhard