OnetapInc / chromy

Chromy is a library for operating headless chrome. 🍺🍺🍺
MIT License
606 stars 41 forks source link

Custom User Agent Breaks Version Detection #81

Closed ks07 closed 6 years ago

ks07 commented 6 years ago

It's possible to set a custom user agent using the --user-agent=foo Chrome flag. Doing so breaks Chromy's version detection, as this uses navigator.userAgent. This can cause errors about using an outdated version of chrome and can cause the screenshot method to crash due to using removed CDP methods:

[14:40:39] Error: 'Emulation.resetViewport' wasn't found
    at /tmp/headlesschrometest/node_modules/chrome-remote-interface/lib/chrome.js:81:28
dotneet commented 6 years ago

Hi @ks07, Thank you for reporting. I've resolved that issue and published new version 0.5.6 just now.