garrytan/gstack · error · Error

Usage: browse inspect [selector] [--all] [--history]\nOr pic

Error message

Usage: browse inspect [selector] [--all] [--history]\nOr pick an element in the Chrome sidebar first.

What it means

Error "Usage: browse inspect [selector] [--all] [--history]\nOr pick an element in the Chrome sidebar first." thrown in garrytan/gstack.

Source

Thrown at browse/src/read-commands.ts:583

        if (history.length === 0) return '(no style modifications)';
        return history.map((m, i) =>
          `[${i}] ${m.selector} { ${m.property}: ${m.oldValue} → ${m.newValue} } (${m.source}, ${m.method})`
        ).join('\n');
      }

      // If no selector given, check for stored inspector data
      if (!selector) {
        // Access stored inspector data from the server's in-memory state
        // The server stores this when the extension picks an element via POST /inspector/pick
        const stored = (bm as any)._inspectorData;
        const storedTs = (bm as any)._inspectorTimestamp;
        if (stored) {
          const stale = storedTs && (Date.now() - storedTs > 60000);
          let output = formatInspectorResult(stored, { includeUA });
          if (stale) output = '⚠ Data may be stale (>60s old)\n\n' + output;
          return output;
        }
        throw new Error('Usage: browse inspect [selector] [--all] [--history]\nOr pick an element in the Chrome sidebar first.');
      }

      // Direct inspection by selector
      const result = await inspectElement(page, selector, { includeUA });
      // Store for later retrieval
      (bm as any)._inspectorData = result;
      (bm as any)._inspectorTimestamp = Date.now();
      return formatInspectorResult(result, { includeUA });
    }

    case 'media': {
      const { extractMedia } = await import('./media-extract');
      const target = bm.getActiveFrameOrPage();
      const filter = args.includes('--images') ? 'images' as const
        : args.includes('--videos') ? 'videos' as const
        : args.includes('--audio') ? 'audio' as const
        : undefined;
      const selectorArg = args.find(a => !a.startsWith('--'));

View on GitHub (pinned to 94993f7401)

When it happens

Trigger: Thrown at browse/src/read-commands.ts:583 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of garrytan/gstack@94993f7401 (2026-08-12). Data as JSON: /api/errors/5377732850c8c3d0. Report an issue: GitHub.