jackwener/OpenCLI · warning · EmptyResultError
No shared map rows found for ${playerA.playerId} and ${playe
Error message
No shared map rows found for ${playerA.playerId} and ${playerB.playerId} What it means
player-teammate-impact reads each player's recent match rows and splits playerA's maps into those shared with playerB (by matchStatsId) and those without. If no map row is shared, it throws this EmptyResultError because impact comparison is impossible. Shared rows are required by definition of the command.
Source
Thrown at clis/hltv/player-teammate-impact.js:79
const limit = normalizeLimit(args.limit, 100, 100);
const playerA = parsePlayerRef(args.playerA);
const playerB = parsePlayerRef(args.playerB);
const commonArgs = {
period: args.period,
eventType: args.eventType,
event: args.event,
ranking: args.ranking,
map: args.map,
version: args.version,
offset: args.offset,
};
const aRows = await readPlayerMatches(page, { ...commonArgs, player: args.playerA }, limit);
const bRows = await readPlayerMatches(page, { ...commonArgs, player: args.playerB }, limit);
const bIds = new Set(bRows.map((row) => row.matchStatsId).filter(Boolean));
const withB = aRows.filter((row) => bIds.has(row.matchStatsId));
const withoutB = aRows.filter((row) => !bIds.has(row.matchStatsId));
if (withB.length === 0) {
throw new EmptyResultError('hltv player-teammate-impact', `No shared map rows found for ${playerA.playerId} and ${playerB.playerId}`);
}
const rows = [
summarize('summary', 'withTeammate', withB, playerA),
summarize('summary', 'withoutTeammate', withoutB, playerA),
];
const byMap = new Map();
for (const row of withB) {
if (!byMap.has(row.map)) byMap.set(row.map, []);
byMap.get(row.map).push(row);
}
for (const [mapName, mapRows] of [...byMap.entries()].sort((a, b) => b[1].length - a[1].length || a[0].localeCompare(b[0]))) {
rows.push(summarize('map', mapName, mapRows, playerA));
}
return rows;
},
});
View on GitHub (pinned to 49907e53dc)
Solutions
- Increase the limit so both players' histories overlap in time
- Verify both player refs point to the intended active HLTV profiles
- Confirm the two players actually were teammates in the covered period
- Catch EmptyResultError and report 'no shared maps' as a valid answer
Example fix
// before
const impact = await playerTeammateImpact(page, { playerA, playerB, limit: 20 });
// after
try {
const impact = await playerTeammateImpact(page, { playerA, playerB, limit: 100 });
} catch (err) {
if (!(err instanceof EmptyResultError)) throw err;
console.log('players never shared a map in the window');
} Defensive patterns
Strategy: try-catch
Validate before calling
// require a big enough history window that teammates overlap const limit = Math.max(args.limit ?? 0, 100);
Type guard
function validPlayerRef(p) { return p && Number.isFinite(p.playerId) && typeof p.slug === 'string' && p.slug.length > 0; } Try / catch
try {
const impact = await playerTeammateImpact(page, args);
} catch (err) {
if (err instanceof EmptyResultError) return { withTeammate: null, withoutTeammate: null };
throw err;
} Prevention
- Verify the two players really were teammates during the covered window
- Use a limit large enough to span their shared tenure
- Validate both player refs before invoking the command
- Handle 'never shared a map' as an expected outcome for ex-teammates
When it happens
Trigger: Calling with two players who never played together in the analyzed window; limit too small so the overlap period is missed; one player's rows lack matchStatsId so intersection is empty; one player ref points to the wrong or inactive profile.
Common situations: Comparing a player with a teammate who joined after the analyzed window; passing a former teammate after a transfer with a small limit; typos in player slugs resolving to different people.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- No last encounter found for ${playerA.playerId} and ${player
- No map-pool rows found for team ${teamId}/${slug}
- No trains found from ${fromStation.name} to ${toStation.name
- NO_DATA
- No Wayback snapshots for "${target}".
AI-assisted analysis of jackwener/OpenCLI@49907e53dc (2026-08-29).
Data as JSON: /api/errors/11ab6de6f5e0184d.
Report an issue: GitHub.