Bug 126599 - Web Inspector: AngularJS + SocketIO + Web Inspector = Locked Webpage
Summary: Web Inspector: AngularJS + SocketIO + Web Inspector = Locked Webpage
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.9
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-01-07 14:14 PST by Chris Moyer
Modified: 2014-03-24 09:07 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Moyer 2014-01-07 14:14:40 PST
I have an AngularJS  application that creates several Socket.IO Connections back to a server, and as soon as I open the web inspector, the page freezes up, including the console, and becomes unresponsive. At this point I can't even close the tab, and have to force-close Webkit (the same happens with Safari, but I can close the tab there).
Comment 1 Radar WebKit Bug Importer 2014-01-07 14:15:51 PST
<rdar://problem/15766290>
Comment 2 Joseph Pecoraro 2014-01-07 16:03:44 PST
Chris, do you have a sample page or URL we can inspect to reproduce the issue?
Comment 3 Chris Moyer 2014-01-08 10:26:18 PST
I've gathered a few more details on the issue, and it's not quite what I thought before. I have disabled web sockets, and make Socket.IO use one of the other transports. I also noticed this ONLY happens over SSL.

I've created a simple project to show the problem: https://github.com/kopertop/wkcrasher

You don't even need to have it connect to socket.io on the backend, so I'm not sure if that is exactly the problem, but I know when I try to inspect this over SSL, the app (and inspector) completely hang up.
Comment 4 Timothy Hatcher 2014-01-08 11:37:11 PST
Thanks for creating a test case for us!
Comment 5 Chris Moyer 2014-01-08 11:42:07 PST
Digging a little further, if I comment out line 27 of js/services.js, the app works just fine, no crashes with the console opening up.

So it looks like this only happens when I explicitly set the "transports" of socket.io:

         sockets[namespace] = io.connect(namespace, {
            transports: transports, // This line causes the problem
            'connect timeout': 500,
            'reconnect': true,
            'reconnection delay': 500,
            'reopen delay': 500,
            'max reconnection attempts': 10
         });
Comment 6 Timothy Hatcher 2014-03-21 16:53:55 PDT
Can you try your site in a recently nightly?
Comment 7 Chris Moyer 2014-03-24 09:07:24 PDT
This appears to have fixed the problem. Thanks!