WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
192959
Web Inspector: Charles Proxy errors opening har files exported from Safari (invalid startedDateTime)
https://bugs.webkit.org/show_bug.cgi?id=192959
Summary
Web Inspector: Charles Proxy errors opening har files exported from Safari (i...
Joseph Pecoraro
Reported
2018-12-20 16:01:51 PST
Charles Proxy errors opening har files exported from Safari (invalid startedDateTime) Steps to Reproduce: 1. Open apple.com 2. Open inspector after page load 3. Export a HAR from Network Tab (lacking resource load data, just listing existing resource) 4. Open HAR in Charles => ‘JsonParse: Invalid format: “”’ Note: • This is due to `"startedDateTime" = ""` in the HAR content • `startedDateTime` is non-optional in entries and pages:
http://www.softwareishard.com/blog/har-12-spec/
Proposal: We should not allow exporting a HAR without full load data. So disallow HAR export when just opening the inspector for a page but allowing it on reload / navigation once we have main resource content.
Attachments
[PATCH] Proposed Fix
(3.90 KB, patch)
2018-12-20 16:11 PST
,
Joseph Pecoraro
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Joseph Pecoraro
Comment 1
2018-12-20 16:02:01 PST
<
rdar://problem/46863411
>
Joseph Pecoraro
Comment 2
2018-12-20 16:11:42 PST
Created
attachment 357893
[details]
[PATCH] Proposed Fix
Blaze Burg
Comment 3
2018-12-20 16:29:11 PST
Comment on
attachment 357893
[details]
[PATCH] Proposed Fix r=me Is there a way to test this? And, we probably should update documentation somewhere to explain this restriction.
Devin Rousso
Comment 4
2018-12-20 16:32:03 PST
Comment on
attachment 357893
[details]
[PATCH] Proposed Fix View in context:
https://bugs.webkit.org/attachment.cgi?id=357893&action=review
> Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js:1167 > + let mainResource = mainFrame.mainResource;
Considering that the HAR is built based on the filtered resources in the table, is this check necessary? Do we allow an export without the main resource?
> Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js:1168 > + if (!mainResource)
Aside: is it ever possible for the `mainFrame` to not have a `mainResource`?
> Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js:1174 > + if (!this._HARResources().length)
NIT: I know that this isn't part of this patch, but shouldn't this be named `_harResouces`?
Joseph Pecoraro
Comment 5
2018-12-20 16:36:24 PST
(In reply to Brian Burg from
comment #3
)
> Comment on
attachment 357893
[details]
> [PATCH] Proposed Fix > > r=me > > Is there a way to test this? And, we probably should update documentation > somewhere to explain this restriction.
Existing HAR tests passed. The rest is primarily a UI restriction. (In reply to Devin Rousso from
comment #4
)
> Comment on
attachment 357893
[details]
> [PATCH] Proposed Fix > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=357893&action=review
> > > Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js:1167 > > + let mainResource = mainFrame.mainResource; > > Considering that the HAR is built based on the filtered resources in the > table, is this check necessary? Do we allow an export without the main > resource?
We can export a subset, but the HAR itself will need top level info.
> > Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js:1168 > > + if (!mainResource) > > Aside: is it ever possible for the `mainFrame` to not have a `mainResource`?
Probably not, but might as well check. I don't know about cases like ITMLKit.
> > Source/WebInspectorUI/UserInterface/Views/NetworkTableContentView.js:1174 > > + if (!this._HARResources().length) > > NIT: I know that this isn't part of this patch, but shouldn't this be named > `_harResouces`?
Either works.
WebKit Commit Bot
Comment 6
2018-12-20 16:58:53 PST
Comment on
attachment 357893
[details]
[PATCH] Proposed Fix Clearing flags on attachment: 357893 Committed
r239478
: <
https://trac.webkit.org/changeset/239478
>
WebKit Commit Bot
Comment 7
2018-12-20 16:58:54 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug