Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProtocolInvalidKeyIdException : while receive the message on signal-cli #1450

Closed
Koushal-123 opened this issue Feb 7, 2024 · 4 comments
Closed
Milestone

Comments

@Koushal-123
Copy link

I'm encountering the error 'InvalidKeyIdException: No such signed pre key record' in the Signal protocol library. Could someone please provide guidance on resolving this issue?

Screenshot from 2024-02-07 17-07-01

@AsamK
Copy link
Owner

AsamK commented Feb 8, 2024

Does it only affect older message that are being received? Then it might be an overly eager pre key cleanup, that will be fixed in 0.13.0.
This should also resolve itself after sending a message to the sender of this message.

@Koushal-123
Copy link
Author

"Thank you for your response, @AsamK. However, I encountered an error on my server when a user sends a message to my Signal number via the chat bot I created using signal-cli. According to your suggestion, the error should resolve itself by sending a message to the sender first. However, it's impractical to manually send a message to each sender, especially if there are a large number of users (for example, if 1000 users are sending messages). Can you provide an alternative solution for resolving this issue automatically?"

@goshi
Copy link

goshi commented Feb 16, 2024

Dear @AsamK. We have encountered the same issue with the latest version 0.12.8: after upgrading two weeks ago server from the 0.11.x to 0.12.8 all seems to be fine. But yesterday our clients reported, that the new installs of the Signal mobile applications (both iOS and Android) cannot communicate with the bot on 0.12.8 version. Also, the new client apps installs on the already trusted numbers (in the TRUSTED_UNVERIFIED status) become broken too.
We are using dockerized version of the signal-cli application (bbernhard/signal-cli-rest-api) and we have migrated to it from the host-version with reusing the old config without any issues.
The error message, that signal-cli reports, is:

{
  "exception": {
    "message": "org.signal.libsignal.protocol.InvalidKeyIdException: No such signed pre key record: 12738070",
    "type": "ProtocolInvalidKeyIdException"
  },
  "envelope": {
    "source": "73f9125a-a34f-459c-b301-89fc00528988",
    "sourceNumber": null,
    "sourceUuid": "73f9125a-a34f-459c-b301-89fc00528988",
    "sourceName": "",
    "sourceDevice": 1,
    "timestamp": 1708056683535
  }
}

As you can see - the signal-cli does not show source number, so we cannot verified it dynamically.
When we are trying to send direct message to the number, which has been sent this message, then we are getting the rate limit error.
With numbers which previously used the bot and not removed the application from the devices we don't see any problems and they are working fine.
The TRUST MODE for the bot-number configured as "always".

Do you have any ideas how it could be fixed now or how it could be aligned in your next updates?

@AsamK
Copy link
Owner

AsamK commented Feb 18, 2024

There was an issue with receiving messages to the PNI address, should be fixed with fd67157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants