Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reporting] Browser Driver is incorrectly logging browser console messages #43295

Closed
tsullivan opened this issue Aug 14, 2019 · 3 comments
Closed
Labels
bug Fixes for quality problems that affect the customer experience Feature:Reporting Reporting (PDF, CSV, ..) feature

Comments

@tsullivan
Copy link
Member

Kibana version: 7.3.0/8.0.0

Elasticsearch version: n/a

Server OS version: n/a

Browser version: n/a

Browser OS version: n/a

Original install method (e.g. download page, yum, from source, etc.): source

Describe the bug:
We should see many more logs for browser console messages: generated by the browser, and/or generated by the web app running in the browser.

Steps to reproduce:

  1. Enable verbose logging
  2. Run a PDF or PNG Reporting job
  3. See a single message (debug level) for a CSP error in the browser:
    image

Expected behavior:

  1. Since we're in verbose logging mode and seeing debug-level messages, we should be seeing a lot more logs. Example of the browser console running the same page as the dashboard in the above report:
    image
  2. The headless browser is attributing _type fields to each of its own logging events. We should use those to map the level of each headless-generated log to our own logging, so error logs show up with the error tag in our logs.
@tsullivan tsullivan added bug Fixes for quality problems that affect the customer experience Feature:Reporting Reporting (PDF, CSV, ..) feature Team:Stack Services labels Aug 14, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-services

@tsullivan
Copy link
Member Author

Also, Reporting tries to log the stdout and stderr of the browser process, but it looks like that code is wrong: https://github.com/elastic/kibana/blob/7.3/x-pack/legacy/plugins/reporting/server/browsers/chromium/driver_factory/index.ts#L182

messages$ is just an observable of the console logs in the browser app. The partition probably used to work, but only for PhantomJS.

@tsullivan
Copy link
Member Author

Fixed in #44359

Also, Reporting tries to log the stdout and stderr of the browser process, but it looks like that code is wrong: https://github.com/elastic/kibana/blob/7.3/x-pack/legacy/plugins/reporting/server/browsers/chromium/driver_factory/index.ts#L182

Separate issue: #44942

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Reporting Reporting (PDF, CSV, ..) feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants