Open JosephCastro opened 8 years ago
What version of Firefox and HAR Export Trigger do use use?
I tried the STR on Nightly with the latest source (HARExportTrigger, master) and it seems to be working for me. Also, do you open the Toolbox or do you have extensions.netmonitor.har.autoConnect pref set to true?
Honza
Btw. I just fixed one compatibility bug with Fx42 Here is a test build http://janodvarko.cz/temp/har/harexporttrigger-0.5.0-beta.7.11.1.xpi
@JosephCastro Does it fix your problem?
Honza
Firefox 42, HAR Export Trigger 0.5.0-beta6, toolbox open. But without the extensions.netmonitor.har.autoConnect (false).
Now I testing the 0.5.0-beta7 without the pref and have the same problem, but setting the pref to true, sometimes works fine, other times HAR is not defined. It's a little bit random.
Maybe can be a JS from youtube or too many redirects ... but the plugin is attached to the tab (also I open all in the home tab) not to the page.
Here is my config:
And here are my steps to reproduce the problem (STR): 1) Start Firefox 2) Open a new (empty) tab by clicking on the + button in the tab bar 3) Typing: youtube.com in the URL bar, pressing enter 4) The address is redirected to: https://www.youtube.com/ 5) Opening the developer Toolbox by pressing F12 (Win7) 6) Selecting the Console panel and executing "HAR" (no quotes) expression on the command line 7) The HAR object exists 8) Clicking on one of the videos, it start playing 9) Again, executing "HAR" (no quotes) expression on the command line 10) The HAR object still exists
Does this works for you? If yes, what's the difference from your STR?
Honza
Yes, your STR works.
Config:
STR: 1.- Start firefox 2.- Open toolbox (F12) 3.- Test: HAR is defined (by executing HAR in command line) 3.- Using the default tab, adding the youtube.com url 4.- Log in into youtube.com 5.- Wait until the redirect to youtube home 6.- Test: HAR is defined 7.- Type the url to go (some video) 8.- Wait until load 9.- Test: HAR is defined or not.
In the last step, sometimes the HAR is defined other times not. I tested with other sites, but the HAR is defined, only with youtube video site give me sometimes the reference error.
I can't reproduce it... :(
Do you see any errors in the Browser Console? (except of the reference error)
Honza
Nope, no more errors.
It's random... I can't reproduce always. :c
Note: This happen when I get a video ad (not nonlinear or companions)
Note: This happen when I get a video ad (not nonlinear or companions)
What do you mean by nonlinear or companions?
Honza
They are three types of ads in youtube:
@JosephCastro I am unable to see the issue on my machine.
Could you provide a simple online page that I could access and see the problem?
Honza
It's difficult to do that, but I will try it.
Thanks!
Honza
I'm running Firefox and exporting HARs via Selenium (FF 42, harexporttrigger-0.5.0-beta.7), and had the same issue. I solved it like this:
function triggerExport() {
HAR.triggerExport({'token':'test', 'getData':true})
.then((result) => {…/* return har via callback */}));
};
if (typeof HAR === 'undefined') {
addEventListener('har-api-ready', triggerExport, false);
} else {
triggerExport();
}`;
If HAR isn't yet defined, wait for the har-api-ready event. Otherwise trigger the export right away.
Nice!
I don't know if this solves the reported issue for @JosephCastro, but I am sure the script will be useful for others.
I've put it on FAQ page: https://github.com/firebug/har-export-trigger/wiki/FAQ#har-is-not-defined
Honza
I can't create a test for this error, I can't replicate the youtube error. @tobli Nice, I will try it.
Hi
I trying to get the HAR for youtube video, so what I do is basically the same actions for load HAR plugin (works with other sites):
I trying to lose the reference with other video sites, but only happen with youtube (not always), so There's a way to lose the reference to HAR object?
Thanks for your response.