“Could not connect to lockdownd” while attempting to run flutter app












4














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.










share|improve this question






















  • I don't know if people are still having this issue. But the way I solved it, it was by reseting my system and running all commands again and everything worked.
    – GabrielOshiro
    Oct 30 '18 at 15:20










  • See also stackoverflow.com/q/52846630
    – Arto Bendiken
    Nov 2 '18 at 6:59
















4














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.










share|improve this question






















  • I don't know if people are still having this issue. But the way I solved it, it was by reseting my system and running all commands again and everything worked.
    – GabrielOshiro
    Oct 30 '18 at 15:20










  • See also stackoverflow.com/q/52846630
    – Arto Bendiken
    Nov 2 '18 at 6:59














4












4








4


2





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.










share|improve this question













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.







flutter






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 17 '17 at 0:55









GabrielOshiro

5,24743143




5,24743143












  • I don't know if people are still having this issue. But the way I solved it, it was by reseting my system and running all commands again and everything worked.
    – GabrielOshiro
    Oct 30 '18 at 15:20










  • See also stackoverflow.com/q/52846630
    – Arto Bendiken
    Nov 2 '18 at 6:59


















  • I don't know if people are still having this issue. But the way I solved it, it was by reseting my system and running all commands again and everything worked.
    – GabrielOshiro
    Oct 30 '18 at 15:20










  • See also stackoverflow.com/q/52846630
    – Arto Bendiken
    Nov 2 '18 at 6:59
















I don't know if people are still having this issue. But the way I solved it, it was by reseting my system and running all commands again and everything worked.
– GabrielOshiro
Oct 30 '18 at 15:20




I don't know if people are still having this issue. But the way I solved it, it was by reseting my system and running all commands again and everything worked.
– GabrielOshiro
Oct 30 '18 at 15:20












See also stackoverflow.com/q/52846630
– Arto Bendiken
Nov 2 '18 at 6:59




See also stackoverflow.com/q/52846630
– Arto Bendiken
Nov 2 '18 at 6:59












3 Answers
3






active

oldest

votes


















2














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/





