RESOLVED FIXED294627
Web Inspector: REGRESSION STP Sources tabs fails to load when hitting a breakpoint
https://bugs.webkit.org/show_bug.cgi?id=294627
Summary Web Inspector: REGRESSION STP Sources tabs fails to load when hitting a break...
Jeff Johnson
Reported 2025-06-17 12:24:21 PDT
Created attachment 475589 [details] Screenshot of Sources tab The bug occurs on macOS 15.5 with Safari Technology Preview 221 but not with Safari 18.5. I don't have 100% reproducible steps, but the bug seems to occur when the web inspector is opened to the Elements tab, and a preexisting breakpoint is hit. I was testing with YouTube video pages. Here are the errors when I inspect the web inspector itself: [Error] Error during DOMAgent operation: Missing node for given path (anonymous function) (Main.js:29938) _dispatchResponseToCallback (Main.js:1416) _dispatchResponse (Main.js:1408) dispatch (Main.js:1396) dispatchMessageFromTarget (Main.js:31689) dispatchMessageFromTarget (Main.js:2021) _dispatchEvent (Main.js:1430:159) dispatch (Main.js:1397) dispatch (Main.js:1301) (anonymous function) (Main.js:1496) [Error] TypeError: undefined is not an object (evaluating 'this.resource.sourceMaps') (anonymous function) (Main.js:32813) _dispatchEvent (Main.js:1431) dispatch (Main.js:1397) dispatchMessageFromTarget (Main.js:31689) dispatchMessageFromTarget (Main.js:2021) _dispatchEvent (Main.js:1430:159) dispatch (Main.js:1397) dispatch (Main.js:1301) (anonymous function) (Main.js:1496) [Error] TypeError: undefined is not an object (evaluating 'this.contentBrowser.currentContentView') (anonymous function) (Main.js:26169)
Attachments
Screenshot of Sources tab (226.55 KB, image/png)
2025-06-17 12:24 PDT, Jeff Johnson
no flags
Screenshot of errors in web inspector (226.55 KB, image/png)
2025-06-17 12:24 PDT, Jeff Johnson
no flags
Screenshot of Sources tab (252.29 KB, image/png)
2025-06-17 16:19 PDT, Jeff Johnson
no flags
Screenshot of web inspector debugger (514.33 KB, image/png)
2025-06-17 18:45 PDT, Jeff Johnson
no flags
Jeff Johnson
Comment 1 2025-06-17 12:24:52 PDT
Created attachment 475590 [details] Screenshot of errors in web inspector
Radar WebKit Bug Importer
Comment 2 2025-06-17 12:46:07 PDT
Qianlang Chen
Comment 3 2025-06-17 16:07:28 PDT
Hello Jeff! Can you re-upload a screenshot for the Sources tab? The two screenshots you attached seem to have the same contents. Also, can you elaborate on what the bug is exactly?
Jeff Johnson
Comment 4 2025-06-17 16:19:20 PDT
Created attachment 475591 [details] Screenshot of Sources tab
Jeff Johnson
Comment 5 2025-06-17 16:21:27 PDT
(In reply to Qianlang Chen from comment #3) > Hello Jeff! Can you re-upload a screenshot for the Sources tab? The two > screenshots you attached seem to have the same contents. > > Also, can you elaborate on what the bug is exactly? Sorry! I've added a new attachment. As you can see, the Sources area is completely blank, its left and right sidebar are collapsed, and the right sidebar of the Elements tab is still displayed (incorrectly). So the bug is that there's an error in loading the Sources tab which causes the tab to fail to load. When that happens, it's completely nonfunctional.
Qianlang Chen
Comment 6 2025-06-17 16:29:04 PDT
Thank you for the new screenshot and the info. What's the URL of the website, and where did you set the breakpoint? What are the steps that you took to see the bug happen in STP but not Safari, despite the steps not able to reproduce the bug every time?
Jeff Johnson
Comment 7 2025-06-17 18:25:47 PDT
It happens on every YouTube video page, for example. I can't seem to get the bug to occur unless my Safari extension is enabled, but I don't know why. Maybe that's related? Extensions shouldn't be able to break the Sources tab though. Anyway, that's one reason why giving reproduction steps is a problem. I was hoping that you could look at the console errors and figure out the cause without exact reproduction steps.
Jeff Johnson
Comment 8 2025-06-17 18:45:12 PDT
Created attachment 475596 [details] Screenshot of web inspector debugger If it helps, attached is a screenshot of the error caught while the web inspector was being debugged.
Qianlang Chen
Comment 9 2025-06-18 09:56:07 PDT
Thank you for the additional info, Jeff. > I can't seem to get the bug to occur unless my Safari extension is enabled, but I don't know why. Maybe that's related? Extensions shouldn't be able to break the Sources tab though. What happens if you try on your native Safari 18.5 with that extension enabled?
Jeff Johnson
Comment 10 2025-06-18 11:52:10 PDT
The issue never occurs with Safari 18.5, whereas it occurs frequently with Safari Technology Preview 221. I think it may have something to do with the extension adding <script> elements to the page. But I'm having trouble narrowing it down and coming up with 100% reproducible steps even with my configuration.
Qianlang Chen
Comment 11 2025-06-18 14:31:25 PDT
Is it convenient for you to share the extension?
Jeff Johnson
Comment 12 2025-06-18 15:29:41 PDT
(In reply to Qianlang Chen from comment #11) > Is it convenient for you to share the extension? StopTheMadness Pro: https://apps.apple.com/app/stopthemadness-pro/id6471380298
Qianlang Chen
Comment 13 2025-06-18 15:43:35 PDT
EWS
Comment 14 2025-06-19 10:05:07 PDT
Committed 296422@main (a80cf05ba528): <https://commits.webkit.org/296422@main> Reviewed commits have been landed. Closing PR #46931 and removing active labels.
Razvan Caliman
Comment 15 2025-06-25 09:15:50 PDT
*** Bug 294975 has been marked as a duplicate of this bug. ***
Razvan Caliman
Comment 16 2025-06-25 09:24:46 PDT
The issue was a regression in how Web Inspector handles source maps. Hitting a breakpoint is not the cause. It's related only because it would switch to the Sources tab which had an unhandled exception when a script had associated source maps. The temporary workaround is to disable source maps in Web Inspector Settings > Sources > Enable Source Maps
Note You need to log in before you can comment on or make changes to this bug.