Bug 211593 - Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluating 'mimeType.endsWith')
Summary: Web Inspector: Uncaught Exception: TypeError: null is not an object (evaluati...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-05-07 13:24 PDT by Devin Rousso
Modified: 2020-05-07 16:38 PDT (History)
4 users (show)

See Also:


Attachments
Patch (1.51 KB, patch)
2020-05-07 13:25 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (8.17 KB, patch)
2020-05-07 15:46 PDT, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2020-05-07 13:24:27 PDT
Uncaught Exception in Web Inspector.

# STEPS TO REPRODUCE:
1. inspect a page with a `<form method="post">`
2. attempt to view the resource after submitting

Uncaught Exceptions:
-----------------------
 - TypeError: null is not an object (evaluating "mimeType.endsWith") (at ResourceClusterContentView.js:441:21)
    _normalizeMIMETypeForDOM @ ResourceClusterContentView.js:441:21
    _tryEnableCustomRequestContentViews @ ResourceClusterContentView.js:477:53
    ResourceClusterContentView @ ResourceClusterContentView.js:50:53
    createFromRepresentedObject @ ContentView.js:49:53
    contentViewForRepresentedObject @ ContentView.js:214:72
    showContentViewForRepresentedObject @ ContentBrowser.js:151:63
    showDefaultContentViewForTreeElement @ NavigationSidebarPanel.js:203:82
    _checkElementsForPendingViewStateCookie @ NavigationSidebarPanel.js:723:79
    _checkOutlinesForPendingViewStateCookie @ NavigationSidebarPanel.js:679:53
    restoreStateFromCookie @ NavigationSidebarPanel.js:246:53
    restoreStateFromCookie @ TabContentView.js:150:63
    ? @ Main.js:1761:46
    ? @ Main.js:1737:37
-----------------------

Notes:
Inspected URL:        http://localhost/test.html
Loading completed:    true
Frontend User Agent:  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/605.1.15 (KHTML, like Gecko)
Comment 1 Devin Rousso 2020-05-07 13:25:10 PDT
Created attachment 398789 [details]
Patch
Comment 2 Joseph Pecoraro 2020-05-07 14:16:59 PDT
Comment on attachment 398789 [details]
Patch

Something like this should really have a test.
Comment 3 Devin Rousso 2020-05-07 14:32:03 PDT
Comment on attachment 398789 [details]
Patch

(In reply to Joseph Pecoraro from comment #2)
> Something like this should really have a test.
Unfortunately, this is deep inside View code :(

Unless you're referring to tests of `parseMIMEType` itself, which we currently don't have any of (but I could add).
Comment 4 Devin Rousso 2020-05-07 15:46:47 PDT
Created attachment 398807 [details]
Patch
Comment 5 EWS 2020-05-07 16:22:19 PDT
Committed r261344: <https://trac.webkit.org/changeset/261344>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 398807 [details].
Comment 6 Radar WebKit Bug Importer 2020-05-07 16:23:14 PDT
<rdar://problem/62997818>