zazi1991i / harviewer

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

appendPreview() not working #97

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Load repro.html in a browser
2. Press the 'View HAR' button
3.

What is the expected output? What do you see instead?
An empty iframe. The console has this exception

HarPreview.appendPreview; EXCEPTION  TypeError {stack: "TypeError: Object 
[object Array] has no method 
'ne…ceInspector/harPreview.html?validate=false:32:20)", message: "Object 
[object Array] has no method 'next'"} trace.js:37
Trace.exception trace.js:37
HarPreview.appendPreview harPreview.js:57
(anonymous function) harPreview.html?validate=false:32
jQuery.event.handle jquery.js:2562
jQuery.event.add.elemData.handle.eventHandle jquery.js:2201
Lib.fireEvent lib.js:148
(anonymous function) harPreview.js:99
req.execCb require.js:1557
execManager require.js:500
manager.onDep require.js:574
execManager require.js:531
manager.onDep require.js:574
execManager require.js:531
manager.onDep require.js:574
execManager require.js:531
manager.onDep require.js:574
execManager require.js:531
load require.js:848
(anonymous function) i18n.js:137
req.execCb require.js:1557
execManager require.js:500
main require.js:650
context.require require.js:1150
(anonymous function) require.js:353
(anonymous function) i18n.js:126
req.execCb require.js:1557
execManager require.js:500
manager.onDep require.js:574
execManager require.js:531
main require.js:650
callDefMain require.js:663
context.completeLoad require.js:1206
req.onScriptLoad require.js:1585
HarPreview; initialized OK 

What version of the product are you using? On what operating system?
2.0.15

Please provide any additional information below.
I have attached a zip file that contains all files necessary to show the repro. 
If I pass validate=true I the following messages appear:

log.pages object found, but array is required
log.entries object found, but array is required

Inspecting both pages and entries while debugging shows they are arrays.

Please attach a HAR file that can be used to reproduce the problem.
I am using the file from 
http://www.janodvarko.cz/har/viewer/examples/inline-scripts-block.harp. You'll 
see in the code that I make a jsonp request to fetch this file, and call 
viewer.appendPreview() passing it in.

Original issue reported on code.google.com by jason.ca...@gmail.com on 26 Mar 2014 at 5:20

Attachments:

GoogleCodeExporter commented 8 years ago
Is this project dead ?

Original comment by jason.ca...@gmail.com on 8 May 2014 at 4:31

GoogleCodeExporter commented 8 years ago
No, it's just hard to find free time ;-)

Would you be willing to provide a patch, I can review...

Honza

Original comment by odva...@gmail.com on 8 May 2014 at 5:34

GoogleCodeExporter commented 8 years ago
Thanks for the response Honza. I understand it's difficult to find free time - 
I'll submit a patch for review when I can find some free time of my own :-)

Original comment by jason.ca...@gmail.com on 8 May 2014 at 11:55