agusantoso / harviewer

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

It does not work using Firefox except har postfix name likes '.com.har' #84

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Unzip harviewer-2.0-15.zip to Apache server
2.Open a demo using Firefox v 17.01 for 
example:http://<IP>/harviewer/index.php?path=examples/browser-blocking-time.har 
3.Always show the error message 'log is missing and it is not optional'
4.It works well if changing the file name to browser-blocking.com.har 

What is the expected output? What do you see instead?
show the result successfully 

What version of the product are you using? On what operating system?
Only occur on Firefox on Win7

Please provide any additional information below.

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

Original issue reported on code.google.com by mrbigh...@gmail.com on 18 Dec 2012 at 6:26

GoogleCodeExporter commented 9 years ago

Original comment by odva...@gmail.com on 18 Dec 2012 at 8:48

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi,
This issue is there in HarViewer 2.0.15 with Firefox browsers 12,14,16,17.
Is there a workaround/fix?

Thanks in advance

Original comment by gowri.shivakumar on 19 Jan 2013 at 11:10

GoogleCodeExporter commented 9 years ago
I can't reproduce the problem on my machine.
I tried Fx: 14, 16, 18, 20, 21 + Win Vista

It just seem to be working for me.

Do you see any other errors?
(e.g. in Firefox Error Console or Firebug Console panel)

Honza

Original comment by odva...@gmail.com on 21 Jan 2013 at 2:26

GoogleCodeExporter commented 9 years ago
What Firefox localization do you use?
Does it work if you use en-US ?

Honza

Original comment by odva...@gmail.com on 21 Jan 2013 at 2:27

GoogleCodeExporter commented 9 years ago
Localization is already en-US itself, even though it doesnt work ,Using windows 
7
No othere errors on firebug consoles

Original comment by gowri.shivakumar on 22 Jan 2013 at 3:46

GoogleCodeExporter commented 9 years ago
Tried on windows XP also, Have installed the Harviewer applicaiton 2.0.15 on 
Tomcat server 6.0.35.

Original comment by gowri.shivakumar on 22 Jan 2013 at 3:49

GoogleCodeExporter commented 9 years ago
Could you debug the code?

My guess is that the problem could be related to the way how the HAR file 
content is parsed. The parsing is done using jQuery here:

https://github.com/janodvarko/harviewer/blob/master/webapp/scripts/preview/harMo
del.js#L191

Perhaps the method fails?

Honza

Original comment by odva...@gmail.com on 22 Jan 2013 at 7:34

GoogleCodeExporter commented 9 years ago
Yes, it fails in the parse method at the line "var result = 
JSONSchema.validate(input, resolvedSchema.logType);"
If I make validate flag to false, then it displayes blank in the preview
But the same har file works perfectly fine on Chrome and IE9.
Can you please advise on a workaround/solution.

Thanks

Original comment by gowri.shivakumar on 22 Jan 2013 at 11:26

GoogleCodeExporter commented 9 years ago
Also in the firebug , in the console for the get request,under XML get this msg 
"XML Parsing Error: not well-formed Location: 
moz-nullprincipal:{9995528c-4543-4554-a5d2-011ac6bc192d} Line Number 1, Column 
1:

{
^"

Attached is the screenshot.

Thanks for looking into the issue.

Original comment by gowri.shivakumar on 22 Jan 2013 at 11:33

Attachments:

GoogleCodeExporter commented 9 years ago
> Also in the firebug , in the console for the get request,under XML
The content is JSON, what do you see under JSON?
Honza

Original comment by odva...@gmail.com on 22 Jan 2013 at 11:39

GoogleCodeExporter commented 9 years ago
Json seems to be okay,Attached is the screenshot of same

Original comment by gowri.shivakumar on 22 Jan 2013 at 11:42

Attachments:

GoogleCodeExporter commented 9 years ago
> Yes, it fails in the parse method at the line "var result =
> JSONSchema.validate(input, resolvedSchema.logType);"
> If I make validate flag to false, then it displayes blank in the preview
So, the jQuery.parseJSON(jsonString); is OK?
The "input" variable contains parsed HAR file content?
If yes, we need to find out why the preview is blank...

Weird is that I can't reproduce it...

Honza

Original comment by odva...@gmail.com on 22 Jan 2013 at 11:51

GoogleCodeExporter commented 9 years ago
Hi,
Actually the online one i.e 
http://www.softwareishard.com/har/viewer/?path=examples/google.com.har
works fine in firefox.
I have taken the 
http://code.google.com/p/harviewer/downloads/detail?name=harviewer-2.0-15.zip&ca
n=2&q= and installed on my local tomcat server 6.0.35(Windows 7 and also on 
linux same issue)
I hope it is the same as the online one in terms of version and code.

Thanks

Original comment by gowri.shivakumar on 22 Jan 2013 at 11:51

GoogleCodeExporter commented 9 years ago
> I hope it is the same as the online one in terms of version and code.
Yes, the online should be the same, but you should verify. Something seems
to be different if one version works and the other does not.

Honza

Original comment by odva...@gmail.com on 22 Jan 2013 at 11:57

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi,
got it working, added the dataType as json in $.ajax method and now it seems 
fine.
For some reason in firefox the har file was not returned as json.

Thanks

Original comment by gowri.shivakumar on 22 Jan 2013 at 3:59

GoogleCodeExporter commented 9 years ago
Excellent!

Could you attach your changes as a patch?
Honza

Original comment by odva...@gmail.com on 22 Jan 2013 at 4:02

GoogleCodeExporter commented 9 years ago
Attached is the harModel.js
Change made is in method loadLocalArchive 
added dataType: "json" in $.ajax(line 385)

Actually it is there in method loadRemoteArchive,If only I had figured out that 
firefox wasn't reading har as json it would have been easier to fix.

Thanks

Original comment by gowri.shivakumar on 22 Jan 2013 at 4:19

Attachments: