You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My bots are sometimes getting an internal JSONRPC error when using API call get_message() it seems related to the "new" info messages shown when some peer changed keys and chat protection is broken, for some reason loading such messages with get_message() results in an exception when get_message() internally tries to load the sender contact (this special messages have no real sender) at least this is my assumption of the cause of the error
Logs:
ERROR {'code': -1, 'message': 'failed to load sender contact\n\nCaused by:\n contact Contact#Undefined not
found'}
Traceback (most recent call last):
File "/home/adbenitez/projects/deltachat-bot/python/deltabot-cli-py/deltabot_cli/cli.py", line 265, in
_serve_cmd
bot.run_forever(accounts[0] if args.account else 0)
File "/home/adbenitez/projects/deltachat-bot/python/deltabot-cli-py/deltabot_cli/client.py", line 67, in
run_forever
self.run_until(lambda _: False, accid)
File "/home/adbenitez/projects/deltachat-bot/python/deltabot-cli-py/deltabot_cli/client.py", line 93, in
run_until
self._process_messages(accid)
File "/home/adbenitez/projects/deltachat-bot/python/deltabot-cli-py/deltabot_cli/client.py", line 170, in
_process_messages
msg = self.rpc.get_message(accid, msgid)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/adbenitez/projects/deltachat-bot/python/deltabot-cli-py/deltabot_cli/rpc.py", line 140, in
method
raise JsonRpcError(response["error"])
deltabot_cli.rpc.JsonRpcError: {'code': -1, 'message': 'failed to load sender contact\n\nCaused by:\n
contact Contact#Undefined not found'}
The text was updated successfully, but these errors were encountered:
Info messages have DC_CONTACT_ID_INFO (2) sender, not undefined (0) sender. Could you load corresponding message from msgs table and see what message it is? I made a PR to log msg_id in the error: #5372 But printing msgid in Python should also be possible.
This looks more like an attempt to load trashed message, info messages should be loadable without problems and desktop does it all the time.
This looks more like an attempt to load trashed message, info messages should be loadable without problems and desktop does it all the time.
This might be it, I started using more often "delete_device_after" in my bots to not keep private data that is not necessary, it might be that the messages are trashed by the time the bot already fetched the "next messages" IDs in some situations like bot start/resume
My bots are sometimes getting an internal JSONRPC error when using API call get_message() it seems related to the "new" info messages shown when some peer changed keys and chat protection is broken, for some reason loading such messages with get_message() results in an exception when get_message() internally tries to load the sender contact (this special messages have no real sender) at least this is my assumption of the cause of the error
The text was updated successfully, but these errors were encountered: