RESOLVED FIXED 294072
Web Inspector: Broken Sources and Network tabs after creating Local Override with invalid Regular Expression
https://bugs.webkit.org/show_bug.cgi?id=294072
Summary Web Inspector: Broken Sources and Network tabs after creating Local Override ...
Razvan Caliman
Reported 2025-06-05 07:21:45 PDT
Created attachment 475487 [details] Screenshot of the Local Override popover with the state that creates the bug Originally reported by a developer on https://developer.apple.com/forums/thread/772801 An unhandled exception is thrown when attempting to use a URL pattern for a Local Override that turns out to be an invalid regular expression. Steps to reproduce: - Open the Source tab - Create a new Local Override with this URL: (? - Mark it as a Regular Expression - Close the Local Override popover and reload the page Result: Web Inspector enters an unrecoverable state for non-debug builds where the unhandled exception is triggered for every requested URL. This leaves the UI in an unusable state for Sources and Network tabs. Since Local Overrides are persisted and re-applied on every Web Inspector session, this impacts all inspected pages. Uncaught Exceptions: ----------------------- - SyntaxError: Invalid regular expression: unrecognized character after (? (at LocalResourceOverride.js:349:26) RegExp @ [native code] _urlRegex @ LocalResourceOverride.js:349:26 matches @ LocalResourceOverride.js:316:24 filter @ [native code] localResourceOverridesForURL @ NetworkManager.js:470:20 _updateContent @ LocalResourceOverrideWarningView.js:82:84 initialLayout @ LocalResourceOverrideWarningView.js:72:28 _layoutSubtree @ View.js:287:31 _visitViewTreeForLayout @ View.js:383:36 -----------------------
Attachments
Screenshot of the Local Override popover with the state that creates the bug (42.31 KB, image/png)
2025-06-05 07:21 PDT, Razvan Caliman
no flags
Radar WebKit Bug Importer
Comment 1 2025-06-05 07:25:31 PDT
Razvan Caliman
Comment 2 2025-06-05 07:32:38 PDT
EWS
Comment 3 2025-06-06 11:06:57 PDT
Committed 295928@main (1d01240dc083): <https://commits.webkit.org/295928@main> Reviewed commits have been landed. Closing PR #46368 and removing active labels.
EWS
Comment 4 2025-06-10 18:26:46 PDT
Committed 289651.570@safari-7621-branch (d5dc9856f363): <https://commits.webkit.org/289651.570@safari-7621-branch> Reviewed commits have been landed. Closing PR #3153 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.