Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Could not connect to lockdownd" while attempting to run flutter app

Tags:

flutter

I am following the Get Started tutorial.

I can install everything, flutter doctor returns all checkmarks but in the end there is a message:

idevice_id returned an error:
ERROR: Could not connect to lockdownd, error code -2

Same message appears if I try to run the app using flutter run or if I try to list the devices using flutter devices.

The tutorial also states that:

Note: If the Run & Debug buttons are disabled, and no targets are listed, Flutter has not been able to discover any connected iOS or Android devices or simulators. You need to connect a device, or start a simulator, to proceed

I have two devices listed my Android phone and an iPhone simulator. Run and Debug buttons are ENABLED!

How can I run my app using flutter? It can be either using the command line or IntelliJ IDE.

like image 360
GabrielOshiro Avatar asked Nov 17 '17 00:11

GabrielOshiro


1 Answers

Disconnect all iOS devices, then:

brew uninstall ideviceinstaller
brew uninstall libimobiledevice
brew install --HEAD libimobiledevice
brew link --overwrite libimobiledevice
brew install --HEAD  ideviceinstaller
brew link --overwrite ideviceinstaller
sudo rm -rf /var/db/lockdown/*

Connect an iOS device, and choose "Trust" when prompted, after that:

sudo chmod -R 777 /var/db/lockdown/
like image 146
kubano Avatar answered Nov 15 '22 06:11

kubano