browsermob-node icon indicating copy to clipboard operation
browsermob-node copied to clipboard

ERROR: browsermob-proxy returned error

Open lucaswxp opened this issue 8 years ago • 3 comments

Running the following example:

var Proxy = require('browsermob-proxy').Proxy
  , proxy = new Proxy()
  , fs = require('fs');

proxy.doHAR('http://yahoo.com', function(err, data) {
    if (err) {
        console.error('ERROR: ' + err);
    } else {
        fs.writeFileSync('yahoo.com.har', data, 'utf8');
    }
});

I only get: ERROR: browsermob-proxy returned error

No other info is given. I'm sure browsermob is running:

$ ./browsermob-proxy
Running BrowserMob Proxy using LittleProxy implementation. To revert to the legacy implementation, run the proxy with the command-line option '--use-littleproxy false'.
[INFO  2017-02-09T15:59:44,475 net.lightbody.bmp.proxy.Main] (main) Starting BrowserMob Proxy version 2.1.5-SNAPSHOT 
[INFO  2017-02-09T15:59:44,638 org.eclipse.jetty.util.log] (main) jetty-7.x.y-SNAPSHOT 
[INFO  2017-02-09T15:59:44,694 org.eclipse.jetty.util.log] (main) started o.e.j.s.ServletContextHandler{/,null} 
[INFO  2017-02-09T15:59:45,500 org.eclipse.jetty.util.log] (main) Started [email protected]:8080 

I'm under node v7.5.0

lucaswxp avatar Feb 09 '17 19:02 lucaswxp

I am seeing the same Issue as @lucaswxp!

The only indication of an error I receive is: ERROR: browsermob-proxy returned error

node v6.10.0

rcave avatar Mar 14 '17 18:03 rcave

@rcave Hey there.

If it's any help, I'm using browsermob-proxy directly now: https://github.com/lightbody/browsermob-proxy

I just spin up the server, then specify the proxy address to my http client library. After you are done, you can request the har archive from the server.

lucaswxp avatar Mar 14 '17 19:03 lucaswxp

@lucaswxp, Let me give that a shot.

rcave avatar Mar 16 '17 17:03 rcave