-
Notifications
You must be signed in to change notification settings - Fork 27.6k
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
The Dart Analyzer has terminated. #43620
Comments
@YushiPark you tried this this #36257 (comment) right? |
@BondarenkoStas Yes. It works great for the first time after I did as the issue says(#36257 (comment)). However, the analyzer terminates again after I finish committing. |
I am getting the same error on a windows machine |
Same issue |
1 similar comment
Same issue |
i am having same issue for some time. Plus, every time i use 'flutter run', the app is building previous version. The changes apply when i hot reload again. Its so frustrating. It's been a while now i am facing this issue,. |
Same issue here. I already doing what comment said like this, But every i command If i press
|
I am having similar problems too. I've tried reinstalled flutter. I've tried reinstalling VSCode. I've tried restarting my computer. I'm not doing anything special when the dart analyzer terminates. It'll terminate when VSCode starts. It'll terminate when I'm writing code. It'll terminate when left alone. Some times It'll stay fine for a half hour. Sometimes It'll terminate moments after restarting the dart analyzer. There doesn't seem to be any rhyme or reason as to what causes the dart analyzer to terminate. I've had this problem for over a month now. I've had this problem across multiple dart and flutter versions. I've had this problem across multiple VSCode versions. I work on a Windows machine but my buddy who works on a Linux machine has similar problems, though not as frequent as mine.
Log output during most recent crash: |
I had the same problem. It was solved when I remove |
In my |
same here -> https://pastebin.com/8zNAgX0M |
Having the same issue. It started appearing since the latest update to Dart Code extension. |
This issue is beyond annoying. Is there any fix or workaround or something ?! |
Could this be a duplicate of #46616? |
Will close later this week as a duplicate of #46616 unless there are further reports. |
#46616 is closed: "Closing this as dart analyzer in flutter issue seem to be resolved." Why they think it's resolved I don't know. They also said "the fix for this issue has only recently landed in the Dart SDK, so if it is not working on a particular version that is expected". What version?! I suppose I shouldn't be wasting my time here and that I should instead post my question on the other issue thread. For what it's worth, I'm using Dart 2.7.0 and I am still getting "The Dart Analyzer has terminated" bug. |
@CelestialGuru One thing we are trying to figure out is if there are leftover issues separate from the ones we have believed to be resolved. This report here: #46616 (comment) suggests that the master branch of Flutter (including an updated, embedded version of Dart) might have fixed this for users. If you're seeing them still on Flutter's master branch, we'd definitely like to know! |
I have the same problem on Ubuntu 20.04:
|
@s7Thiago Hi, thanks for the report. Can you give the full output of |
Yeah, same here. Just wanted to say: you're not alone. Our team haven't had automatic hot reload for months now. We've all learnt to click "Restart Analyzer" before navigating in the code or refactoring anything. We're also constantly clicking the lightning icon in VS Code to hot reload the view. Very, very, irritating. |
my solution: add a shortkey for hot reloading to CTRL+D |
I've done the same thing but CTRL+R and automatically press CTRL+S + CTRL+R whenever that happens. It saves tons of time using the mouse to navigate to the Hot Reload button. I should've shared it earlier so thank you, @moodstubos! I assume it kicks it off because of the size of the project or some dependencies but have no idea how. |
It's funny that several of us have just given up on the analyzer actually working and we all use workarounds for hot reload. I've even started using Ctrl+Shift+F (find in files) to find the definition for a method instead of pressing F12 (go to definition) since F12 does not work without the analyzer. Even if I click "Restart" on the Analyzer it takes some seconds (maybe up to 30-60 sec?) before F12 actually works. Ctrl+Shift+F is much faster :) |
I guess there are two different issues. My problem is that Dart Analyzer crashes, I have to restart it (takes 2-5 seconds) and then everything works except for Hot Reload on Save, whereby I have to manually Hot Reload with a shortcut (CTRL+R). The Dart Analyzer crashing and taking much time to restore is a different issue I guess discussed on this thread. |
I guess the restart time depends on the project size. My project is fairly large. So the analyzer takes time to analyze all the files and finding all the references. I believe it's the same issue but I'm not sure of course. |
My project is 60'000 lines of code so I assume it's fairly large as well. Maybe it depends on the dependencies of the project. |
Ok, just checked. We're at 41k lines in this project, we are referencing another local project with ~5k lines and 47 other (external) dependencies in the yaml-file of the main project (+5 dev dependencies). I may have exaggerated the 30-60 secs, it's more like 10-30 secs when I've measured for a while today. I also have a feeling that the analysis server crashes more often when I'm debugging but that's what I do most of the time so it's natural that I experience most crashes while debugging. If I just restart the analysis server by triggering the command "Dart: Restart Analysis Server" from within VS Code and then press F12 on a method in my project I get around 7-15 secs when I'm testing (without a debugging session active). I'm sitting on "latest" Windows 10, Samsung 960 EVO 1TB, 32 GB RAM, Ryzen 7 1800X so not the latest and greatest but quite powerful machine. I'm experiencing the same on an Intel-based system at work. |
Encountering this issue as well. Had this problem months ago and it seemed fixed at one point but now it's back as of Flutter 1.22.0 I believe. |
I think this is likely the same as one of the issues from:
Those have been fixed now, though they're not all in stable releases yet (the last one might not even be in master yet). |
Same for me this issue come back after 1.22. On very big project de Analyzer, just Stop and then, after restart debbugin is very slow. |
Same issue for me on windows since flutter 1.22 |
I'm not sure that was causing this problem, but I think it got better: I noticed that under flutter pub outdated the analyzer packages was marked as an outdated transitive dependences (0.39.x). I have removed the dependency of the source package which was intl_translation in my case in order to use the latest analyzer version (0.40.6). |
"under flutter pub outdated" - can you please give some more info on where this folder is at? |
Interesting. How did you find out that it was intl_translation that had a reference to an old analyzer? Manually looking through your deps or did you use some nifty command? And how did you "remove" intl_translation? Weren't you using it or did you find a replacement? I'm afraid that some of my deps may be depending on an old analyzer and that I cannot remove/replace these deps. I guess I'll have ask the maintainers to update the dep or even submit a PR to them. |
Simply add a dependency of current analyzer version into pubspec.yaml of your project. EDIT: |
Same issue here right after I updated to Flutter 1.22.0 - every single time I run the code, it forced the dart analyzer to get terminated. Also, I don't see my analyzer package is marked as outdated under the transitive dependencies. |
This is underway from the Dart SDK to the Flutter SDK, stay tuned |
this is fixed in Dart 2.10.4, which is included in 1.22.4 on the stable channel. |
Same here!
From: Luis Arízaga <[email protected]>
Sent: Monday, November 16, 2020 4:06 PM
To: flutter/flutter <[email protected]>
Cc: yosikal <[email protected]>; Comment <[email protected]>
Subject: Re: [flutter/flutter] The Dart Analyzer has terminated. (#43620)
Not sure if it is still a problem with the analyzer, but when building starts, the IDE automatically stops making suggestions for words like Container.
flutter doctor --verbose:
`[√] Flutter (Channel stable, 1.22.4, on Microsoft Windows [Versión 10.0.18363.1198], locale es-EC)
• Flutter version 1.22.4 at C:\src\flutter
• Framework revision <1aafb3a> 1aafb3a (3 days ago), 2020-11-13 09:59:28 -0800
• Engine revision 2c956a31c0
• Dart version 2.10.4
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
• Android SDK at C:\Users\larizaga\AppData\Local\Android\sdk
• Platform android-29, build-tools 29.0.3
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 46.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.51.1)
• VS Code at C:\Users\larizaga\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.16.0
[√] Connected device (1 available)
• Redmi Note 9 Pro (mobile) • 935ea3bd • android-arm64 • Android 10 (API 29)`
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#43620 (comment)> , or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABJW4AOYH7CYMIBKAVI2E4TSQEWTLANCNFSM4JFX6WKQ> . <https://github.com/notifications/beacon/ABJW4AJOHIDJZ6WUG3KGTTTSQEWTLA5CNFSM4JFX6WK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFNSYKKA.gif>
|
I deleted the reply because it solved after running |
Since a couple of days I get regular edit: I filed a new issue: |
@moodstubos it's not related, but you're the second person to mention that - could you file an issue at https://github.com/Dart-Code/Dart-Code and include the version of your OS and also any antivirus or other software you may have? The VS Code extension watches the Dart SDK's |
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 |
Hello. While editing on VS code, my dart analyzer terminates frequently. I've tried some solution found in other issues and none of them works. How can I fix it?
Here is my flutter doctor result:
dart log.txt
(content)
The text was updated successfully, but these errors were encountered: