Firebug3 - not honoring 'netexport.pageLoadedTimeout' config

89 views
Skip to first unread message

Senthil

unread,
Apr 6, 2015, 11:50:57 AM4/6/15
to fir...@googlegroups.com
I was able to successfully get window.NetExport.triggerExport() working with Firebug 3.0 alpha 9 and Firefox 37.0.1
Thanks Honza for that bug fix.


When I wanted only one har file that was generated with triggerExport, I set the value of "netexport.pageLoadedTimeout" to 0 (number).
But when I run the selenium test, I get one har file for each page and one extra for the triggerExport.

I have attached a  Java + Maven based project which brings up the browser, installs firebug and loads the page.
All the configurations are set in  FirefoxWebdriverService.java file.


In the netexporter plugin code, I saw some code related to "pageLoadTimeout" like the one below (in automation.js)
// 3) The page is loaded if there is no new request after specified timeout. // extensions.firebug.netexport.pageLoadedTimeout var timeout = Firebug.getPref(prefDomain, "pageLoadedTimeout"); if (timeout > 0)
this.timeout = setTimeout(bindFixed(this.onPageLoaded, this), timeout);




I don't see anything similar to this in the firebug3 - lib/net/export/ folder (looked in multiple .js files including automation.js)

Is this implemented in Firebug 3 or is it missing for now?


Thanks
Senthil.


NetExportProject.zip

Jan Honza Odvarko

unread,
Apr 8, 2015, 5:04:30 AM4/8/15
to fir...@googlegroups.com
> Is this implemented in Firebug 3 or is it missing for now?
Yep, it should work, take a look here:
https://github.com/firebug/firebug.next/blob/master/lib/net/export/har-collector.js#L117

+ there is a comment

Honza

Senthil

unread,
Apr 8, 2015, 8:54:32 AM4/8/15
to fir...@googlegroups.com
Honza,

I was expecting this to behave in the way you had commented in the code

    // The auto-export is not done if the timeout is set to zero (or less).

    // This is useful in cases where the export is done manually through

    // API exposed to the content.


I ran the test against google.com (the zip attached earlier - you just need java to run that program), it created two files (one auto-export and one for javascript call) instead of one.

To make sure I has set the correct values, I verified it in about:config (attached screenshot)

I was able to attach the FBTrace with the test run and saw the sequence below  -  the Exporter.buildData is called twice while we expect only one call.
    "index": 428, "text": "HarCollector.waitForTimeout; 0"
    "index": 429, "text": "HarCollector.waitForPageLoad; DONE Page loaded!"
    "index": 430, "text": "exporter.buildJSON; Number of entries: 22"
    "index": 431, "text": "Exporter.buildHAR;"
    "index": 432, "text": "Exporter.buildData; Exported data:"    
    "index": 433, "text": "exporter.buildJSON; Number of entries: 22"
    "index": 434, "text": "Exporter.buildHAR;"
    "index": 435, "text": "Exporter.buildData; Exported data:"

With "alwaysEnableAutoExport=true"  and with "pageLoadedTimeout=0", and with No javascript call, I'm still getting one log file.

I believe this is a bug. Can you have a look at this?

Thanks
Senthil.
google-firebug-tracing-logs.ftl
about-config-screenshot.png
OutputLogFiles.png

Jan Honza Odvarko

unread,
Apr 9, 2015, 7:20:58 AM4/9/15
to fir...@googlegroups.com
Hi Senthil,
yes, this looks like a bug.

Can you please create an issue report in this list:
https://github.com/firebug/firebug.next/issues

... and attach all the files from here (including the zipped test)

Also, please put the link to the issue report here.

I'll fix it.

Thanks!
Honza

Senthil

unread,
Apr 10, 2015, 9:34:42 AM4/10/15
to fir...@googlegroups.com

Jan Honza Odvarko

unread,
Apr 10, 2015, 9:37:12 AM4/10/15
to fir...@googlegroups.com
Thanks!

Honza
Reply all
Reply to author
Forward
0 new messages