Skip to content

flutter run fails Xcode 12: fruitstrap_.py, in connect_command process = lldb.target.ConnectRemote(listener, connect_url, None, error) AttributeError: 'NoneType' object has no attribute 'ConnectRemote' #60072

Closed

Description

@Seaony

iOS: 14.0 beta

Flutter:

Flutter 1.17.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 1ad9baa8b9 (5 days ago) • 2020-06-17 14:41:16 -0700
Engine • revision ee76268252
Tools • Dart 2.8.4

I try to run 'shuttle run' and the result is

Launching lib/main.dart on Seaony 的iPhone in debug mode...
 
Automatically signing iOS for device deployment using specified development team in Xcode project: ZSLQ5LJNGF
Running Xcode build...                                                  
                                                   
 └─Compiling, linking and signing...                        12.1s
Xcode build done.                                           25.5s
Traceback (most recent call last):                                      
  File "/tmp/D3B5FF15-60C6-4F10-8BC8-18F8236B8048/fruitstrap_00008030_001E31660A82802E.py", line 25, in connect_command
    process = lldb.target.ConnectRemote(listener, connect_url, None, error)
AttributeError: 'NoneType' object has no attribute 'ConnectRemote'      
Traceback (most recent call last):                                      
  File "/tmp/D3B5FF15-60C6-4F10-8BC8-18F8236B8048/fruitstrap_00008030_001E31660A82802E.py", line 45, in run_command
    lldb.target.modules[0].SetPlatformFileSpec(lldb.SBFileSpec(device_app))
AttributeError: 'NoneType' object has no attribute 'modules'            
Traceback (most recent call last):                                      
  File "/tmp/D3B5FF15-60C6-4F10-8BC8-18F8236B8048/fruitstrap_00008030_001E31660A82802E.py", line 74, in safequit_command
    process = lldb.target.process                                       
AttributeError: 'NoneType' object has no attribute 'process'            
Installing and launching...                                            ⣷

