zazi1991i / harviewer

Automatically exported from code.google.com/p/harviewer
0 stars 0 forks source link

Auto load har file does not work in #77

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
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.

Original issue reported on code.google.com by kheathe...@gmail.com on 21 May 2012 at 1:16

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Can you attach a test case (the code that calls "viewer.loadHar(har_path);")?
So, I can test on my machine.

Honza

Original comment by odva...@gmail.com on 25 May 2012 at 11:46

GoogleCodeExporter commented 8 years ago
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

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>HAR Viewer Test</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body class="harBody">
    <div id="content" version="@VERSION@"></div>
    <script src="scripts/jquery.js"></script>
    <script data-main="scripts/harViewer" src="scripts/require.js"></script>
    <script>
    $("#content").bind("onViewerInit", function(event)
    {
        var viewer = event.target.repObject;
        viewer.loadHar("121.har");
    });
    </script>
    <link rel="stylesheet" href="css/harViewer.css" type="text/css"/>
</body>
</html>

Original comment by odva...@gmail.com on 26 May 2012 at 4:41

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Also there are colors missing on the bars in the chart.

Original comment by kheathe...@gmail.com on 30 May 2012 at 10:51

GoogleCodeExporter commented 8 years ago
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

Original comment by odva...@gmail.com on 31 May 2012 at 7:00

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I don't know how to help, I need to reproduce it on my machine...
Honza

Original comment by odva...@gmail.com on 7 Jun 2012 at 1:23

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Are you running the HAR Viewer through http or file protocol?

Honza

Original comment by odva...@gmail.com on 3 Sep 2012 at 12:45

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Honza,

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

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>HTTP Archive Viewer 2.0.15</title>
</head>
<body class="harBody">
    <div id="content" version="2.0.15"></div>
    <!--[if IE]><script type="text/javascript" src="scripts/excanvas/excanvas.js"></script><![endif]-->
    <script src="scripts/jquery.js"></script>
    <script data-main="scripts/harViewer" src="scripts/require.js"></script>
   <link rel="stylesheet" href="css/harViewer.css" type="text/css"/> 
    <script>
$("#content").bind("onViewerInit", function(event)
{
    // Get application object
    var viewer = event.target.repObject;
    var settings = {jsonp: true};

    viewer.loadHar("www.coupons.com.har",settings);
});
</script>
    <?php include("ga.php") ?>
</body>
</html>

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?

Original comment by kavita.s...@gmail.com on 20 Aug 2013 at 1:19

GoogleCodeExporter commented 8 years ago
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

Original comment by odva...@gmail.com on 20 Aug 2013 at 7:45

GoogleCodeExporter commented 8 years ago
I have attached the zip.. it has all.
Let me know if you need anything more.

Thanks

Original comment by kavita.s...@gmail.com on 20 Aug 2013 at 5:25

Attachments:

GoogleCodeExporter commented 8 years ago
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

Original comment by odva...@gmail.com on 30 Aug 2013 at 2:16

GoogleCodeExporter commented 8 years ago
i havent tried using web server, Let me try and see if that helps.

Thanks Honza for working on it.

Original comment by kavita.s...@gmail.com on 30 Aug 2013 at 5:50

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
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.

Original comment by kavita.s...@gmail.com on 10 Sep 2013 at 1:10

Attachments:

GoogleCodeExporter commented 8 years ago
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.coup
ons.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

Original comment by odva...@gmail.com on 10 Sep 2013 at 6:32

Attachments:

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
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.h
ar and it works fine.

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

Original comment by kavita.s...@gmail.com on 10 Sep 2013 at 9:01

GoogleCodeExporter commented 8 years ago
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.

Original comment by flipt...@gmail.com on 7 May 2014 at 7:21

GoogleCodeExporter commented 8 years ago
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...

Original comment by flipt...@gmail.com on 7 May 2014 at 7:36

GoogleCodeExporter commented 8 years ago
> I'll try to find time to submit a pull request to patch this bug...
Excellent thanks!

Honza

Original comment by odva...@gmail.com on 8 May 2014 at 6:21