flutter-intellij
flutter-intellij copied to clipboard
Can't not see the varable's information at breakpoint
Steps to Reproduce
Setup a breakPoint and see the info in var. But everytime will raise error in log console:
Cannot invoke "com.google.gson.JsonElement.isJsonPrimitive()" because "elem" is null
Here is the img:
Version info
[!] Flutter (Channel stable/v3.3.8.xianyu, 3.3.9-0.0.pre.210, on macOS 14.1.2
23B92 darwin-x64, locale zh-Hans-CN)
• Flutter version 3.3.9-0.0.pre.210 on channel stable/v3.3.8.xianyu at
/Users/wjr/flutter
! Upstream repository [email protected]:ali-flutter/flutter.git is
not a standard remote
• Framework revision a1f0c4291a (6 weeks ago), 2024-01-12 15:32:44 +0800
• Engine revision 7bc1415569
• Dart version 2.18.4
• DevTools version 2.15.0
• Flutter download mirror http://aliuc-flutter-storage.alibaba.net/uc
[!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /Users/wjr/Library/Android/sdk
• Platform android-33, build-tools 33.0.2
• ANDROID_HOME = /Users/wjr/Library/Android/sdk
• ANDROID_SDK_ROOT = /Users/wjr/Library/Android/sdk
• Java binary at: /Library/Internet
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java
• Java version Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for
more details.
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15C500b
• CocoaPods version 1.14.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (version 2023.1)
• Android Studio at /Users/wjr/Applications/Android Studio.app/Contents
• 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
✗ Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[✓] VS Code (version 1.86.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.82.0
I had the same problem
Happening to us too. We now have no visibility into variables when debugging.
I had the same problem
Did you fix it?
I had the same problem
me too
Happening to us too. We now have no visibility into variables when debugging.
It could be caused by upgrading the Android studio version, I got the same error when I upgraded to 2023.1.1 Patch 2, and then I downgraded back to 2022.1.1 Patch 2. It was back to normal
I had the same problem
Same problem. So sad...
Here is the plugin that seems works fine. Everybody can take this and install from disk to fallback
The version of the zip I uploaded should be version 77.1.2
Here is the plugin that seems works fine. Everybody can take this and install from disk to fallback
How do i use this ?, can someone please help me.
+1
- Cannot invoke "com.google.gson.JsonElement.isJsonPrimitive()" because "elem" is null
Android Studio Iguana | 2023.2.1 Build #AI-232.10227.8.2321.11479570, built on February 21, 2024
The version of the zip I uploaded should be version
77.1.2
Plugin 'Flutter' (version '77.1.2') is not compatible with the current version of the IDE, because it requires build 231.* or older but the current build is AI-232.10227.8
flutter-intellij.zip Here is the plugin that seems works fine. Everybody can take this and install from disk to fallback
How do i use this ?, can someone please help me.
flutter-intellij.zip Here is the plugin that seems works fine. Everybody can take this and install from disk to fallback
How do i use this ?, can someone please help me.
![]()
Thank you @trueAtom 👍
Thank you for the bug report. I just pushed out a point release of the Flutter plugin which resolves the exception. Please do reopen if you see this issue on any version over 78.2.x.
Emm seems 78.2.x still have issue...
https://github.com/flutter/flutter-intellij/assets/49340347/3e6ea80d-c86a-40dd-b4dd-8e07e3139db0
Cannot invoke "org.dartlang.vm.service.element.InstanceRef.getType()" because "instanceRef" is null
Cannot invoke "org.dartlang.vm.service.element.InstanceRef.getType()" because "instanceRef" is null
Unfortunately not fixed 😢
Emm seems 78.2.x still have issue...
the same
This problem is really blocking coding debug, please...
i am also facing this same issue even after upgrading plugin to 78.2.1 +1
Thank you all for the +1's, the escalation here helps prioritize issues to be fixed. I thought that issue root cause as a NPE:
Cannot invoke "com.google.gson.JsonElement.isJsonPrimitive()" because "elem" is null
I am convinced that the NPE is fixed in the point release, but clearly it was not the root cause of the hanging in the debugger. I'll continue troubleshoot. The message:
Cannot invoke "org.dartlang.vm.service.element.InstanceRef.getType()" because "instanceRef" is null
Gives me the next place to look so thank you, but it may also not be the root cause. If any additional relevant logs (Help > Show Logs in Finder > ....) are being printed, do include them here.
For any additional +1's on this issue, please include your OS, Flutter Version and Flutter Plugin version to help narrow my search.
@jwren Not sure if this is case for all, i am attaching my environment data here.
i have two flutter projects
first one is having old SDK 2.10.5 and JAVA 11, i am facing issue in this project and this app is so big compare to second one which is having only two pages.
Second one is having latest flutter sdk 3.19.2 and JAVA 17,i am not facing issue in this project.
Also i don't know where i can find the Show Logs in Finder So i can not help you with that. hope this will help to debug it might be issue with the projects which are in old SDK or maybe it is because of the size of the project don't know.
The original issue that this bug was opened for was that the exception
Cannot invoke "com.google.gson.JsonElement.isJsonPrimitive()" because "elem" is null
was thrown when debugging, i.e. "But everytime will raise error in log console". It was not obvious until other posts that debugging was blocked or otherwise negatively effected.
Is there anyone using the latest Dart/Flutter stable SDKs hitting this issue?
@elliette -- hit this DWDS error when trying to debug the above issue in IntelliJ Ultimate 2023.3, Chrome platform with Hello Flutter clicker app modified with some static members:
I have same config as https://github.com/flutter/flutter-intellij/issues/7228#issuecomment-1984168490 @BlackStriker99.
I am facing the same problem.
I have been unsuccessful in getting a reproduction locally.
Has anyone hit this issue with a recent version of the Flutter Framework, i.e. after version 2.10? If so, does anyone have a small piece of code and breakpoint location to reproduce the issue?
I am on 2.10.5; unfortunately, my project is much more complicated than a few lines so unless we could utilize that over a screenshare or something, I won't be of much assistance.
I had the same problem
same