Skip to content

ios-deploy: Unable to locate DeviceSupport directory #4326

Closed

Description

@drewwarren

Steps to Reproduce

I was attempting to flutter run with xcode 7.2.something and I would see

Starting debug of iPhone 5s (GSM) 'drewwarren’s iPhone' (4127c6ffa53f153512916da5fe2a3afac8d23798) connected through USB...
2016-06-02 11:17:59.787 ios-deploy[4022:2958268] [ !! ] Unable to locate DeviceSupport directory. This probably means you don't have Xcode installed, you will need to launch the app manually and logging output will not be shown!
Could not install ios/.generated/build/Release-iphoneos/Runner.app on 4127c6ffa53f153512916da5fe2a3afac8d23798.
Error running application on drewwarren’s iPhone.

This says I might not have Xcode installed, but I did. flutter doctor made everything look okay for Xcode.

When I was in this state if I attempted to open FlutterApplication.xcodeproj in Xcode and click the play button I would see Could not find Developer Disk Image.

Activity

  1. self-assigned this
    on Jun 2, 2016
  2. modified the milestone: on Aug 1, 2016
  3. removed their assignment
    on Sep 9, 2016
  4. modified the milestones: , on Jan 30, 2017
  5. added
    platform-macos
    tool
    on Jan 30, 2017
  6. smrtsmrf commented on Jun 9, 2017

    @smrtsmrf

    I get the same issue, but I'm using the latest version of XCode. When I try to run it in XCode, I get a white screen on my device and this in XCode. Weird thing is that it was working the other day.
    screen shot 2017-06-09 at 4 35 29 pm

  7. cbracken commented on Jun 13, 2017

    @cbracken
    Member

    @smrtsmrf can you check whether you're using Xcode 8.3.3? If so, it appears Xcode has changed the format it uses for the iOS DeviceSupport directory which is causing ios-deploy (one of our dependencies for launching iOS apps on devices) to get confused.

    Upstream ios-deploy issue is: ios-control/ios-deploy#292

    We can see what's in the iOS device support dir via:

    ls "$(xcrun --sdk iphoneos --show-sdk-platform-path)/DeviceSupport"
    

    With Xcode 8.3.3, I see:

    drwxrwxr-x   4 cbracken  eng  136  2 Feb 07:27 10.0/
    drwxrwxr-x   4 cbracken  eng  136  2 Feb 07:29 10.1/
    drwxrwxr-x   4 cbracken  eng  136  2 Feb 07:26 10.2/
    drwxrwxr-x   4 cbracken  eng  136 26 Apr 19:26 10.3.1 (14E8301)/
    drwxrwxr-x   4 cbracken  eng  136  2 Feb 07:26 8.0/
    drwxrwxr-x   4 cbracken  eng  136  2 Feb 07:28 8.1/
    drwxrwxr-x   4 cbracken  eng  136 10 May 22:21 8.2/
    drwxrwxr-x   4 cbracken  eng  136  2 Feb 07:27 8.3/
    drwxrwxr-x   4 cbracken  eng  136  2 Feb 07:28 8.4/
    drwxrwxr-x   4 cbracken  eng  136  2 Feb 07:27 9.0/
    drwxrwxr-x   4 cbracken  eng  136  2 Feb 07:26 9.1/
    drwxrwxr-x   4 cbracken  eng  136  2 Feb 07:28 9.2/
    drwxrwxr-x   4 cbracken  eng  136  2 Feb 07:28 9.3/
    

    Looks like a quick hacky fix is:

    cd "$(xcrun --sdk iphoneos --show-sdk-platform-path)/DeviceSupport"
    ln -s 10.3.1\ \(14E8301\) 10.3
    

    If you installed Xcode via the App Store (in which case, these files will all be owned by root), you may get a permission denied error and may need to run ln as root:

    sudo ln -s 10.3.1\ \(14E8301\) 10.3
    
  8. changed the title [-]Error message misleading when xcode needs updating[/-] [+]ios-deploy: Unable to locate DeviceSupport directory[/+] on Jun 13, 2017
  9. smrtsmrf commented on Jun 13, 2017

    @smrtsmrf

    @cbracken thanks, that did the trick. 👍

  10. cbracken commented on Jun 13, 2017

    @cbracken
    Member

    Thanks for confirming! Will keep this issue open for reference until a fix goes into ios-deploy.

  11. added
    platform-ios
    on Jun 13, 2017
  12. davorpeic commented on Aug 2, 2017

    @davorpeic

    Thanks @cbracken your solution fixed my 10.3.3 even I added particular subversion. There is more talk about this on ios-deploy repo ios-control/ios-deploy#292

    dp

  13. sethladd commented on Sep 3, 2017

    @sethladd
    Contributor

    We might want to bump up the priority of this fix. The workaround has 12 thumbs up, and the workaround is still required. Maybe our tool can just make the symlink? Or, print out a link to this bug?

  14. cbracken commented on Sep 4, 2017

    @cbracken
    Member

    @sethladd We can't autogen the symlink since it requires root privileges but we can definitely output the one-line command to do it. I'll land a doctor check (and run it at build time as well) that outputs this.

  15. cbracken commented on Sep 6, 2017

    @cbracken
    Member

    ios-deploy 1.9.2 was released today and includes a fix for this issue. I've added a doctor check to bump to that version.

  16. blackdynamo commented on Oct 30, 2017

    @blackdynamo

    I am still having this issue in 1.9.2 with Xcode 9.0.1. My device is running 11.0.3 (15A432).

    I have also tried using the solution to add the symlinks but doesn't seem to work for me. Create a symlink for 11.0.3 (15A432) -> 11.0 (15A372)

    ------ Debug phase ------
    Starting debug of 38813d6fae7464bb3f099582ea78ce53955e8632 (N66mAP, iPhone 6s Plus, iphoneos, arm64) a.k.a. 'iPhone' connected through USB...
    [  0%] Looking up developer disk image
    [ 95%] Developer disk image mounted successfully
    2017-10-30 16:25:46.621 ios-deploy[44705:5930783] [ !! ] Unable to locate DeviceSupport directory with suffix 'Symbols'. This probably means you don't have Xcode installed, you will need to launch the app manually and logging output will not be shown!
    
    /Applications/Xcode.app/Contents/Developer/platforms/iPhoneOS.platform/DeviceSupport$ ls -la
    total 0
    drwxrwxr-x  17 root  wheel  544 30 Oct 16:30 .
    drwxr-xr-x  10 root  wheel  320 10 Oct 15:23 ..
    drwxrwxr-x   4 root  wheel  128 28 Jul 16:14 10.0
    drwxrwxr-x   4 root  wheel  128 28 Jul 16:15 10.1
    drwxrwxr-x   4 root  wheel  128 28 Jul 16:12 10.2
    drwxrwxr-x   4 root  wheel  128 28 Jul 16:13 10.3
    drwxrwxr-x   5 root  wheel  160 30 Oct 16:13 11.0 (15A372)
    lrwxr-xr-x   1 root  wheel   13 30 Oct 16:30 11.0.3 (15A432) -> 11.0 (15A372)
    drwxrwxr-x   4 root  wheel  128 28 Jul 16:12 8.0
    drwxrwxr-x   4 root  wheel  128 28 Jul 16:12 8.1
    drwxrwxr-x   4 root  wheel  128 10 Oct 15:55 8.2
    drwxrwxr-x   4 root  wheel  128 28 Jul 16:13 8.3
    drwxrwxr-x   4 root  wheel  128 28 Jul 16:14 8.4
    drwxrwxr-x   4 root  wheel  128 28 Jul 16:12 9.0
    drwxrwxr-x   4 root  wheel  128 28 Jul 16:12 9.1
    drwxrwxr-x   4 root  wheel  128 28 Jul 16:13 9.2
    drwxrwxr-x   4 root  wheel  128 28 Jul 16:14 9.3
    
  17. blackdynamo commented on Nov 2, 2017

    @blackdynamo

    Just as a follow up, if you are having this issue, the files are probably missing from this path:

    ~/Library/Developer/Xcode/iOS\ DeviceSupport/
    

    If that is the case, which fixed things for me, make sure your phone is attached to your mac and open xcode. The files will automatically appear and things should work.

  18. sam-parks commented on Feb 14, 2020

    @sam-parks

    I'm using XCode 11.3.1 and I'm still getting this issue. I checked this path:

    /Library/Developer/Xcode/iOS\ DeviceSupport/
    

    But the files were there. What else could be causing this issue?

  19. nwainwri commented on Apr 28, 2020

    @nwainwri

    I'm using XCode 11.3.1 and I'm still getting this issue. I checked this path:

    /Library/Developer/Xcode/iOS\ DeviceSupport/
    

    But the files were there. What else could be causing this issue?

    Same XCode, also having the same issue. Files are also there.

    How does one fix this issue?

  20. vHanda commented on Oct 16, 2020

    @vHanda

    I

    I'm using XCode 11.3.1 and I'm still getting this issue. I checked this path:

    /Library/Developer/Xcode/iOS\ DeviceSupport/
    

    But the files were there. What else could be causing this issue?

    Same XCode, also having the same issue. Files are also there.

    How does one fix this issue?

    I encountered the same issue and managed to fix it by updating to the latest version of ios-deploy - https://github.com/ios-control/ios-deploy

  21. github-actions commented on Aug 11, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  22. locked as resolved and limited conversation to collaborators on Aug 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform-iosplatform-macostool

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions