matrix-nio
matrix-nio copied to clipboard
'one_time_key_counts' is a required property
I have been encountering this so much while trying to start a client with matrix-nio. This error is logged and appears to actually be a fatal error, as the client is entirely unresponsive - it cannot accept invites, thus cannot join a room, or... do anything.
I have posted a gist here: https://gist.github.com/nexy7574/a38096cccda0aeb585ff5de8e7116cbd
Repro code (stripped down, using nio-bot v1.1.1, which uses matrix-nio 0.24.0):
import json
import logging
from pathlib import Path
from contextlib import asynccontextmanager
import httpx
from ollama import AsyncClient
import niobot
import tomllib
if not Path("./config.toml").exists():
raise FileNotFoundError("config.toml not found in %s." % Path.cwd())
with open("./config.toml", "rb") as fd:
config = tomllib.load(fd)
logging.basicConfig(level=config.get("log_level", "INFO"))
bot = niobot.NioBot(
config["homeserver"],
config["user_id"],
config.get("device_id", "device"),
store_path=config.get("store_path", "./data"),
command_prefix=config.get("command_prefix", "e!"),
owner_id=config.get("owner_id", None)
)
@bot.command("ping")
async def ping_command(ctx: niobot.Context):
"""Checks the bot is running."""
await ctx.respond("Pong!")
bot.run(access_token=config["access_token"])
My homeserver is running dendrite, however I've had reports of this same issue on Synapse (matrix.org).