share|improve this answer





























    0














    I was having similar issues, and resolved them using the below. Hopefully this will help you. flutter doctor was telling me the answers, but they were a bit buried. Look for something like this:



    [-] iOS toolchain - develop for iOS devices (Xcode 8.3.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 8.3.3, Build version 8E3004b
    ✗ libimobiledevice and ideviceinstaller are not installed or require updating. To update, run:
    brew uninstall --ignore-dependencies libimobiledevice
    brew install --HEAD libimobiledevice
    brew install ideviceinstaller
    • ios-deploy 1.9.1
    ✗ ios-deploy out of date (1.9.2 is required). To upgrade:
    brew upgrade ios-deploy
    • CocoaPods version 1.2.0


    There are four brew commands in there to run. When I did them, this problem disappeared for me. Good luck!






    share|improve this answer





















    • As I stated in the question, I get all check marks from flutter doctor
      – GabrielOshiro
      Nov 20 '17 at 15:41










    • I did not know what you meant by "all checkmarks"
      – Tajh Taylor
      Nov 20 '17 at 19:04










    • no worries! Thanks for your answer!
      – GabrielOshiro
      Nov 20 '17 at 21:53



















    0














    This workaround worked for me when loosing the connection:




    • close everything (Visual Studio Code, Xcode, Simulator)

    • disconnect any physical device

    • Start Visual Studio Code

    • connect a physical IOS phone

    • Start XCode

    • build from XCode (it will work)

    • Disconnect your physical device

    • Start without debug

    • You will be prompted to connect to a device


    and from there it worked again!



    This just to help to debug the loos of connection bug. I have also observed that it begins just after the "stop debugging" command from Visual Studio Code.






    share|improve this answer























      Your Answer






      StackExchange.ifUsing("editor", function () {
      StackExchange.using("externalEditor", function () {
      StackExchange.using("snippets", function () {
      StackExchange.snippets.init();
      });
      });
      }, "code-snippets");

      StackExchange.ready(function() {
      var channelOptions = {
      tags: "".split(" "),
      id: "1"
      };
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function() {
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled) {
      StackExchange.using("snippets", function() {
      createEditor();
      });
      }
      else {
      createEditor();
      }
      });

      function createEditor() {
      StackExchange.prepareEditor({
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader: {
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      },
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      });


      }
      });














      draft saved

      draft discarded


















      StackExchange.ready(
      function () {
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47341623%2fcould-not-connect-to-lockdownd-while-attempting-to-run-flutter-app%23new-answer', 'question_page');
      }
      );

      Post as a guest















      Required, but never shown

























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      2














      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/





      share|improve this answer


























        2














        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/





        share|improve this answer
























          2












          2








          2






          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/





          share|improve this answer












          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/






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 8 '18 at 21:16









          kubano

          1315




          1315

























              0














              I was having similar issues, and resolved them using the below. Hopefully this will help you. flutter doctor was telling me the answers, but they were a bit buried. Look for something like this:



              [-] iOS toolchain - develop for iOS devices (Xcode 8.3.3)
              • Xcode at /Applications/Xcode.app/Contents/Developer
              • Xcode 8.3.3, Build version 8E3004b
              ✗ libimobiledevice and ideviceinstaller are not installed or require updating. To update, run:
              brew uninstall --ignore-dependencies libimobiledevice
              brew install --HEAD libimobiledevice
              brew install ideviceinstaller
              • ios-deploy 1.9.1
              ✗ ios-deploy out of date (1.9.2 is required). To upgrade:
              brew upgrade ios-deploy
              • CocoaPods version 1.2.0


              There are four brew commands in there to run. When I did them, this problem disappeared for me. Good luck!






              share|improve this answer





















              • As I stated in the question, I get all check marks from flutter doctor
                – GabrielOshiro
                Nov 20 '17 at 15:41










              • I did not know what you meant by "all checkmarks"
                – Tajh Taylor
                Nov 20 '17 at 19:04










              • no worries! Thanks for your answer!
                – GabrielOshiro
                Nov 20 '17 at 21:53
















              0














              I was having similar issues, and resolved them using the below. Hopefully this will help you. flutter doctor was telling me the answers, but they were a bit buried. Look for something like this:



              [-] iOS toolchain - develop for iOS devices (Xcode 8.3.3)
              • Xcode at /Applications/Xcode.app/Contents/Developer
              • Xcode 8.3.3, Build version 8E3004b
              ✗ libimobiledevice and ideviceinstaller are not installed or require updating. To update, run:
              brew uninstall --ignore-dependencies libimobiledevice
              brew install --HEAD libimobiledevice
              brew install ideviceinstaller
              • ios-deploy 1.9.1
              ✗ ios-deploy out of date (1.9.2 is required). To upgrade:
              brew upgrade ios-deploy
              • CocoaPods version 1.2.0


              There are four brew commands in there to run. When I did them, this problem disappeared for me. Good luck!






              share|improve this answer





















              • As I stated in the question, I get all check marks from flutter doctor
                – GabrielOshiro
                Nov 20 '17 at 15:41










              • I did not know what you meant by "all checkmarks"
                – Tajh Taylor
                Nov 20 '17 at 19:04










              • no worries! Thanks for your answer!
                – GabrielOshiro
                Nov 20 '17 at 21:53














              0












              0








              0






              I was having similar issues, and resolved them using the below. Hopefully this will help you. flutter doctor was telling me the answers, but they were a bit buried. Look for something like this:



              [-] iOS toolchain - develop for iOS devices (Xcode 8.3.3)
              • Xcode at /Applications/Xcode.app/Contents/Developer
              • Xcode 8.3.3, Build version 8E3004b
              ✗ libimobiledevice and ideviceinstaller are not installed or require updating. To update, run:
              brew uninstall --ignore-dependencies libimobiledevice
              brew install --HEAD libimobiledevice
              brew install ideviceinstaller
              • ios-deploy 1.9.1
              ✗ ios-deploy out of date (1.9.2 is required). To upgrade:
              brew upgrade ios-deploy
              • CocoaPods version 1.2.0


              There are four brew commands in there to run. When I did them, this problem disappeared for me. Good luck!






              share|improve this answer












              I was having similar issues, and resolved them using the below. Hopefully this will help you. flutter doctor was telling me the answers, but they were a bit buried. Look for something like this:



              [-] iOS toolchain - develop for iOS devices (Xcode 8.3.3)
              • Xcode at /Applications/Xcode.app/Contents/Developer
              • Xcode 8.3.3, Build version 8E3004b
              ✗ libimobiledevice and ideviceinstaller are not installed or require updating. To update, run:
              brew uninstall --ignore-dependencies libimobiledevice
              brew install --HEAD libimobiledevice
              brew install ideviceinstaller
              • ios-deploy 1.9.1
              ✗ ios-deploy out of date (1.9.2 is required). To upgrade:
              brew upgrade ios-deploy
              • CocoaPods version 1.2.0


              There are four brew commands in there to run. When I did them, this problem disappeared for me. Good luck!







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Nov 18 '17 at 23:15









              Tajh Taylor

              1014




              1014












              • As I stated in the question, I get all check marks from flutter doctor
                – GabrielOshiro
                Nov 20 '17 at 15:41










              • I did not know what you meant by "all checkmarks"
                – Tajh Taylor
                Nov 20 '17 at 19:04










              • no worries! Thanks for your answer!
                – GabrielOshiro
                Nov 20 '17 at 21:53


















              • As I stated in the question, I get all check marks from flutter doctor
                – GabrielOshiro
                Nov 20 '17 at 15:41










              • I did not know what you meant by "all checkmarks"
                – Tajh Taylor
                Nov 20 '17 at 19:04










              • no worries! Thanks for your answer!
                – GabrielOshiro
                Nov 20 '17 at 21:53
















              As I stated in the question, I get all check marks from flutter doctor
              – GabrielOshiro
              Nov 20 '17 at 15:41




              As I stated in the question, I get all check marks from flutter doctor
              – GabrielOshiro
              Nov 20 '17 at 15:41












              I did not know what you meant by "all checkmarks"
              – Tajh Taylor
              Nov 20 '17 at 19:04




              I did not know what you meant by "all checkmarks"
              – Tajh Taylor
              Nov 20 '17 at 19:04












              no worries! Thanks for your answer!
              – GabrielOshiro
              Nov 20 '17 at 21:53




              no worries! Thanks for your answer!
              – GabrielOshiro
              Nov 20 '17 at 21:53











              0














              This workaround worked for me when loosing the connection:




              • close everything (Visual Studio Code, Xcode, Simulator)

              • disconnect any physical device

              • Start Visual Studio Code

              • connect a physical IOS phone

              • Start XCode

              • build from XCode (it will work)

              • Disconnect your physical device

              • Start without debug

              • You will be prompted to connect to a device


              and from there it worked again!



              This just to help to debug the loos of connection bug. I have also observed that it begins just after the "stop debugging" command from Visual Studio Code.






              share|improve this answer




























                0














                This workaround worked for me when loosing the connection:




                • close everything (Visual Studio Code, Xcode, Simulator)

                • disconnect any physical device

                • Start Visual Studio Code

                • connect a physical IOS phone

                • Start XCode

                • build from XCode (it will work)

                • Disconnect your physical device

                • Start without debug

                • You will be prompted to connect to a device


                and from there it worked again!



                This just to help to debug the loos of connection bug. I have also observed that it begins just after the "stop debugging" command from Visual Studio Code.






                share|improve this answer


























                  0












                  0








                  0






                  This workaround worked for me when loosing the connection:




                  • close everything (Visual Studio Code, Xcode, Simulator)

                  • disconnect any physical device

                  • Start Visual Studio Code

                  • connect a physical IOS phone

                  • Start XCode

                  • build from XCode (it will work)

                  • Disconnect your physical device

                  • Start without debug

                  • You will be prompted to connect to a device


                  and from there it worked again!



                  This just to help to debug the loos of connection bug. I have also observed that it begins just after the "stop debugging" command from Visual Studio Code.






                  share|improve this answer














                  This workaround worked for me when loosing the connection:




                  • close everything (Visual Studio Code, Xcode, Simulator)

                  • disconnect any physical device

                  • Start Visual Studio Code

                  • connect a physical IOS phone

                  • Start XCode

                  • build from XCode (it will work)

                  • Disconnect your physical device

                  • Start without debug

                  • You will be prompted to connect to a device


                  and from there it worked again!



                  This just to help to debug the loos of connection bug. I have also observed that it begins just after the "stop debugging" command from Visual Studio Code.







                  share|improve this answer














                  share|improve this answer



                  share|improve this answer








                  edited Nov 13 '18 at 6:55

























                  answered Nov 11 '18 at 6:10









                  Massimo Messina

                  11




                  11






























                      draft saved

                      draft discarded




















































                      Thanks for contributing an answer to Stack Overflow!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.





                      Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                      Please pay close attention to the following guidance:


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid



                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.


                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function () {
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f47341623%2fcould-not-connect-to-lockdownd-while-attempting-to-run-flutter-app%23new-answer', 'question_page');
                      }
                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      The Sandy Post

                      Danny Elfman

                      Pages that link to "Head v. Amoskeag Manufacturing Co."