Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using ios_webkit_debug_proxy on linux

I am trying to use the description from https://github.com/google/ios-webkit-debug-proxy to debug my website on iPhone (Running iOS 7.1.2).

I compiled ios_webkit_debug_proxy, and is running it with ios_webkit_debug_proxy -d

I then start google-chrome and point it to localhost:9222/ which shows my iPhone, and the website it is currently visiting. I then copy/paste the link address(chrome-devtools://devtools/bundled/devtools.html?host=localhost:9222&page=1) into a new chrome tab, and then I get a debug window which shows

Elements,Network,Sources,Timeline,Profiles,Resources,Audits,Console.

But none of theese buttons shows any real content. There is no dom. No javascript. No output in the console view. No activity in the network. Its like debugging a empty view.

My ios_webkit_debug_proxy -d console, shows a new message, each time my iPhone visits a new website. But it shows no other activity. THe messages start with something like

ss.remove_fd(7)
ss.recv fd=13 len=0
ss.remove_fd(13)
ss.recv fd=12 len=221
wi.recv[221]:

And they do just as far as I can see, contain the website url, but not any real content from the website.

The console I started chrome from, shows the message:

"Uncaught TypeError: Cannot read property 'frame' of undefined", source: chrome-devtools:/

I am using Fedora 20.

Does anyone have any clue why this does not work ? Thanks

like image 864
MTilsted Avatar asked Nov 12 '14 12:11

MTilsted


1 Answers

It isn't clear to me if you switch the browser to localhost:9222/ after you get a pair of lines like:

Listing devices on :9221
Connected :9222 to Will's iPhone (8a48ac86edd4f299xxxxxxxxxxxxxxx)

if you don't see the second line, then it means that probably you have issues with usbmuxd or libimobiledevice.

I've had some issues myself with the proxy, but then i was able to use it with satisfaction. In my experience, there are few things that make the life easier:

1) Run the usbmuxd as root and possibly with options -fv so that it doesn't detach from the tty and you see what happens. In my Debian installation it is run wit a system user in background;

2) In order to avoid the crash of the proxy when an unhandled exception happens don't use the debugger release of your chrome/chromium but instead use a pretty older one https://chrome-devtools-frontend.appspot.com/static/18.0.1025.99/devtools.html (see https://github.com/google/ios-webkit-debug-proxy/issues/63)

like image 196
Alberto Berti Avatar answered Oct 23 '22 11:10

Alberto Berti