Activity

  1. Seaony commented on Jun 23, 2020

    @Seaony
    Author

    It is worth mentioning that I am running on the real machine,Xcode has also been upgraded to the latest version

  2. Seaony commented on Jun 23, 2020

    @Seaony
    Author

    flutter doctor -v result:

    [✓] Flutter (Channel stable, v1.17.4, on macOS 10.16 20A4299v, locale zh-Hans-CN)
        • Flutter version 1.17.4 at /Users/seaony/flutter
        • Framework revision 1ad9baa8b9 (5 days ago), 2020-06-17 14:41:16 -0700
        • Engine revision ee76268252
        • Dart version 2.8.4
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
        • Android SDK at /Users/seaony/Library/Android/sdk
        • Platform android-29, build-tools 29.0.3
        • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
        • All Android licenses accepted.
    
    [✓] Xcode - develop for iOS and macOS (Xcode 12.0)
        • Xcode at /Applications/Xcode-beta.app/Contents/Developer
        • Xcode 12.0, Build version 12A6159
        • CocoaPods version 1.9.3
    
    [✓] Android Studio (version 4.0)
        • Android Studio at /Applications/Android Studio.app/Contents
        • Flutter plugin version 46.0.2
        • Dart plugin version 193.7361
        • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
    
    [!] IntelliJ IDEA Ultimate Edition (version 2020.1.1)
        • IntelliJ at /Applications/IntelliJ IDEA.app
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
        • For information about installing plugins, see
          https://flutter.dev/intellij-setup/#installing-the-plugins
    
    [!] VS Code (version 1.44.2)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        ✗ Flutter extension not installed; install from
          https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
    
    [✓] Connected device (2 available)
        • Seaony 的iPhone             • 00008030-001E31660A82802E            • ios • iOS 14.0
        • iPhone SE (2nd generation) • 7FF9EC86-68FD-4DD6-BADF-335439BB426E • ios • com.apple.CoreSimulator.SimRuntime.iOS-14-0 (simulator)
    
    ! Doctor found issues in 2 categories.
  3. Seaony commented on Jun 23, 2020

    @Seaony
    Author

    it can work normally on the simulator

  4. jagandeepbrar commented on Jun 23, 2020

    @jagandeepbrar
  5. tomalabaster commented on Jun 23, 2020

    @tomalabaster
  6. edeuss commented on Jun 23, 2020

    @edeuss
  7. razvangeangu commented on Jun 23, 2020

    @razvangeangu
  8. added
    t: xcode"xcodebuild" on iOS and general Xcode project management
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Jun 23, 2020
  9. changed the title [-]flutter run failed on macOS Big Sur[/-] [+]flutter run fails on macOS Big Sur: fruitstrap_.py", in connect_command process = lldb.target.ConnectRemote(listener, connect_url, None, error) AttributeError: 'NoneType' object has no attribute 'ConnectRemote'[/+] on Jun 23, 2020
  10. changed the title [-]flutter run fails on macOS Big Sur: fruitstrap_.py", in connect_command process = lldb.target.ConnectRemote(listener, connect_url, None, error) AttributeError: 'NoneType' object has no attribute 'ConnectRemote'[/-] [+]flutter run fails Xcode 12: fruitstrap_.py", in connect_command process = lldb.target.ConnectRemote(listener, connect_url, None, error) AttributeError: 'NoneType' object has no attribute 'ConnectRemote'[/+] on Jun 23, 2020
  11. jmagman commented on Jun 23, 2020

    @jmagman
    Member

    Reproduces with Xcode 12 beta 1 on Catalina. You can add a +1 to the original description if you're seeing this instead of adding "me too" comments.

    $ xcrun lldb --version                                                                                                         
    lldb-1200.0.18.8
    Apple Swift version 5.3 (swiftlang-1200.0.16.9 clang-1200.0.22.5)
    $ xcrun python --version
    Python 2.7.16
    

    https://github.com/ios-control/ios-deploy/blob/2306cc4a42e88ed0ceb906855c36b450d8a58400/src/scripts/lldb.py#L25

  12. added
    P1High-priority issues at the top of the work list
    on Jun 23, 2020
  13. changed the title [-]flutter run fails Xcode 12: fruitstrap_.py", in connect_command process = lldb.target.ConnectRemote(listener, connect_url, None, error) AttributeError: 'NoneType' object has no attribute 'ConnectRemote'[/-] [+]flutter run fails Xcode 12: fruitstrap_.py, in connect_command process = lldb.target.ConnectRemote(listener, connect_url, None, error) AttributeError: 'NoneType' object has no attribute 'ConnectRemote'[/+] on Jun 23, 2020
  14. jmagman commented on Jun 23, 2020

    @jmagman
    Member

    Workaround is to flutter run to a simulator, or open ios/Runner.xcworkspace in Xcode and deploy to a real iOS device from there.

  15. 22 remaining items

  16. gabebear commented on Sep 18, 2020

    @gabebear

    You need the ios-deploy 1.11.2 for the released version of iOS14. https://github.com/ios-control/ios-deploy/releases/tag/1.11.2

    Earlier betas of iOS14+Xcode12 worked with ios-deploy 1.11.0, but won't work with the final/GM versions.

  17. zhang52104 commented on Sep 22, 2020

    @zhang52104

    After upgrade the ios - deploy the latest version, the file "/ usr/local/lib/node_modules/ios - deploy/build/Release/ios - deploy" replace "/ flutter/bin/cache/artifacts/ios - deploy"

  18. fsresponser commented on Sep 28, 2020

    @fsresponser

    flutter upgrade(1.20.3 - 1.20.4), then flutter clean and build works for me.

  19. jfk23 commented on Sep 30, 2020

    @jfk23

    flutter upgrade(1.20.3 - 1.20.4), then flutter clean and build works for me.

    Thanks! works for me.

  20. DhavalRKansara commented on Oct 5, 2020

    @DhavalRKansara

    I have upgraded the ios-deploy version still getting below error.

    Traceback (most recent call last):
      File "/tmp/76F3C24C-B608-4FE4-8725-C06FCD1E5269/fruitstrap_a8aaa158c9abce75fda523321c5535537c3eb9c2.py", line 25, in connect_command
        process = lldb.target.ConnectRemote(listener, connect_url, None, error)
    AttributeError: 'NoneType' object has no attribute 'ConnectRemote'
    Traceback (most recent call last):
      File "/tmp/76F3C24C-B608-4FE4-8725-C06FCD1E5269/fruitstrap_a8aaa158c9abce75fda523321c5535537c3eb9c2.py", line 45, in run_command
        lldb.target.modules[0].SetPlatformFileSpec(lldb.SBFileSpec(device_app))
    AttributeError: 'NoneType' object has no attribute 'modules'
    Traceback (most recent call last):
      File "/tmp/76F3C24C-B608-4FE4-8725-C06FCD1E5269/fruitstrap_a8aaa158c9abce75fda523321c5535537c3eb9c2.py", line 74, in safequit_command
        process = lldb.target.process
    AttributeError: 'NoneType' object has no attribute 'process'
    
  21. gabebear commented on Oct 5, 2020

    @gabebear

    @DhavalRKansara You might do better opening a new bug. It appears you are using an old copy of ios-deploy since those lines were changed in https://github.com/ios-control/ios-deploy/pull/464/files

  22. shinriyo commented on Oct 7, 2020

    @shinriyo

    @DhavalRKansara What version?

  23. DhavalRKansara commented on Oct 7, 2020

    @DhavalRKansara

    @DhavalRKansara What version?

    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel unknown, v1.12.13+hotfix.9, on Mac OS X 10.15.7 19H2, locale en-US)
     
    [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    [✓] Xcode - develop for iOS and macOS (Xcode 12.0.1)
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 4.0)
    [!] IntelliJ IDEA Community Edition (version 2020.2.2)
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
    [✓] Connected device (3 available)
    
    ! Doctor found issues in 1 category.
    
  24. wafahas commented on Oct 10, 2020

    @wafahas

    Traceback (most recent call last):
    File "/tmp/967547A4-192A-470E-BF72-1D8EABDC15F6/fruitstrap_9c6086a86c2a023f819111004411193c63f5a11f.py", line 25, in connect_command
    process = lldb.target.ConnectRemote(listener, connect_url, None, error)
    AttributeError: 'NoneType' object has no attribute 'ConnectRemote'
    Traceback (most recent call last):
    File "/tmp/967547A4-192A-470E-BF72-1D8EABDC15F6/fruitstrap_9c6086a86c2a023f819111004411193c63f5a11f.py", line 45, in run_command
    lldb.target.modules[0].SetPlatformFileSpec(lldb.SBFileSpec(device_app))
    AttributeError: 'NoneType' object has no attribute 'modules'
    Traceback (most recent call last):
    File "/tmp/967547A4-192A-470E-BF72-1D8EABDC15F6/fruitstrap_9c6086a86c2a023f819111004411193c63f5a11f.py", line 74, in safequit_command
    process = lldb.target.process
    AttributeError: 'NoneType' object has no attribute 'process'

    i got this error what shall i do

  25. samariotorres commented on Oct 16, 2020

    @samariotorres

    if you have homebrew (you should)

    brew install --HEAD ios-deploy

    then flutter channel stable
    flutter upgrade
    flutter clean
    flutter run -d device

  26. wafahas commented on Oct 16, 2020

    @wafahas

    thanks samariotorres it works well now

  27. jmagman commented on Oct 16, 2020

    @jmagman
    Member

    You shouldn't need to run brew install --HEAD ios-deploy, it's distributed in Flutter.

  28. Dawnhan commented on Dec 24, 2020

    @Dawnhan

    I had the same problem,but I can't upgrade flutter ,how can I solve this problem?

  29. github-actions commented on Aug 8, 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.

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

Metadata

Metadata

Labels

P1High-priority issues at the top of the work listt: xcode"xcodebuild" on iOS and general Xcode project managementtoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions