Bug 191339

Summary: ServiceWorker Inspector: Uncaught Exception: null is not an object (evaluating 'resource.target.addResource')
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, inspector-bugzilla-changes, joepeck, mattbaker, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
URL: https://airhorner.com/
Attachments:
Description Flags
[PATCH] Proposed Fix none

Description Joseph Pecoraro 2018-11-06 16:48:47 PST
* Steps to Reproduce
1. Inspect ServiceWorker on airhorner.com
2. Reload the airhorner.com page
  => Exception in inspector for script with `targetId` of "serviceWorkerScriptLoad:" which is unexpected

-------
Inspected URL:        https://airhorner.com/
Loading completed:    true
Dispatch Source:      Protocol Event

Protocol Event:
{"method":"Network.requestWillBeSent","params":{"requestId":"0.28","frameId":"","loaderId":"","documentURL":"https://airhorner.com/sw.js","request":{"url":"https://airhorner.com/sw.js","method":"GET","headers":{"Service-Worker":"script"}},"timestamp":3.59948630600411,"walltime":1541551630.689134,"initiator":{"type":"other"},"targetId":"serviceWorkerScriptLoad:"}}

Uncaught Exceptions:
 - null is not an object (evaluating 'resource.target.addResource') (at NetworkManager.js:619:28)
    _addNewResourceToFrameOrTarget @ NetworkManager.js:619:28
    resourceRequestWillBeSent @ NetworkManager.js:274:55
    requestWillBeSent @ NetworkObserver.js:41:52
    dispatchEvent @ InspectorBackend.js:305:42
    _dispatchEvent @ Connection.js:194:32
    dispatch @ Connection.js:72:32
    dispatch @ InspectorBackend.js:154:49
    dispatchNextQueuedMessageFromBackend @ MessageDispatcher.js:42:34

Additional Details:
    cause --> An uncaught exception was thrown while handling event: Network.requestWillBeSent
Comment 1 Joseph Pecoraro 2018-11-06 16:49:53 PST
Created attachment 354030 [details]
[PATCH] Proposed Fix
Comment 2 Matt Baker 2018-11-06 17:54:21 PST
Comment on attachment 354030 [details]
[PATCH] Proposed Fix

r=me
Comment 3 WebKit Commit Bot 2018-11-06 23:32:52 PST
Comment on attachment 354030 [details]
[PATCH] Proposed Fix

Clearing flags on attachment: 354030

Committed r237917: <https://trac.webkit.org/changeset/237917>
Comment 4 WebKit Commit Bot 2018-11-06 23:32:53 PST
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2018-11-06 23:33:39 PST
<rdar://problem/45867252>