flutter-intellij
flutter-intellij copied to clipboard
IDE Crash during flutter build - "Error listening to ToolEvent stream"
What happened
IDE crash while running a debug session.
Version information
IntelliJ IDEA 2023.3
• Flutter plugin io.flutter 77.0.1
• Dart plugin 233.11799.172
Flutter 3.3.10 • channel stable • https://github.com/flutter/flutter.git Framework • revision 135454af32 (12 months ago) • 2022-12-15 07:36:55 -0800 Engine • revision 3316dd8728 Tools • Dart 2.18.6 • DevTools 2.15.0
Exception
null
java.lang.Throwable: Error listening to ToolEvent stream: org.dartlang.vm.service.element.RPCError@5aefd187
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
at io.flutter.vmService.VmServiceWrapper$2.onError(VmServiceWrapper.java:185)
at org.dartlang.vm.service.VmServiceBase.processResponse(VmServiceBase.java:633)
at org.dartlang.vm.service.VmServiceBase.processMessage(VmServiceBase.java:422)
at org.dartlang.vm.service.VmServiceBase$1.onMessage(VmServiceBase.java:86)
at de.roderick.weberknecht.WebSocketReceiver.run(WebSocketReceiver.java:65)
App still runs on device and debug messages are showing in console.
please run flutter doctor to make sure if flutter is properly installed on your system
Yes, do update your flutter and dart versions, and see if this issue is resolved.
Same issue, intellij throws the following exception:
java.lang.Throwable: Error listening to ToolEvent stream: org.dartlang.vm.service.element.RPCError@7ee6bfe
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
at io.flutter.vmService.VmServiceWrapper$2.onError(VmServiceWrapper.java:185)
at org.dartlang.vm.service.VmServiceBase.processResponse(VmServiceBase.java:633)
at org.dartlang.vm.service.VmServiceBase.processMessage(VmServiceBase.java:422)
at org.dartlang.vm.service.VmServiceBase$1.onMessage(VmServiceBase.java:86)
at de.roderick.weberknecht.WebSocketReceiver.run(WebSocketReceiver.java:65)
Stopping at breakpoint, console prints:
Cannot invoke "com.google.gson.JsonElement.isJsonPrimitive()" because "elem" is null
Flutter doctor output:
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel unknown, 3.0.5, on Microsoft Windows [Version 10.0.19045.4046], locale de-AT)
[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
X Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components
[!] Android Studio (version 2021.3)
X Unable to determine bundled Java version.
[!] Android Studio (version 2022.3)
X Unable to find bundled Java version.
[√] IntelliJ IDEA Ultimate Edition (version 2023.3)
[√] Connected device (4 available)
[√] HTTP Host Availability
! Doctor found issues in 4 categories.
Intellij version + used plugins:
IntelliJ IDEA 2023.3.4 (Ultimate Edition)
Build #IU-233.14475.28, built on February 13, 2024
Runtime version: 17.0.10+1-b1087.17 amd64
Registry:
ide.balloon.shadow.size=15
debugger.new.tool.window.layout=true
ide.experimental.ui=true
Non-Bundled Plugins:
com.mnr.java.intellij.idea.plugin.base64helper (3.0.0)
some.awesome (1.15)
com.nasller.CodeGlancePro (1.8.1)
com.volitic.plugin.ngdartfolding (1.0.2)
com.codertainment.scrcpy (1.0.0)
dev.j-a.swift (0.19.0.167-233)
Statistic (4.2.14)
com.wix.sasslint (1.1.2)
krasa.CpuUsageIndicator (1.18.0-IJ2023)
com.intellij.plugin.adernov.powershell (2.3.1)
ee.carlrobert.chatgpt (2.4.0)
GrepConsole (12.25.0-IJ2023.3)
Dart (233.13763.5)
andrasferenczi.dart-data-plugin (0.2.0)
com.majera.intellij.codereview.bitbucket (2024.1.2.233)
com.intellij.lang.jsgraphql (233.13135.65)
izhangzhihao.rainbow.brackets (2024.2.1)
com.jetbrains.packagesearch.intellij-plugin (233.11800.3)
org.jetbrains.android (233.14475.28)
io.flutter (78.1.1)
de.mariushoefler.flutter_enhancement_suite (1.7.1)
org.nemwiz.jira-commit-message (3.4.1)
com.intellij.jira (4.7.1)
zielu.gittoolbox (500.1.11+222)
ru.itbasis.plugins.intellij.hashGenerator (0.3)
Kotlin: 233.14475.28-IJ
Our current project cannot be updated to the latest versions of Flutter and Dart because it relies on several legacy packages that are not compatible with newer versions.
I'm seeing different reports of whether this makes the IDE unusable or if it just prints out an error message. I think it should only print out an error message (this is what I get if I go back to an old Flutter SDK version), but the issue description title suggests something else could be going wrong as well.