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

HAR Export Timing out on certain websites #52

Open
codersbrew opened this issue Aug 11, 2017 · 1 comment
Open

HAR Export Timing out on certain websites #52

codersbrew opened this issue Aug 11, 2017 · 1 comment

Comments

@codersbrew
Copy link

codersbrew commented Aug 11, 2017

Firefox: 52.0.2
Latest Selenium
Python 2.7.X
Har Trigger Exporter beta 10

The basic flow, I run a python web driver headless firefox. In firefox I add the exporter extension and go to a website (http://nbcnews.com). I then call the async script below. Normally, the HAR is pushed to the directory I wanted and all is fine, but every so often the HAR trigger script will timeout and return an error of timedout and no HAR is generated. How do I debug the specific error using a headless firefox in python webdriver? Is it possible that firefox is failing? Anyway I can get more debug info?

`

        browser.get(url)
        browser.set_script_timeout(60)
        test = browser.execute_async_script("""
        var options  = {token: "test", fileName: "output"};
        var callback = arguments[arguments.length - 1];

        function triggerExport() {
          HAR.triggerExport(options).then(result => {
                                  callback("It worked");
                                }, err => {
                                  callback(err);
                                });
        };

        if (typeof HAR === 'undefined') {
          addEventListener('har-api-ready', triggerExport, false);
        } else {
          triggerExport();
        };
            """)  `
  Message: TypeError: file.requestHeaders is undefined
  Stack:
    HarBuilder.prototype.buildPostData@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/netmonitor/har/har-builder.js:252:7
HarBuilder.prototype.buildRequest@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/netmonitor/har/har-builder.js:176:24
HarBuilder.prototype.buildEntry@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/netmonitor/har/har-builder.js:128:21
HarBuilder.prototype.build@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/netmonitor/har/har-builder.js:66:24
HarExporter.buildHarData@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/netmonitor/har/har-exporter.js:166:12
HarExporter.fetchHarData@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/netmonitor/har/har-exporter.js:131:12
HarAutomation<.executeExport@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/netmonitor/har/har-automation.js:183:12
TriggerToolboxOverlay<.triggerExport@resource://gre/modules/commonjs/toolkit/loader.js -> resource://harexporttrigger-at-getfirebug-dot-com/lib/trigger-toolbox-overlay.js:253:5
emitOnObject@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:112:9
emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:89:38
Front<.onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/protocol.js:1258:7
DebuggerClient.prototype.onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/client/main.js:947:7
LocalDebuggerTransport.prototype.send/<@chrome://marionette/content/server.js -> resource://devtools/shared/transport/transport.js:570:13
exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14
exports.makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/ThreadSafeDevToolsUtils.js:101:14

*************************
A coding exception was thrown and uncaught in a Task.

Full message: TypeError: can't convert undefined to object
Full stack: exports.getFormDataSections<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/netmonitor/request-utils.js:56:7
TaskImpl.prototype._run@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/task.js:311:39
TaskImpl@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/task.js:273:3
createAsyncFunction/asyncFunction@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/task.js:247:14
HarBuilder.prototype.buildPostData/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/netmonitor/har/har-builder.js:276:9
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:932:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:813:7
this.PromiseWalker.scheduleWalkerLoop/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:747:11

*************************
*************************
A coding exception was thrown and uncaught in a Task.

Full message: TypeError: can't convert undefined to object
Full stack: exports.getFormDataSections<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/netmonitor/request-utils.js:56:7
TaskImpl.prototype._run@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/task.js:311:39
TaskImpl@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/task.js:273:3
createAsyncFunction/asyncFunction@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/task.js:247:14
HarBuilder.prototype.buildPostData/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/netmonitor/har/har-builder.js:276:9
Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:932:23
this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:813:7
this.PromiseWalker.scheduleWalkerLoop/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:747:11

`
@codersbrew
Copy link
Author

Seems like this is the cause.

https://bugzilla.mozilla.org/show_bug.cgi?id=1383844

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant