joelgriffith / navalia

A bullet-proof, fast, and reliable headless browser API
https://joelgriffith.github.io/navalia/
GNU General Public License v3.0
957 stars 33 forks source link

Not working with Chrome Stable (Version 62.0.3202.62) #65

Open andrepcg opened 6 years ago

andrepcg commented 6 years ago

After updating to Chrome Version 62.0.3202.62 tests started failing.

    unexpected server response (404)

      at ClientRequest._req.on (node_modules/chrome-remote-interface/node_modules/ws/lib/WebSocket.js:651:26)
      at emitOne (events.js:115:13)
      at ClientRequest.emit (events.js:210:7)
      at HTTPParser.parserOnIncomingClient (_http_client.js:565:21)
      at HTTPParser.parserOnHeadersComplete (_http_common.js:116:23)
      at Socket.socketOnData (_http_client.js:454:20)
      at emitOne (events.js:115:13)
      at Socket.emit (events.js:210:7)
      at addChunk (_stream_readable.js:266:12)
      at readableAddChunk (_stream_readable.js:253:11)

Debug log:

  navalia starting, using up to 1 instances +0ms
  navalia:chrome-helper using up to infinite tabs +1ms
  navalia instances are available and starting +2ms
  navalia:chrome-helper starting chrome +0ms
  navalia instances are available and starting +226ms
  ChromeLauncher Waiting for browser. +9ms
  ChromeLauncher Waiting for browser... +0ms
  ChromeLauncher Waiting for browser..... +512ms
  ChromeLauncher Waiting for browser.....✓ +2ms
andrepcg commented 6 years ago

This is exactly the issue I ran into: https://github.com/cyrus-and/chrome-remote-interface/issues/288

The websocket url is dynamic and must be fetched from const {webSocketDebuggerUrl} = await CDP.Version({port});

Edit: I forked Navalia but couldn't get CDP.Version to import. Already updated the libs but I'm getting an TypeError: CDP.Version is not a function error

joelgriffith commented 6 years ago

Ouch... I'm curious if you'd be interested in moving over to puppeteer since that project is well established and resourced. Is there something more elaborate that you need in Navalia since I'm in the process of deprecating it?

Thanks for reporting, btw!

MilesOkeefe commented 6 years ago

@joelgriffith deprecating what, Navalia?

If so, can we get a warning at the top of the readme? I would have implemented puppeteer rather than navalia from the beginning if I knew that this had been sunsetted.

joelgriffith commented 6 years ago

@MilesOkeefe I was originally going to be sunsetting this project, but feel there's still room for it after some careful consideration.

I'll take a look at this issue in the coming days as I ramp back up on this.

Thanks folks!