Export to GitHub

harviewer - issue #77

Auto load har file does not work in


Posted on May 21, 2012 by Grumpy Hippo

What steps will reproduce the problem? 1.Pre set a har file path to the har viewer. 2.Go the index.php (the har viewer)

What is the expected output? What do you see instead? The waterfall view will not show up in firefox but works in all other browers. In firefox, it gives "log is missing and it is not optional".

What version of the product are you using? On what operating system? 2.0-15

Please provide any additional information below. I use viewer.loadHar(har_path); to auto load a har file.

Please attach a HAR file that can be used to reproduce the problem.

Comment #1

Posted on May 24, 2012 by Grumpy Hippo

Comment deleted

Comment #2

Posted on May 25, 2012 by Massive Wombat

Can you attach a test case (the code that calls "viewer.loadHar(har_path);")? So, I can test on my machine.

Honza

Comment #3

Posted on May 26, 2012 by Massive Wombat

So, I tried the following code and it seems to be working for me: (put it into the webapp directory together with the 121.har file)

Does it work for you?

Honza

HAR Viewer Test $("#content").bind("onViewerInit", function(event) { var viewer = event.target.repObject; viewer.loadHar("121.har"); });

Comment #4

Posted on May 30, 2012 by Grumpy Hippo

Comment deleted

Comment #5

Posted on May 30, 2012 by Grumpy Hippo

Also there are colors missing on the bars in the chart.

Comment #6

Posted on May 31, 2012 by Massive Wombat

I tested on Ubuntu (Firefox 11) and I still don't see the problem.

Do you see any errors in Firefox Error console or in Firebug's Error Console? Can you debug the code and see what actually fails?

Honza

Attachments

Comment #7

Posted on May 31, 2012 by Grumpy Hippo

Comment deleted

Comment #8

Posted on Jun 4, 2012 by Grumpy Hippo

Comment deleted

Comment #9

Posted on Jun 6, 2012 by Grumpy Hippo

Comment deleted

Comment #10

Posted on Jun 6, 2012 by Grumpy Hippo

Comment deleted

Comment #11

Posted on Jun 7, 2012 by Massive Wombat

I don't know how to help, I need to reproduce it on my machine... Honza

Comment #12

Posted on Jun 9, 2012 by Grumpy Hippo

Comment deleted

Comment #13

Posted on Sep 3, 2012 by Massive Wombat

Are you running the HAR Viewer through http or file protocol?

Honza

Comment #14

Posted on Aug 20, 2013 by Happy Monkey

Comment deleted

Comment #15

Posted on Aug 20, 2013 by Happy Monkey

Comment deleted

Comment #16

Posted on Aug 20, 2013 by Happy Monkey

Honza,

quick question. : I am seeing similar issue where auto load of file not working. I am using file protocol.

HTTP Archive Viewer 2.0.15 $("#content").bind("onViewerInit", function(event) { // Get application object var viewer = event.target.repObject; var settings = {jsonp: true};

viewer.loadHar("www.coupons.com.har",settings);

});

My question : I have downloaded the harviewer under C:\har folder. and my index.php and www.coupons.com.har is in same dir (i.e. har)

I see parse error.

but when i use same file to manually upload it works fine.

secondly , $("#content").bind("onViewerInit", function(event) { // Get application object var viewer = event.target.repObject;

viewer.loadHar("www.coupons.com.har");

}); I dont see anything . it goes to preview tab. so i think upload worked, but why preview shows blank. I am using 2.0.15 and FF 21. can you please explain what am i misisng? Am I missing something?

Comment #17

Posted on Aug 20, 2013 by Massive Wombat

Can you attach your entire directory (including the *.har file), so I can copy it to my local web server and see the problem? Honza

Comment #18

Posted on Aug 20, 2013 by Happy Monkey

I have attached the zip.. it has all. Let me know if you need anything more.

Thanks

Attachments

Comment #19

Posted on Aug 30, 2013 by Massive Wombat

I tried that example and it works if I am running it through a web server.

It says:

log is missing and it is not optional

if I run the application through file: protocol.

Note that HAR Viewer is supposed to always run on a web server, so I am a bit reluctant to fix this.

Does it work for you if you use a web server?

Honza

Comment #20

Posted on Aug 30, 2013 by Happy Monkey

i havent tried using web server, Let me try and see if that helps.

Thanks Honza for working on it.

Comment #21

Posted on Sep 9, 2013 by Happy Monkey

Comment deleted

Comment #22

Posted on Sep 10, 2013 by Happy Monkey

hi Honza,

I tried using web server and still no luck.

one more thing i noticed is

if i do http://myserver.com/index.php?path=examples/google.com.har i see it works fine

but if try my har file it throws above error

attached is my har file. can you try with my har file.

Attachments

Comment #23

Posted on Sep 10, 2013 by Massive Wombat

It seems to be working for me.

1) Here is URL to my local server http://legoas/src/github.com/janodvarko/harviewer/webapp/?path=examples/www.coupons.com-analytics-log.har

2) Don't forget to get clean copy from github

3) See the attached screenshot, it shows what I am seeing.

Did you copy your file into the examples directory on the server?

Honza

Attachments

Comment #24

Posted on Sep 10, 2013 by Happy Monkey

Comment deleted

Comment #25

Posted on Sep 10, 2013 by Happy Monkey

Comment deleted

Comment #26

Posted on Sep 10, 2013 by Happy Monkey

okay. I figured out what was the issue on my end. When I tried http://sjc-dev-usrv20.corp.coupons.com/index.php?path=examples/ www.coupons.com-analytics-log_old.har it does not works

but i renamed file(www.coupons.com.har) with http://sjc-dev-usrv20.corp.coupons.com/index.php?path=examples/www.coupons.com.har and it works fine.

Do we have any restrictions on naming of file? and is there any kind of caching done?

Comment #27

Posted on May 7, 2014 by Massive Kangaroo

I'm still getting this now. Was this ever solved? I've tried moving the .har file to the examples directory, renaming to dm.har, etc... It works fine in chrome but not in firefox.

Comment #28

Posted on May 7, 2014 by Massive Kangaroo

Actually I found that adding a .com in front of .har fixed the issue for me too. This is a very weird issue. I'll try to find time to submit a pull request to patch this bug...

Comment #29

Posted on May 8, 2014 by Massive Wombat

I'll try to find time to submit a pull request to patch this bug... Excellent thanks!

Honza

Status: New

Labels:
Type-Defect Priority-Medium