ios-webkit-debug-proxy: (Linux) GnuTLS error: Error in the pull function. Could not connect to lockdownd. Exiting.: Broken pipe

Running Ubuntu 16.04. idevice_id -l returns ca77ad6... shown below, I’ve got a page open in a browser tab on the iPhone, and I’ve made sure to “trust” the computer via the phone.

$ ios_webkit_debug_proxy 
Listing devices on :9221
GnuTLS error: Error in the pull function.
Could not connect to lockdownd. Exiting.: Broken pipe
Unable to attach ca77ad6e59a6433a51995f0284c00786d24c2971 inspector

localhost:9221 does open a web page that read “iOS Devices:,” but nothing else.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 27

Most upvoted comments

ah shit, I guess you need to run sudo ldconfig

@artygus I used sudo! However I just did what you asked (ldconfig) and magic - works! Thank you!

@artygus @juliogc yep - got mine working too. rebuilding libimobiledevice locally and using libimobiledevice_idevice_connection branch seemed to do the trick 👍

@artygus I have to be honest that I’m almost a dummy user at this point and really don’t understand the reason that the author recommend this “custom” installation.

But now I fixed the problem installing some extra dependencies that I found in this post from askubuntu. I’ll leave bellow all the dependencies installed and all steps that took me at this point:

First I separated the packages in a directory to avoid extra problems

$ mkdir -p ~/projects/ios-debug
$ cd ~/projects/ios-debug

Then installed a bunch of dependencies as listed in askubuntu post mentioned above. Obs: Please tell me if there are some useless/unnecessary deps installed Obs2: I know there are some deps listed bellow that are already installed in OS, but I was desperate 😂 Obs3: I know that I could install all in one command, just put in this way to make easier to read

$ sudo apt install -y libusbmuxd-dev
$ sudo apt install -y libplist-dev
$ sudo apt install -y libplist++-dev
$ sudo apt install -y libgnutls-dev
$ sudo apt install -y libssl-dev
$ sudo apt install -y usbmuxd
$ sudo apt install -y make
$ sudo apt install -y automake
$ sudo apt install -y autoconf
$ sudo apt install -y libtool
$ sudo apt install -y pkg-config
$ sudo apt install -y gcc
$ sudo apt install -y libusb-dev
$ sudo apt install -y libusb-1.0-0-dev
$ sudo apt install -y libimobiledevice-dev

After this, I installed the libimobiledevice via github:

$ git clone https://github.com/libimobiledevice/libimobiledevice.git
$ cd libimobiledevice
$ ./autogen.sh
$ make
$ sudo make install
$ cd ../ # Back to the ~/projects/ios-debug dir

After I tried to install ios-webkit-debug-proxy from master branch and get the same error from here:

$ git clone https://github.com/google/ios-webkit-debug-proxy.git
$ cd ios-webkit-debug-proxy
$ ./autogen.sh
$ make 
/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -I../include   -I/usr/local/include -I/usr/include/libxml2 -I/usr/include/libxml2 -g -O2 -Wall -Werror -MT webinspector.lo -MD -MP -MF .deps/webinspector.Tpo -c -o webinspector.lo webinspector.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/local/include -I/usr/include/libxml2 -I/usr/include/libxml2 -g -O2 -Wall -Werror -MT webinspector.lo -MD -MP -MF .deps/webinspector.Tpo -c webinspector.c  -fPIC -DPIC -o .libs/webinspector.o
webinspector.c:57:11: error: conflicting types for ‘idevice_connection_get_fd’
 wi_status idevice_connection_get_fd(idevice_connection_t connection,
           ^
In file included from /usr/local/include/libimobiledevice/installation_proxy.h:33:0,
                 from webinspector.c:18:
/usr/local/include/libimobiledevice/libimobiledevice.h:250:17: note: previous declaration of ‘idevice_connection_get_fd’ was here
 idevice_error_t idevice_connection_get_fd(idevice_connection_t connection, int 
                 ^

So I moved to branch libimobiledevice_idevice_connection and now get success on running de debug proxy!

$ git checkout libimobiledevice_idevice_connection
$ ./autogen.sh
$ make
$ sudo make install

$ ios-webkit-debug-proxy
Listening devices on :9221
Connected :9222 to Julio's iPhone.......

I hope this could help and thank you so much for your help @artygus !

hi @adnan-wahab changes from this branch were merged into master, please check that you’re using latest libimobilidevice (1.2.1), if it doesn’t help you could try building libimobiledevice with gnutls instead of openssl

sudo apt install libgnutls-dev libgcrypt-dev
cd <libimobiledevice>
./configure --without-cython --disable-openssl

update libimobiledevice and rebuild ios-webkit-debug-proxy,and Then:

sudo chmod -R 777 /var/lib/lockdown/