{"record":{"id":"8a362eb4d70b5ea7","repo":"jackwener/OpenCLI","slug":"no-creator-videos-were-returned-confirm-the-curre","errorCode":null,"errorMessage":"No creator videos were returned. Confirm the current Chrome profile is logged in to TikTok Studio and has published content.","messagePattern":"No creator videos were returned\\. Confirm the current Chrome profile is logged in to TikTok Studio and has published content\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/tiktok/creator-videos.js","lineNumber":241,"sourceCode":"        for (const item of items) {\n            const row = normalizeRow(item);\n            if (!row) {\n                skippedMissingId += 1;\n                continue;\n            }\n            rows.push(row);\n            if (rows.length >= limit) break;\n        }\n        if (!data.has_more || items.length === 0) break;\n        nextCursor = requireCursor(data.cursor);\n        await page.wait(250);\n    }\n\n    if (rows.length === 0 && skippedMissingId > 0) {\n        throw new CommandExecutionError('TikTok Studio item_list returned videos without stable video_id');\n    }\n    if (rows.length === 0) {\n        throw new EmptyResultError('tiktok creator-videos', 'No creator videos were returned. Confirm the current Chrome profile is logged in to TikTok Studio and has published content.');\n    }\n    return rows.slice(0, limit);\n}\n\nexport const creatorVideosCommand = cli({\n    site: 'tiktok',\n    name: 'creator-videos',\n    access: 'read',\n    description: 'TikTok Studio creator content list (views/likes/comments/saves/shares)',\n    domain: 'www.tiktok.com',\n    strategy: Strategy.COOKIE,\n    browser: true,\n    navigateBefore: STUDIO_CONTENT_URL,\n    args: [\n        { name: 'limit', type: 'int', default: DEFAULT_LIMIT, help: `Number of creator videos to return (max ${MAX_LIMIT})` },\n        { name: 'cursor', type: 'string', default: '0', help: 'Non-negative TikTok Studio pagination cursor' },\n    ],\n    columns: ['video_id', 'title', 'date', 'views', 'likes', 'comments', 'saves', 'shares', 'url'],","sourceCodeStart":223,"sourceCodeEnd":259,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/tiktok/creator-videos.js#L223-L259","documentation":"Pagination completed successfully but zero video rows were collected and nothing was skipped for missing ids — TikTok genuinely returned no videos. This is an EmptyResultError, signaling 'no data' rather than a malfunction, with a hint about login and published content.","triggerScenarios":"The logged-in creator account has no published videos (new/empty account), or item_list returns has_more=false with zero items on the first page.","commonSituations":"Fresh TikTok account with no posts, all videos deleted or set to private-only visibility, querying the wrong Studio account, or a profile logged in but never granted Studio access.","solutions":["Confirm the Chrome profile is logged in to TikTok Studio and shows published videos in the web UI","Verify you're targeting the intended creator account (not an empty or wrong account)","Publish at least one video or adjust the query to an account with content","Handle EmptyResultError in your pipeline as 'no data' instead of a hard failure"],"exampleFix":"// before\nconst rows = await listCreatorVideos(page, { limit: 20 });\n// after\ntry {\n  const rows = await listCreatorVideos(page, { limit: 20 });\n} catch (e) {\n  if (e instanceof EmptyResultError) return []; // account has no videos\n  throw e;\n}","handlingStrategy":"try-catch","validationCode":"// Confirm the account actually has videos via the Studio UI before automating\nconst hasVideos = await page.evaluate(() => !!document.querySelector('[data-e2e=\"video-card\"], video'));\nif (!hasVideos) console.warn('Profile appears to have no published videos');","typeGuard":"function isEmptyResult(e) { return e instanceof EmptyResultError; }","tryCatchPattern":"try {\n  rows = await listCreatorVideos(page, opts);\n} catch (e) {\n  if (e instanceof EmptyResultError) return []; // legitimate: account has no videos\n  throw e;\n}","preventionTips":["Verify the target account has published videos visible in Studio","Confirm you are logged into the intended creator account","Treat EmptyResultError as a no-data signal, not a crash, in pipelines"],"tags":["tiktok","empty-result","no-data","auth"],"backgroundTag":"empty-result-set","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}