{"record":{"id":"29d3ed2612dea624","repo":"jackwener/OpenCLI","slug":"failed-to-open-chess-com-analysis-board-error","errorCode":null,"errorMessage":"Failed to open Chess.com analysis board: ${error?.message || error}","messagePattern":"Failed to open Chess\\.com analysis board: (.+?)","errorType":"exception","errorClass":"CommandExecutionError","httpStatus":null,"severity":"error","filePath":"clis/chess/analyze.js","lineNumber":31,"sourceCode":"    access: 'read',\n    description: 'Open a Chess.com game in the browser analysis board',\n    domain: 'www.chess.com',\n    strategy: Strategy.UI,\n    browser: true,\n    navigateBefore: false,\n    args: [\n        { name: 'game-url', type: 'string', required: true, positional: true, help: 'Full game URL, e.g. https://www.chess.com/game/live/168842570216' },\n    ],\n    columns: ['kind', 'game_id', 'analysis_url'],\n    func: async (page, kwargs) => {\n        if (!page) throw new CommandExecutionError('Browser session required for chess analyze');\n        const { kind, id } = parseGameUrl(kwargs['game-url']);\n        const analysisUrl = `https://www.chess.com/analysis/game/${kind}/${id}`;\n        try {\n            await page.goto(analysisUrl);\n            await page.wait(2);\n        } catch (error) {\n            throw new CommandExecutionError(`Failed to open Chess.com analysis board: ${error?.message || error}`);\n        }\n        return [{ kind, game_id: id, analysis_url: analysisUrl }];\n    },\n});\n","sourceCodeStart":13,"sourceCodeEnd":36,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/chess/analyze.js#L13-L36","documentation":"When navigating to the Chess.com analysis board (page.goto + wait) fails, the underlying error is wrapped in a CommandExecutionError with this message so the caller knows the analysis page could not be opened, preserving the original error text.","triggerScenarios":"page.goto('https://www.chess.com/analysis/game/<kind>/<id>') throws — network failure, DNS error, Chess.com returning 5xx/403, timeout, or an invalid navigation in the browser session.","commonSituations":"No internet or corporate proxy blocking chess.com; Chess.com rate-limiting or bot-blocking the automated browser; malformed game URL producing a 404-ish page that breaks goto; transient network blips mid-run.","solutions":["Check network connectivity/proxy settings and retry the command.","Verify the game URL parses to a valid kind/id by opening the analysis URL manually in a normal browser.","Retry after a delay if Chess.com is rate-limiting; add a real User-Agent/session to reduce bot blocking.","Confirm the game still exists on Chess.com (deleted/private games can fail)."],"exampleFix":"// before\nawait page.goto(analysisUrl); // may throw raw net error\n// after\ntry { await page.goto(analysisUrl); await page.wait(2); }\ncatch (error) { throw new CommandExecutionError(`Failed to open Chess.com analysis board: ${error?.message || error}`); }","handlingStrategy":"try-catch","validationCode":"const url = new URL(gameUrl);\nif (!/chess\\.com$/.test(url.hostname)) throw new Error('Not a chess.com game URL');","typeGuard":"null","tryCatchPattern":"try {\n  await page.goto(analysisUrl);\n  await page.wait(2);\n} catch (error) {\n  // inspect error.message: 'net::' => network, 'timeout' => slow load\n  console.error(`Failed to open analysis board: ${error?.message || error}`);\n  // retry once or surface to user\n}","preventionTips":["Validate game URLs before navigation","Retry navigation once on transient network errors","Run with a working network/proxy config reachable to chess.com"],"tags":["network","navigation","chess","browser-automation"],"backgroundTag":"navigation-failed","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}