Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter Device Daemon crashes after installing GIT 2.45.1 #148649

Closed
yesilcimenahmet opened this issue May 19, 2024 · 9 comments
Closed

Flutter Device Daemon crashes after installing GIT 2.45.1 #148649

yesilcimenahmet opened this issue May 19, 2024 · 9 comments
Labels
r: solved Issue is closed as solved

Comments

@yesilcimenahmet
Copy link

yesilcimenahmet commented May 19, 2024

Hi,

After upgrading the GIT version to 2.45.1 on my Windows 10 machine yesterday, the Device List in Android Studio always remained stuck on Loading... Initially, I couldn't figure out why this was happening. I tried dozens of different methods and eventually ended up completely reformatting my computer and upgrading to Windows 11. I installed everything necessary, and everything was working fine. Then I downloaded and installed the GIT version, and when I started Android Studio, I received the error "Flutter Daemon terminated with exit code -1". Similarly, the Device List section broke again. I completely uninstalled GIT, and the issue was resolved. When the issue occurred, the Flutter doctor output did not report any problems.

PS:To be sure, I uninstalled GIT, and after confirming the issue was resolved, I reinstalled GIT, and the same issue occurred again.

Android Studio Jellyfish | 2023.3.1
Build #AI-233.14808.21.2331.11709847, built on April 12, 2024
Runtime version: 17.0.10+0--11572160 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1024M
Cores: 8
Registry:
ide.experimental.ui=true
Non-Bundled Plugins:
Dart (233.15123)
io.flutter (79.0.2)

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.22.0, on Microsoft Windows [Version 10.0.22631.3593], locale tr-TR)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.9.7)
[√] Android Studio (version 2023.3)
[√] VS Code (version 1.89.1)
[√] Connected device (4 available)
[√] Network resources

• No issues found!

image

@yesilcimenahmet yesilcimenahmet changed the title Flutter crashes with deamon -1 code after installing GIT 2.45.1 Flutter Device Daemon crashes after installing GIT 2.45.1 May 19, 2024
@huycozy huycozy added the in triage Presently being triaged by the triage team label May 20, 2024
@huycozy
Copy link
Member

huycozy commented May 20, 2024

Hi @yesilcimenahmet

when I started Android Studio, I received the error "Flutter Daemon terminated with exit code -1"

Do you only see this issue on Android Studio IDE? Does it re-occur each time opening Android Studio?

I updated Git on my machine to 2.45.1 but couldn't see this issue on Android Studio Hedgehog | 2023.1.1 Patch 1.

@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 20, 2024
@yesilcimenahmet
Copy link
Author

Hi, @huycozy

I uploaded short video, it shows everything about issue.

Video:

device.daemon.crashes.2024-05-20.191026.mp4

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 20, 2024
@huycozy
Copy link
Member

huycozy commented May 21, 2024

Thanks for the recorded video, it's so clear on how the issue appears.

Since the error is not verbose (only has Flutter device daemon #1), it's a bit hard to identify the issue. I found this answer on SO, could you try to see if it helps?

If it doesn't help, could you try running flutter doctor -v when the issue occurs? We need to see the error inside if the tool can print out. Please also check this for reference.

@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label May 21, 2024
@yesilcimenahmet
Copy link
Author

yesilcimenahmet commented Jun 6, 2024

Hi @huycozy

I tried the solution you mentioned on Stackoverflow but it didn't work!
When I run the flutter doctor -v command, I get the error: "Error: Unable to find git in your PATH." However, when I type "git" in the Terminal window, it works without any issues.

After removing GIT from the computer, the output of flutter doctor -v is as follows.

[√] Flutter (Channel stable, 3.22.2, on Microsoft Windows [Version 10.0.22631.3672], locale tr-TR)
    • Flutter version 3.22.2 on channel stable at D:\fluttersdk\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 761747bfc5 (25 hours ago), 2024-06-05 22:15:13 +0200
    • Engine revision edd8546116
    • Dart version 3.4.3
    • DevTools version 2.34.3

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at C:\Users\yesil\AppData\Local\Android\sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: C:\Program Files\Android\Android Studio\jbr\bin\java
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11572160)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.10.1)
    • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
    • Visual Studio Community 2022 version 17.10.34928.147
    • Windows 10 SDK version 10.0.22621.0

[√] Android Studio (version 2023.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin can be installed from:
       https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
       https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.10+0--11572160)

[√] VS Code (version 1.90.0)
    • VS Code at C:\Users\yesil\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension can be installed from:
       https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[√] Connected device (4 available)
    • SM G998B (mobile) • emulator-5554 • android-x64    • Android 9 (API 28)
    • Windows (desktop) • windows       • windows-x64    • Microsoft Windows [Version 10.0.22631.3672]
    • Chrome (web)      • chrome        • web-javascript • Google Chrome 125.0.6422.142
    • Edge (web)        • edge          • web-javascript • Microsoft Edge 125.0.2535.85

[√] Network resources
    • All expected network resources are available.

• No issues found!

Please resolve this issue.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jun 6, 2024
@huycozy
Copy link
Member

huycozy commented Jun 7, 2024

Thanks for the update.

When I run the flutter doctor -v command, I get the error: "Error: Unable to find git in your PATH."

Please check this answer to see if it helps.

Regarding Flutter device daemon #1 error, it's unclear if it's a Flutter tool bug or IDE's plugin/extension bug. Flutter on IDEs has its repository for reporting the bug. On Android Studio, it's https://github.com/flutter/flutter-intellij. On VSCode, it's https://github.com/Dart-Code/Dart-Code. So it would be helpful if you could also check this on VSCode to see if the issue appears there or not.

@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jun 7, 2024
@yesilcimenahmet
Copy link
Author

@huycozy

git config --global --add safe.directory *

this command solved the problem but this needs to be fixed directly.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jun 9, 2024
@huycozy
Copy link
Member

huycozy commented Jun 10, 2024

Do you mean it can fix issue Unable to find git in your PATH? If you think it should be added into Flutter docs (docs.flutter.dev), please file an issue on its repository: https://github.com/flutter/website.

Regarding Flutter device daemon #1 error, we need to determine whether it's a Flutter tool issue or IDE's plugin/extension issue as I mentioned above.

@huycozy huycozy added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jun 10, 2024
@yesilcimenahmet
Copy link
Author

yesilcimenahmet commented Jun 10, 2024

@huycozy
git config --global --add safe.directory *

When I ran this command as administrator, the error "Unable to find git in your PATH" and "Flutter device daemon #1" disappeared. Both problems are solved.

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jun 10, 2024
@huycozy
Copy link
Member

huycozy commented Jun 11, 2024

Thanks for your response. Glad that command can solve both issues. I think it should be added to Flutter website on installation guideline page. For Flutter issue tracking, I found #123161, so you can follow up on it for updates. Closing this as solved.

@huycozy huycozy closed this as completed Jun 11, 2024
@huycozy huycozy added r: solved Issue is closed as solved and removed in triage Presently being triaged by the triage team labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
r: solved Issue is closed as solved
Projects
None yet
Development

No branches or pull requests

2 participants