flutter-intellij icon indicating copy to clipboard operation
flutter-intellij copied to clipboard

Unable to attach to custom embedders

Open Janrupf opened this issue 1 year ago • 1 comments

Issue

I have a custom embedder, which starts a Flutter development engine. I get the debug URL from the standard output, and running flutter attach --debug-uri=http://127.0.0.1:46517/6mOGj-pv_bU=/ -v successfully attaches to the process. Sadly the option to attach in IntelliJ is grayed out.

Steps to Reproduce

  1. Have a custom embedder running
  2. Attempt to attach to the custom embedder

Version info

[  +23 ms] Unable to locate an Android SDK.
[  +55 ms] Local engine source at /nix/store/85wqywgs5q16zl34pnfkyaf1w9hgrq14-flutter-engine-c9b9d5780da342eb3f0f5e439a7db06f7d112575
[ +127 ms] executing: [/nix/store/iqnsvd5gs7394zjbq7ll8ks7gzv8zbqz-flutter-wrapped-3.24.1-sdk-links/] git -c log.showSignature=false log -n 1 --pretty=format:%ar
[   +8 ms] Exit code 128 from: git -c log.showSignature=false log -n 1 --pretty=format:%ar
[        ] fatal: detected dubious ownership in repository at '/nix/store/iqnsvd5gs7394zjbq7ll8ks7gzv8zbqz-flutter-wrapped-3.24.1-sdk-links'
           To add an exception for this directory, call:

                git config --global --add safe.directory /nix/store/iqnsvd5gs7394zjbq7ll8ks7gzv8zbqz-flutter-wrapped-3.24.1-sdk-links
[ +177 ms] executing: ping -c 1 -w 1 127.0.0.1
[        ] executing: ping -c 1 -w 1 127.0.0.1
[  +21 ms] [✓] Flutter (Channel stable, 3.24.1, on NixOS 24.11 (Vicuna) 6.6.52, locale en_US.UTF-8)
[        ]     • Flutter version 3.24.1 on channel stable at /nix/store/iqnsvd5gs7394zjbq7ll8ks7gzv8zbqz-flutter-wrapped-3.24.1-sdk-links
[        ]     • Upstream repository https://github.com/flutter/flutter.git
[        ]     • Framework revision nixpkgs000 (), 1970-01-01 00:00:00
[        ]     • Engine revision c9b9d5780d
[        ]     • Dart version 3.5.1
[        ]     • DevTools version 2.37.0
[   +5 ms] [✗] Android toolchain - develop for Android devices
[        ]     ✗ Unable to locate Android SDK.
[        ]       Install Android Studio from: https://developer.android.com/studio/index.html
[        ]       On first launch it will assist you in installing the Android SDK components.
[        ]       (or visit https://flutter.dev/to/linux-android-setup for detailed instructions).
[        ]       If the Android SDK has been installed to a custom location, please use
[        ]       `flutter config --android-sdk` to update to that location.
[   +2 ms] [✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
[        ]     ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
[  +34 ms] PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
           64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.049 ms

           --- 127.0.0.1 ping statistics ---
           1 packets transmitted, 1 received, 0% packet loss, time 0ms
           rtt min/avg/max/mdev = 0.049/0.049/0.049/0.000 ms
[  +65 ms] [✗] Linux toolchain - develop for Linux desktop
[        ]     ✗ clang++ is required for Linux development.
[        ]       It is likely available from your distribution (e.g.: apt install clang), or can be downloaded from https://releases.llvm.org/
[        ]     ✗ CMake is required for Linux development.
[        ]       It is likely available from your distribution (e.g.: apt install cmake), or can be downloaded from https://cmake.org/download/
[        ]     ✗ ninja is required for Linux development.
[        ]       It is likely available from your distribution (e.g.: apt install ninja-build), or can be downloaded from https://github.com/ninja-build/ninja/releases
[        ]     • pkg-config version 0.29.2
[        ]     ✗ GTK 3.0 development libraries are required for Linux development.
[        ]       They are likely available from your distribution (e.g.: apt install libgtk-3-dev)
[   +1 ms] [!] Android Studio (not installed)
[        ]     • Android Studio not found; download from https://developer.android.com/studio/index.html
[        ]       (or visit https://flutter.dev/to/linux-android-setup for detailed instructions).
[   +2 ms] [✓] IntelliJ IDEA Ultimate Edition (version 2024.2)
[        ]     • IntelliJ at /persistent/home/janrupf/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate
[        ]     • Flutter plugin version 81.1.3
[        ]     • Dart plugin can be installed from:
[        ]       🔨 https://plugins.jetbrains.com/plugin/6351-dart
[   +2 ms] [✓] Connected device (2 available)
[        ]     • Linux (desktop)                • linux • linux-x64   • NixOS 24.11 (Vicuna) 6.6.52
[        ]     • Rust Flutter Embedder (mobile) • rfe   • linux-arm64 • Rust
[ +314 ms] [✓] Network resources
[        ]     • All expected network resources are available.
[        ] ! Doctor found issues in 4 categories.
[  +10 ms] "flutter doctor" took 764ms.
[  +68 ms] ensureAnalyticsSent: 58ms
[        ] Running 1 shutdown hook
[   +1 ms] Shutdown hooks complete
[  +11 ms] exiting with code 0

(Please note: I'm aware of all the issues from above, however, they do not impact the ability to run the custom embedder!)

Janrupf avatar Sep 24 '24 23:09 Janrupf

Could you attach screenshots with the button group and your selected run configuration?

AlexV525 avatar Mar 02 '25 12:03 AlexV525

Without additional information we're not able to resolve this issue, so it will be closed at this time. You're still free to add more info and respond to any questions above, though. We'll reopen the case if you do. Thanks for your contribution!

github-actions[bot] avatar Sep 18 '25 00:09 github-actions[bot]