jackwener/OpenCLI · error · CommandExecutionError

Upwork feed state (window.__NUXT__.state.${stateKey}) was no

Error message

Upwork feed state (window.__NUXT__.state.${stateKey}) was not present within 15s

What it means

After login and challenge checks, the feed probe waits up to 15s (30 x 500ms) for window.__NUXT__.state.<feedKey> to appear. If the ready flag is still false, this CommandExecutionError is thrown: the expected SSR/Nuxt state node for the chosen tab never hydrated. The message interpolates the stateKey (feedBestMatch or feedMostRecent).

Source

Thrown at clis/upwork/feed.js:89

                    challenge,
                    jobsPresent: !!(state && Object.prototype.hasOwnProperty.call(state, 'jobs')),
                    jobs: state ? state.jobs : undefined,
                    paging: state && state.paging ? state.paging : null,
                };
            })()`));
        }
        catch (e) {
            throw new CommandExecutionError(`Failed to read Upwork feed state: ${e?.message ?? e}`, 'The Nuxt state global was not reachable; try again after opening Upwork in the connected browser.');
        }

        if (payload?.onLogin) {
            throw new AuthRequiredError('upwork.com', 'Upwork redirected to login. Open https://www.upwork.com in the connected browser and sign in, then retry.');
        }
        if (payload?.challenge) {
            throw new CommandExecutionError('Upwork served a Cloudflare challenge page', 'Open https://www.upwork.com in the connected browser and clear the challenge, then retry.');
        }
        if (!payload?.ready) {
            throw new CommandExecutionError(`Upwork feed state (window.__NUXT__.state.${stateKey}) was not present within 15s`, 'The page may not have finished hydrating, or the SSR state shape may have changed.');
        }
        if (!isPlainObject(payload)) {
            throw new CommandExecutionError('Upwork feed returned an unexpected Browser Bridge payload shape');
        }
        if (!payload.jobsPresent || !Array.isArray(payload.jobs)) {
            throw new CommandExecutionError(`Upwork feed state had an unexpected jobs shape; expected window.__NUXT__.state.${stateKey}.jobs to be an array.`);
        }

        const jobs = payload.jobs;
        if (jobs.length === 0) {
            throw new EmptyResultError(`upwork feed ${tab}`, `Upwork ${tab} feed is empty for the current account`);
        }

        const rows = jobsToListRows(jobs, { limit });
        if (rows.length === 0) {
            throw new CommandExecutionError('Upwork feed results did not include any job with a valid ciphertext id; cannot produce round-trippable detail rows.');
        }
        return rows;

View on GitHub (pinned to 49907e53dc)

Solutions

  1. Re-run the command — transient slow hydration often succeeds on a second attempt.
  2. Check your network speed / retry from a faster connection; the 15s poll is fixed.
  3. Open the feed URL in the connected browser and inspect window.__NUXT__.state in DevTools to see if the state key changed; if so, update the CLI to match the new Upwork build.
  4. Verify the account actually has a personalized feed (new accounts or certain locales may not populate feedBestMatch).

Example fix

// before
await upwork.feed('most-recent'); // timeout on a slow connection
// after
await page.goto(url); // pre-warm the page in the connected browser first
const jobs = await upwork.feed('most-recent');
Defensive patterns

Strategy: retry

Try / catch

try {
  const jobs = await upwork.feed();
} catch (e) {
  if (/was not present within 15s/.test(e.message) && attempts < 2) {
    await sleep(5000);
    return feedWithRetry(attempts + 1);
  }
  throw e;
}

Prevention

When it happens

Trigger: Running `upwork feed` when the page loaded but the Nuxt state node never appeared: slow network causing hydration to exceed 15s, Upwork's SPA changing its state tree so feedBestMatch/feedMostRecent no longer exists, or the feed failing to load server-side while still past the login/challenge checks.

Common situations: Slow connection or heavy page (many trackers) delaying hydration; Upwork frontend redesign renaming/moving __NUXT__.state keys; running on an account whose feed endpoint errors; the page half-loaded because navigation raced with page.goto.

Related errors


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