diff --git a/x-pack/plugins/reporting/server/export_types/common/generate_png.ts b/x-pack/plugins/reporting/server/export_types/common/generate_png.ts index b4d67202494d1..9aa0c37afe79d 100644 --- a/x-pack/plugins/reporting/server/export_types/common/generate_png.ts +++ b/x-pack/plugins/reporting/server/export_types/common/generate_png.ts @@ -5,7 +5,6 @@ * 2.0. */ -import { Protocol } from 'devtools-protocol'; import apm from 'elastic-apm-node'; import type { Logger } from '@kbn/core/server'; import * as Rx from 'rxjs'; @@ -19,7 +18,7 @@ interface PngResult { buffer: Buffer; metrics?: PngMetrics; warnings: string[]; - versionInfo: Protocol.Browser.GetVersionResponse; + versionInfo: string; } export function generatePngObservable( diff --git a/x-pack/plugins/reporting/server/routes/diagnostic/screenshot.ts b/x-pack/plugins/reporting/server/routes/diagnostic/screenshot.ts index 1e1dd5ac653da..590b68f41f314 100644 --- a/x-pack/plugins/reporting/server/routes/diagnostic/screenshot.ts +++ b/x-pack/plugins/reporting/server/routes/diagnostic/screenshot.ts @@ -65,16 +65,10 @@ export const registerDiagnoseScreenshot = (reporting: ReportingCore, logger: Log counters.usageCounter(); const { versionInfo, warnings } = screenshot; - - const logs = ([] as string[]) - .concat(JSON.stringify(versionInfo)) - .concat(warnings) - .join('\n'); - + const logs = ([] as string[]).concat(versionInfo).concat(warnings).join('\n'); const body = { success: warnings.length === 0, logs, help: [] }; // NOTE: the screenshot could be returned as a string using `data:image/png;base64,` + results.buffer.toString('base64') - return res.ok({ body }); }) .catch((error) => {