santifer/career-ops · error
getro: — could not resolve collection_id from (no…
Error message
getro: ${label} — could not resolve collection_id from ${careersUrl.href} (no network.id found in __NEXT_DATA__; page structure may have changed — set getro_collection: N on this entry as a fallback) What it means
resolveCollectionId scrapes a Getro-powered careers page for a network.id inside its __NEXT_DATA__ JSON to derive the Getro API collection_id. If fetchTextWithRetry returns HTML but extractCollectionId cannot find a network.id, the function throws this error suggesting the page structure changed and pointing at the getro_collection config override as a fallback.
Solutions
- Set getro_collection: <N> on the portal entry with the collection id — the documented fallback that bypasses scraping entirely (find N in the page source via browser devtools: look for network.id in __NEXT_DATA__, or inspect the XHR to getro.app/.../search/jobs)
- Open the careers_url in a browser and confirm it still resolves to a Getro-powered board; update careers_url if the company moved
- Check whether a bot challenge is being served to BROWSER_LIKE_USER_AGENT — retrying later or from another network can help
- Verify the company still uses Getro; if they migrated ATS platforms, change the entry's provider
Example fix
# before (portals.yml entry) - name: Acme provider: getro careers_url: https://careers.acme.com # after - name: Acme provider: getro careers_url: https://careers.acme.com getro_collection: 12345
Defensive patterns
Strategy: fallback
Validate before calling
// pre-flight: does the page still embed __NEXT_DATA__ with network.id?
const html = await (await fetch(careersUrl)).text();
const m = html.match(/"network":\s*\{"id":\s*"?(\d+)/);
if (!m) console.warn(`No network.id in ${careersUrl} — set getro_collection on this entry`); Type guard
function pageHasNetworkId(html) { return /__NEXT_DATA__/.test(html) && /"network"\s*:\s*\{[^}]*"id"/.test(html); } Try / catch
try {
const collectionId = await resolveCollectionId(entry, ctx, careersUrl);
} catch (e) {
if (String(e.message).includes('could not resolve collection_id') && entry.getro_collection) {
return entry.getro_collection; // config override wins when scraping breaks
}
throw e;
} Prevention
- Proactively pin getro_collection: N on Getro entries so scraping changes can't break scans
- Periodically open Getro-powered careers pages in a browser to confirm structure hasn't changed
- Watch for bot-challenge pages (Cloudflare) when the scraper user-agent gets stale
When it happens
Trigger: A Getro careers page renders without __NEXT_DATA__ (SSR change, bot-wall/challenge page, interstitial, or a soft error page), so extractCollectionId finds no network.id in the fetched HTML for the entry's careers_url.
Common situations: Getro updates its Next.js page structure or stops inlining network.id; the site serves a Cloudflare/bot challenge to the scanner's user-agent; the careers URL redirects to a generic marketing page; the company migrated off Getro.
Related errors
- avature: still contains JobDetail links but no article…
- csod: no anonymous token on
- [fetch] Playwright error
- [fetch] Playwright unavailable — falling back to plain…
- generalist-world: gw-job-card anchor(s) matched but none…
AI-assisted analysis of santifer/career-ops@aac998c7ed (2026-09-16).
Data as JSON: /api/errors/44ec7bf0495423e0.
Report an issue: GitHub.
Appendix: source
Thrown at providers/getro.mjs:157
return null;
}
/** Override wins; otherwise fetch careers_url and parse __NEXT_DATA__. */
async function resolveCollectionId(entry, ctx, careersUrl) {
const override = resolveCollectionOverride(entry);
if (override) return override;
const label = entry?.name || careersUrl.href;
// Retried like every page fetch below — this single request runs BEFORE
// pagination even starts, so without a retry a transient blip here (DNS/TLS/
// connection reset) fails the whole board before a single page is fetched.
const html = await fetchTextWithRetry(ctx, careersUrl.href, {
redirect: 'error',
headers: { accept: 'text/html', 'user-agent': BROWSER_LIKE_USER_AGENT },
});
const id = extractCollectionId(html);
if (!id) {
throw new Error(
`getro: ${label} — could not resolve collection_id from ${careersUrl.href} (no network.id found in ` +
`__NEXT_DATA__; page structure may have changed — set getro_collection: N on this entry as a fallback)`,
);
}
return id;
}
/**
* `{min, max, currency}` shape scan.mjs's salary_filter consumes, or null
* when there's no usable figure. A non-year compensation_period
* (hourly/monthly/etc.) is treated as "no usable annual figure".
*/
function getroSalary(job) {
const period = typeof job?.compensation_period === 'string' ? job.compensation_period.trim().toLowerCase() : '';
if (period && period !== 'year') return null;
const minCents = Number(job?.compensation_amount_min_cents);
const maxCents = Number(job?.compensation_amount_max_cents);
const min = Number.isFinite(minCents) && minCents > 0 ? minCents / 100 : null;View on GitHub (pinned to aac998c7ed)