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

Can't not see the varable's information at breakpoint

Open luckysmg opened this issue 1 year ago • 6 comments
trafficstars

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

luckysmg avatar Feb 20 '24 06:02 luckysmg

I had the same problem

20156284 avatar Feb 20 '24 09:02 20156284

Happening to us too. We now have no visibility into variables when debugging.

shoxter avatar Feb 21 '24 22:02 shoxter

I had the same problem

Did you fix it?

shoxter avatar Feb 21 '24 22:02 shoxter

I had the same problem

Tecode avatar Feb 22 '24 01:02 Tecode

me too

plumhly avatar Feb 22 '24 09:02 plumhly

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

payailk avatar Feb 23 '24 08:02 payailk

I had the same problem

AlaJ97 avatar Feb 27 '24 21:02 AlaJ97

Same problem. So sad...

zekunyan avatar Feb 28 '24 07:02 zekunyan

flutter-intellij.zip

Here is the plugin that seems works fine. Everybody can take this and install from disk to fallback

luckysmg avatar Feb 28 '24 08:02 luckysmg

The version of the zip I uploaded should be version 77.1.2

luckysmg avatar Mar 01 '24 02:03 luckysmg

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.

SanjiKakashi avatar Mar 01 '24 11:03 SanjiKakashi

+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

trueAtom avatar Mar 01 '24 13:03 trueAtom

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

trueAtom avatar Mar 01 '24 13:03 trueAtom

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.

image

trueAtom avatar Mar 01 '24 13:03 trueAtom

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.

image

Thank you @trueAtom 👍

SanjiKakashi avatar Mar 03 '24 07:03 SanjiKakashi

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.

jwren avatar Mar 06 '24 23:03 jwren

Emm seems 78.2.x still have issue...

image

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

luckysmg avatar Mar 07 '24 04:03 luckysmg

Unfortunately not fixed 😢

sergchil avatar Mar 07 '24 10:03 sergchil

Emm seems 78.2.x still have issue...

the same

trueAtom avatar Mar 07 '24 11:03 trueAtom

This problem is really blocking coding debug, please...

zekunyan avatar Mar 07 '24 11:03 zekunyan

i am also facing this same issue even after upgrading plugin to 78.2.1 +1

BlackStriker99 avatar Mar 07 '24 16:03 BlackStriker99

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 avatar Mar 07 '24 17:03 jwren

@jwren Not sure if this is case for all, i am attaching my environment data here.

Screenshot 2024-03-07 at 11 29 25 PM Screenshot 2024-03-07 at 11 28 56 PM Screenshot 2024-03-07 at 11 53 02 PM

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.

Screenshot 2024-03-07 at 11 47 13 PM

Second one is having latest flutter sdk 3.19.2 and JAVA 17,i am not facing issue in this project.

Screenshot 2024-03-07 at 11 48 38 PM

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.

BlackStriker99 avatar Mar 07 '24 18:03 BlackStriker99

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?

jwren avatar Mar 07 '24 20:03 jwren

@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:

image

jwren avatar Mar 07 '24 22:03 jwren

I have same config as https://github.com/flutter/flutter-intellij/issues/7228#issuecomment-1984168490 @BlackStriker99.

I am facing the same problem.

ravi-uleeco avatar Mar 08 '24 12:03 ravi-uleeco

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?

jwren avatar Mar 11 '24 23:03 jwren

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.

shoxter avatar Mar 12 '24 00:03 shoxter

I had the same problem

vidyda avatar Mar 14 '24 04:03 vidyda

same

Howard2595 avatar Mar 14 '24 06:03 Howard2595