jackwener/OpenCLI · error · CommandExecutionError
Trip.com transfer cards rendered but parser did not find req
Error message
Trip.com transfer cards rendered but parser did not find required price anchors
What it means
CommandExecutionError thrown when transfer cards visibly rendered and the extractor returned an array, but the array is empty: the parser found no required price anchors inside the cards. Layout changed enough to keep card containers but break the price element the extractor depends on.
Source
Thrown at clis/trip/transfer.js:70
if (waitResult === 'captcha') {
throw new AuthRequiredError('trip.com', 'Trip.com is asking for a verification; complete it in your browser session and retry');
}
if (waitResult === 'empty') {
throw new EmptyResultError('trip transfer', `No airport transfers for ${city} (${airport})`);
}
if (waitResult !== 'content') {
throw new CommandExecutionError(`Trip.com transfer listing did not render (state=${String(waitResult)}); check the city and airport code`);
}
const landedPath = await page.evaluate('location.pathname');
if (!/\/airport-transfers\/[^/]+\/airport-[^/]+/i.test(String(landedPath))) {
throw new CommandExecutionError(`Trip.com bounced ${city} / ${airport} to the transfer landing; check the city name matches the airport IATA code`);
}
const raw = await page.evaluate(buildTransferExtractJs());
if (!Array.isArray(raw)) {
throw new CommandExecutionError('Trip.com transfer DOM extraction returned malformed rows');
}
if (raw.length === 0) {
throw new CommandExecutionError('Trip.com transfer cards rendered but parser did not find required price anchors');
}
return raw.slice(0, limit).map((r, i) => ({
rank: i + 1,
type: r.type,
passengers: r.passengers,
luggage: r.luggage,
price: r.price,
currency: r.currency,
url: listUrl,
}));
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Inspect the rendered cards in DevTools and update the price-anchor selector in buildTransferExtractJs()
- Add a scroll/interaction step to trigger lazy price rendering before extraction
- Confirm the market/currency (via --country or cookies) shows list prices
- Capture a screenshot/DOM snapshot on this error to speed up future selector fixes
Example fix
// before const raw = await page.evaluate(buildTransferExtractJs()); // after await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight)); await page.waitForTimeout(1500); const raw = await page.evaluate(buildTransferExtractJs());
Defensive patterns
Strategy: fallback
Validate before calling
// before extraction, ensure prices had a chance to lazy-load await page.evaluate(() => window.scrollTo(0, document.body.scrollHeight)); await page.waitForTimeout(1500);
Type guard
function hasPriceAnrows(v) { return Array.isArray(v) && v.length > 0; } Try / catch
try {
const rows = await getTransfers(args);
} catch (e) {
if (e.message.includes('price anchors')) {
console.error('Prices lazy-load or UI changed; try scroll-before-extract or update selector');
}
throw e;
} Prevention
- Scroll the page before extraction to trigger lazy prices
- Set currency/market cookies so list prices render
- Save a DOM snapshot on this error for debugging
- Update the price-anchor selector whenever Trip.com refreshes its pricing UI
When it happens
Trigger: Trip.com moves prices behind a lazy-loaded component, swaps price elements for a new component (e.g. 'from $X' badge), or gates prices behind a currency/region selection, so the extractor's price-anchor selector matches zero nodes.
Common situations: New Trip.com pricing UI; prices only render after interaction (hover/scroll); currency-selection interstitial; regional variant of the page without list prices.
Related errors
- Trip.com attraction DOM extraction returned malformed rows
- Trip.com car DOM extraction returned malformed rows
- Not a git repository
- Trip.com attraction cards rendered but parser did not find r
- Trip.com car cards rendered but parser did not find required
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/b96962ead462d2f7.
Report an issue: GitHub.