Friday, March 13, 2009

Running Wireshark on MAC OSX




If I have to open Wireshark at all, I know I'm in trouble. Its a fantastic tool, but as a web developer, I default to Firebug. I've only ever really needed Wireshark for debugging IE network issues.

I've been taking a look at Adobe AIR recently which has a very similar Firebug like console called AIRIntrospector. However, when attempting to execute Jsonp requests in Adobe AIR, my timeout callbacks were being invoked and the requests weren't showing up in the "XHR" tab in AIRIntrospector. This was despite the fact that I could see the apache logs filling up with requests on the API server I was trying to hit.

So, I tried firing up Wireshark to listen and inspect the response from the API server only to be greeted with:


The capture session could not be initiated ((no devices found) /dev/bpf0: Permission denied).


After a few quick Googles, I found this helpful post. Apparently, you need to start Wireshark as root. So,


$cd /Applications/Wireshark.app/Contents/MacOS
$sudo ./Wireshark


After that quick sudo, I could listen for API responses without needing to rely on the AIRIntrospector.

No comments:

Post a Comment