tonhowtf/omniget · warning
[omnidisc] could not read the group status
Error message
[omnidisc] could not read the group status
What it means
This catch guards the store's group-status reader: it builds an OmnidiscGroupStatus from a raw backend record (group id, epoch, member list) and, if fetching/parsing the record throws, logs this warning and returns undefined. Callers of getGroupStatus will simply see null — encrypted-channel group membership state is unavailable.
Solutions
- Check errorText(e) for whether the group record is missing vs malformed
- Trigger a group status refresh/re-sync (the epoch may have advanced and needs the latest group state)
- Verify the raw record fields (group_id, epoch, members) match the parser's expectations
- If the group was never initialized, initialize it via the channel's group-setup flow before reading status
Defensive patterns
Strategy: fallback
Validate before calling
// treat missing group state as 'not initialized' before parsing
const raw = await invoke<unknown>("omnidisc_group_status", { channelId }).catch(() => null);
if (!raw) return;
Type guard
function hasGroupFields(raw: unknown): raw is { group_id?: unknown; epoch?: unknown; members?: unknown[] } {
return typeof raw === "object" && raw !== null;
}
Try / catch
try {
const status = parseGroupStatus(raw);
groupStatusByChannel[channelId] = status;
} catch (e) {
console.warn("[omnidisc] could not read the group status", errorText(e));
} Prevention
- Default missing group state to null rather than throwing at call sites
- Validate raw group records (group_id, epoch, members) before constructing status
- Re-sync group state when the reported epoch is older than a peer's epoch
When it happens
Trigger: Reading the encrypted-group state for a channel when the backend group-status command rejects or the raw record fails field extraction (missing group_id/epoch/members): group not yet initialized for the channel, malformed persisted group state, or membership decryption failure.
Common situations: Joining an encrypted channel before its group/mLS tree is initialized; another member rotated the group epoch and local state is stale; corrupted persisted group state after a crash; schema drift between backend writer and frontend parser.
Related errors
- [omnidisc] could not read cached plaintext
- close failed
- create notebook failed
- notebooksStore.hydrate failed
- notebooksStore.refresh failed
AI-assisted analysis of tonhowtf/omniget@8600b91f42 (2026-09-12).
Data as JSON: /api/errors/9f9013e79494b1c4.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/stores/omnidisc-store.svelte.ts:2512
const members = (Array.isArray(raw.members) ? raw.members : [])
.filter(isRecord)
.map((m) => ({
userId: str(m.user_id) ?? "",
deviceId: str(m.device_id) ?? "",
fingerprint: str(m.fingerprint) ?? "",
isMe: m.is_me === true,
}));
groupStatusByChannel = {
...groupStatusByChannel,
[channelId]: {
ready: raw.ready === true,
groupId: str(raw.group_id) ?? "",
epoch: typeof raw.epoch === "number" ? raw.epoch : undefined,
members,
},
};
} catch (e) {
console.warn("[omnidisc] could not read the group status", errorText(e));
}
}
export async function getUploadLimits(instanceId: string) {
const cached = limitsByInstance[instanceId];
if (cached) return cached;
const instance = getInstance(instanceId);
if (!instance) return { maxUploadBytes: 0, maxAttachments: 10 };
try {
const raw = await invoke<unknown>("omnidisc_instance_limits", { url: instance.url });
const limits = isRecord(raw) && isRecord(raw.limits) ? raw.limits : {};
const value = {
maxUploadBytes:
typeof limits.max_upload_bytes === "number"
? limits.max_upload_bytes
: typeof (raw as Record<string, unknown>).max_upload_bytes === "number"
? ((raw as Record<string, unknown>).max_upload_bytes as number)
: 0,View on GitHub (pinned to 8600b91f42)