{"record":{"id":"49d36579b857103d","repo":"jackwener/OpenCLI","slug":"no-objects-found-on-the-canvas-fresh-runs-start-a","errorCode":null,"errorMessage":"No objects found on the canvas. Fresh runs start a blank session; use one \"eval\" call, or inspect an already-bound tab through the browser workspace commands.","messagePattern":"No objects found on the canvas\\. Fresh runs start a blank session; use one \"eval\" call, or inspect an already-bound tab through the browser workspace commands\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"warning","filePath":"clis/geogebra/list.js","lineNumber":28,"sourceCode":"  domain: 'www.geogebra.org',\n  strategy: Strategy.PUBLIC,\n  browser: true,\n  navigateBefore: false,\n  args: [\n    { name: 'type', required: false, help: 'Filter by object type (e.g. \"point\", \"line\", \"circle\")' },\n  ],\n  columns: ['name', 'type', 'value', 'visible'],\n  func: async (page, kwargs) => {\n    const filterType = kwargs.type == null || kwargs.type === ''\n      ? ''\n      : String(kwargs.type).trim().toLowerCase();\n    if (filterType && !/^[a-z-]+$/.test(filterType)) {\n      throw new ArgumentError('type must be a GeoGebra object type like point, line, or circle');\n    }\n    await ensureApplet(page);\n    const objects = await ggbListObjects(page, filterType);\n    if (!Array.isArray(objects) || objects.length === 0) {\n      throw new EmptyResultError(\n        'geogebra list',\n        'No objects found on the canvas. Fresh runs start a blank session; use one \"eval\" call, or inspect an already-bound tab through the browser workspace commands.',\n      );\n    }\n    return objects;\n  },\n});\n","sourceCodeStart":10,"sourceCodeEnd":36,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/geogebra/list.js#L10-L36","documentation":"An EmptyResultError from `geogebra list`: the applet was reachable and enumeration succeeded, but zero objects matched (or the canvas is empty). The message explains that sessions do not persist — a fresh run starts a blank canvas — and suggests creating objects via eval or inspecting an already-bound tab.","triggerScenarios":"`geogebra list` on a brand-new session before any evalCommand; `geogebra list --type circle` when objects exist but none of that type; objects created in a previous run's tab that is no longer bound.","commonSituations":"Scripting pipelines that assume state persists between opencli invocations; re-running list in CI without a setup step; filtering by a type that has no instances yet.","solutions":["Create objects first: opencli geogebra eval --code 'A=(1,2)' etc., then run list","Drop or broaden the --type filter if you expected existing objects of another kind","Bind/navigate to the tab that already holds your construction instead of a fresh session","Run setup and query in the same session/invocation flow"],"exampleFix":"// before\nopencli geogebra list   # blank fresh session\n// after\nopencli geogebra eval --code 'A=(1,2);B=(4,5);c=Circle(A,B)'\nopencli geogebra list","handlingStrategy":"fallback","validationCode":"// ensure the canvas is non-empty before listing\nawait run('geogebra', 'eval', '--code', \"if(!ggbApplet.getAllObjectNames().length) { ggbApplet.evalCommand('A=(0,0)'); }\");","typeGuard":null,"tryCatchPattern":"try {\n  return await run('geogebra', 'list', ...(type ? ['--type', type] : []));\n} catch (err) {\n  if (/No objects found on the canvas/.test(err.message)) {\n    // fallback: seed a default object or report empty state explicitly\n    return { objects: [], empty: true };\n  }\n  throw err;\n}","preventionTips":["Run setup evals in the same session as queries — state is not persistent","Check whether an existing tab with your construction is bound before assuming a fresh session","Broaden or drop --type when a filter could legitimately match nothing"],"tags":["geogebra","empty-result","statelessness"],"backgroundTag":"empty-canvas-no-objects","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}