- Facebook authentication mobile safari crash
- jQuery mobile Facebook crash mobile safari
- Mobile safari crash switching windows
- mobile firebug
- Mobile safari ios crash logs
- Understanding ios crash logs
- ios crash webthread javascript
- juggernaut crash mobile safari
- socket.io mobile safari crash
After hours of debugging (you know you're getting desperate when you resort to binary-searching for the bug by systematically commenting out half your JavaScript...) and Googling, I found this comment on github which describes the symptoms perfectly.
I was experiencing it specifically with a connection spun up by Juggernaut, which is based on socket.io. The solution in my case was simple - just prior to making the FB.login() authentication call, I explicitly close Juggernaut's websocket and unsubscribe the client from my PubSub channels:
jug.io.socket.disconnect();
jug.unsubscribe("myChannel");
And then reconnect everything when I return from the Facebook auth call:
jug.io.socket.connect();
jug.subscribe("myChannel", callBackFn);
Works like a charm, though good god it was painful to identify.