DIYgod/RSSHub · error · Error

No UID found for username: ${username}

Error message

No UID found for username: ${username}

What it means

Thrown by the Voronoi app author route when the scraped author page HTML does not contain a UID matching the regex pattern `\\"uid\\":\\"([\w-]+)\\"`. The route fetches the public author page (`https://www.voronoiapp.com/author/:username`), then extracts the internal UID from an inline JSON blob in the page source. If the username doesn't exist or the page structure changed, the regex fails. The result is cached under `voronoiapp-author-${username}`.

Source

Thrown at lib/routes/voronoiapp/author.ts:38

    },
    handler: async (ctx) => {
        const { username } = ctx.req.param();
        const uid = await getUidFromUsername(username);
        const items = await getPostItems({ order: 'DESC', author: uid });
        return {
            ...CommonDataProperties,
            title: `Voronoi Posts by ${username}`,
            link: `https://www.voronoiapp.com/author/${username}`,
            item: items,
        } as Data;
    },
};
async function getUidFromUsername(username: string): Promise<string> {
    return (await cache.tryGet(`voronoiapp-author-${username}`, async () => {
        const response = await ofetch<'text'>(`https://www.voronoiapp.com/author/${username}`);
        const match = response.match(/\\"uid\\":\\"([\w-]+)\\"/);
        if (!match) {
            throw new Error(`No UID found for username: ${username}`);
        }
        return match[1];
    })) as string;
}

View on GitHub (pinned to bed535e087)

Solutions

  1. Verify the username exists by visiting `https://www.voronoiapp.com/author/:username` in a browser and checking for a valid profile page.
  2. If the username is valid but the error persists, the page template may have changed — check if the `uid` field is still present in the page source.
  3. Clear the cached value by restarting the RSSHub instance or flushing the `voronoiapp-author-*` cache keys if the page structure was temporarily broken.

Example fix

// before: regex assumes escaped JSON in HTML
const match = response.match(/\"uid\":\"([\w-]+)\"/);
// after: also try unescaped JSON
const match = response.match(/(?:\\"uid\\"|"uid"): ?(?:\\"|")([\w-]+)(?:\\"|")/);
if (!match) {
    throw new InvalidParameterError(`No UID found for username: ${username}`);
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-validate that the author page exists and contains a UID
async function authorExists(username: string): Promise<boolean> {
    try {
        const resp = await ofetch<string>(`https://www.voronoiapp.com/author/${username}`);
        return /(?:\\"uid\"|"uid"): ?(?:\\"|")([\w-]+)/.test(resp);
    } catch {
        return false;
    }
}

Try / catch

try {
    const uid = await getUidFromUsername(username);
} catch (e) {
    if (e.message.startsWith('No UID found')) {
        throw new InvalidParameterError(`Author '${username}' not found on Voronoi`);
    }
    throw e;
}

Prevention

When it happens

Trigger: A request to `/voronoiapp/author/:username` where the username does not correspond to a real Voronoi author page, or the author page HTML structure has changed so the UID regex no longer matches. This can also happen if the page returns an error/spinner instead of the author profile HTML.

Common situations: Nonexistent or misspelled username; the Voronoi website updated its page template and the inline JSON key `uid` was renamed or restructured; or the page loaded a client-side-rendered shell without the embedded JSON (SSR failure).

Related errors


AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12). Data as JSON: /api/errors/501a36afc2b6792c. Report an issue: GitHub.