Giter Club home page Giter Club logo

chrome-launcher's People

Contributors

andrewvy avatar bcardarella avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

chrome-launcher's Issues

Default Logging

Each process should log out stderr using its unique identifier by default. Should provide a way to turn this off, but it is nice for debugging.

Refactor logger to parse multiple log levels

Migrated from andrewvy/chrome-remote-interface#21

bcardarella:

Because of https://bugs.chromium.org/p/chromium/issues/detail?id=773572&can=1&q=stderr&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified

Chrome currently logs everything to stderr. Which means that the current logger is very noisy. I'd like to propose a parser that will determine if Logger.info/2, Logger.warn/2, Logger.debug/2, or Logger.error/2 should be used.

There does seem to be some useful information in the log:

"[1029/202012.957526:WARNING:dns_config_service_posix.cc(336)] Failed to read DnsConfig.\n"

in that example we can see WARNING which leads me to believe we can delegate this message to Logger.warn/2

"[1029/184906.750058:INFO:CONSOLE(25315)]

This could be sent to Logger.info/2 or up for debate. It appears INFO:CONSOLE is anything used for console.log in the browser. Not sure if this should be in the server log.

Possibility to select chrome/canary

I think it would be quite helpful to be able to select which chrome I want to run (stable/canary), something like:

{:ok, pid} = ChromeLauncher.launch([remote_debugging_port: 9233, canary: true])

what do you think @andrewvy ?

Ensuring closing of process

It would be great ensure the headless chrome instance is torn down properly if the elixir app is terminated.

Increasing poll interval

I've seen intermittent failures to detect that Chrome has launched. In almost all cases I suspect Chrome did launch but not fast enough. The current code appears to have a max timeout of 300ms (10 tries at 30ms each on master)

Looking at the chrome launcher by Google they are also using 10 tries but the delay is 500ms each: https://github.com/GoogleChrome/chrome-launcher/blob/master/chrome-launcher.ts#L119 so the total wait could be up to 5 seconds.

I've tried this size timeout locally and it does appear to clear up any issues I've seen with detecting the process starting.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.