jackwener/OpenCLI · warning · EmptyResultError

No Suno clips found in your library.

Error message

No Suno clips found in your library.

What it means

`opencli suno list` throws EmptyResultError (not CommandExecutionError) when the library feed returns zero clips. This is a deliberate 'successful call, no data' signal so agents can distinguish an empty library from a failure.

Source

Thrown at clis/suno/list.js:62

                    'Authorization': 'Bearer ' + (await window.Clerk.session.getToken()),
                    'browser-token': browserToken,
                    'device-id': ${JSON.stringify(deviceId)},
                },
            });
            if (!res.ok) return { ok: false, status: res.status };
            const data = await res.json().catch(() => null);
            if (!data || !Array.isArray(data.clips)) return { ok: false, error: 'malformed clips payload' };
            return { ok: true, clips: data.clips };
        })()`));

        if (!result?.ok) {
            throw new CommandExecutionError(result?.error || `Suno feed lookup failed (HTTP ${result?.status || '?'}).`);
        }
        if (!Array.isArray(result.clips)) {
            throw new CommandExecutionError('Suno feed lookup returned malformed clips payload');
        }
        if (result.clips.length === 0) {
            throw new EmptyResultError('suno list', 'No Suno clips found in your library.');
        }

        return result.clips.slice(0, limit).map((c, i) => {
            if (!c || typeof c.id !== 'string' || !c.id) {
                throw new CommandExecutionError('Suno feed lookup returned malformed clip identity');
            }
            return {
                rank: i + 1 + pageOffset * limit,
                clip: c.id.slice(0, 8),
                title: c.title || '(untitled)',
                status: c.status || '?',
                created: (c.created_at || '').replace('T', ' ').replace(/\..*$/, '').replace(/Z$/, ''),
                link: `${SUNO_URL}/song/${c.id}`,
            };
        });
    },
});

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Confirm the browser profile is logged into the Suno account you expect.
  2. Generate a song first (opencli suno generate) and retry.
  3. Retry with --page 0 to make sure you're not paginating past the end.
  4. If scripting, treat EmptyResultError as an empty-list case, not a failure.

Example fix

// before: crashes the script on empty library
const clips = await opencli('suno', 'list');
// after: handle empty as valid
try {
  const clips = await opencli('suno', 'list');
} catch (e) {
  if (e.name === 'EmptyResultError') return [];
  throw e;
}
Defensive patterns

Strategy: try-catch

Validate before calling

// Pre-check account state before scripting against the library:
const session = await ensureSunoSession(page);
// confirm session belongs to the expected account (email/plan) before listing

Type guard

function isEmptyResultError(e) { return e?.name === 'EmptyResultError' || /No Suno clips found/i.test(e?.message || ''); }

Try / catch

let clips = [];
try {
  clips = await opencli('suno', 'list', '--page', '0');
} catch (e) {
  if (isEmptyResultError(e)) return []; // empty library is valid
  throw e;
}

Prevention

When it happens

Trigger: Feed v2 returns `{clips: []}` — the authenticated account has no songs on the requested page (`--page` offset beyond existing content) or has never generated music.

Common situations: Brand-new Suno account, wrong account logged in (expecting another profile's library), or paginating past the end (`--page 5` with only 3 pages of clips).

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29). Data as JSON: /api/errors/3ed30544f766dfd1. Report an issue: GitHub.