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

Stack trace error locations should be clickable links to source location. #3733

Closed
gspencergoog opened this issue Aug 5, 2019 · 20 comments
Closed
Assignees
Milestone

Comments

@gspencergoog
Copy link

gspencergoog commented Aug 5, 2019

In the stack trace below, there are only a few things that are highlighted as clickable links, and it would be really helpful if all of the file locations were clickable. (This is just an example stack trace: this happens a lot to me.)

image

09:15:49.383 1 info flutter.tools Running "flutter pub get" in flutter_gallery...                 
09:15:49.837 2 info flutter.tools     0.4s
09:15:49.837 3 info flutter.tools 
09:15:50.060 4 info flutter.tools Launching lib/main.dart on Nexus 6P in debug mode...
09:15:50.070 5 info flutter.tools Initializing gradle...
09:15:50.640 6 info flutter.tools Resolving dependencies...
09:15:58.349 7 info flutter.tools Running Gradle task 'assembleDebug'...
09:16:12.917 8 info flutter.tools Note: /usr/local/google/home/gspencer/code/flutter/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.3+6/android/src/main/java/io/flutter/plugins/connectivity/ConnectivityPlugin.java uses or overrides a deprecated API.
09:16:12.917 9 info flutter.tools Note: Recompile with -Xlint:deprecation for details.
09:16:27.769 10 info flutter.tools Built build/app/outputs/apk/debug/app-debug.apk.
09:16:29.230 11 info flutter.tools Installing build/app/outputs/apk/app.apk...
09:16:43.825 12 info flutter.tools D/vndksupport(24337): Loading /vendor/lib64/hw/android.hardware.graphics.mapper@2.0-impl.so from current namespace instead of sphal namespace.
09:16:43.825 13 info flutter.tools D/vndksupport(24337): Loading /vendor/lib64/hw/gralloc.msm8994.so from current namespace instead of sphal namespace.
09:16:43.844 14 info flutter.tools E/flutter (24337): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: NoSuchMethodError: The getter 'pointerRouter' was called on null.
09:16:43.844 15 info flutter.tools E/flutter (24337): Receiver: null
09:16:43.844 16 info flutter.tools E/flutter (24337): Tried calling: pointerRouter
09:16:43.875 17 info flutter.tools E/flutter (24337): #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
09:16:43.875 18 info flutter.tools E/flutter (24337): #1      new FocusManager (package:flutter/src/widgets/focus_manager.dart:1031:30)
09:16:43.875 19 info flutter.tools E/flutter (24337): #2      new BuildOwner (package:flutter/src/widgets/framework.dart:2179:31)
09:16:43.875 20 info flutter.tools E/flutter (24337): #3      new _WidgetsFlutterBinding&BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&SemanticsBinding&RendererBinding&WidgetsBinding (package:flutter/src/widgets/binding.dart:374:34)
09:16:43.875 21 info flutter.tools E/flutter (24337): #4      new WidgetsFlutterBinding (package:flutter/src/widgets/binding.dart)
09:16:43.875 22 info flutter.tools E/flutter (24337): #5      WidgetsFlutterBinding.ensureInitialized (package:flutter/src/widgets/binding.dart:1053:7)
09:16:43.875 23 info flutter.tools E/flutter (24337): #6      runApp (package:flutter/src/widgets/binding.dart:844:25)
09:16:43.875 24 info flutter.tools E/flutter (24337): #7      main (package:flutter_gallery/main.dart:13:3)
09:16:43.876 25 info flutter.tools E/flutter (24337): #8      _runMainZoned.<anonymous closure>.<anonymous closure> (dart:ui/hooks.dart:216:25)
09:16:43.876 26 info flutter.tools E/flutter (24337): #9      _rootRun (dart:async/zone.dart:1124:13)
09:16:43.876 27 info flutter.tools E/flutter (24337): #10     _CustomZone.run (dart:async/zone.dart:1021:19)
09:16:43.876 28 info flutter.tools E/flutter (24337): #11     _runZoned (dart:async/zone.dart:1516:10)
09:16:43.876 29 info flutter.tools E/flutter (24337): #12     runZoned (dart:async/zone.dart:1500:12)
09:16:43.876 30 info flutter.tools E/flutter (24337): #13     _runMainZoned.<anonymous closure> (dart:ui/hooks.dart:208:5)
09:16:43.876 31 info flutter.tools E/flutter (24337): #14     _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:19)
09:16:43.876 32 info flutter.tools E/flutter (24337): #15     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
09:16:43.876 33 info flutter.tools E/flutter (24337): 
09:16:44.074 34 info flutter.tools Syncing files to device Nexus 6P...

This is on the master branch of Flutter:

[✓] Flutter (Channel focus_shortcuts, v1.8.4-pre.86, on Linux, locale en_US.UTF-8)
    • Flutter version 1.8.4-pre.86 at /usr/local/google/home/gspencer/code/flutter
    • Framework revision a248cb25dc (3 days ago), 2019-08-02 16:17:05 -0700
    • Engine revision 4106d847b0
    • Dart version 2.5.0 (build 2.5.0-dev.1.0 622ec5099f)

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /usr/local/google/home/gspencer/Android/Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • ANDROID_HOME = /usr/local/google/home/gspencer/Android/Sdk
    • Java binary at: /usr/bin/X11/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-2~deb9u1-b03)
    ✗ Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).

[✓] IntelliJ IDEA Community Edition (version 2019.2)
    • IntelliJ at /opt/my-intellij-ce-current
    • Flutter plugin version 38.0.4
    • Dart plugin version 192.5728.98

[✓] Connected device (1 available)
    • Nexus 6P • 84B7N15A07007628 • android-arm64 • Android 8.1.0 (API 27)

! Doctor found issues in 2 categories.
@gspencergoog gspencergoog changed the title Stack track error locations should be clickable links to source location. Stack trace error locations should be clickable links to source location. Aug 5, 2019
@devoncarew
Copy link
Member

In order to repro this, you're just opening //examples/flutter_gallery in IntelliJ, and hitting run?

@devoncarew
Copy link
Member

hmm:

flutter: When the exception was thrown, this was the stack:
flutter: #0      Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
flutter: #1      _DemoItem.build (package:flutter_gallery/gallery/home.dart:198:11)
flutter: #2      StatelessElement.build (package:flutter/src/widgets/framework.dart:4002:28)
flutter: #3      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3934:15)
flutter: #4      Element.rebuild (package:flutter/src/widgets/framework.dart:3731:5)
flutter: #5      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:3917:5)
flutter: #6      ComponentElement.mount (package:flutter/src/widgets/framework.dart:3912:5)

I may need to work a bit more on a repro...

@gspencergoog
Copy link
Author

gspencergoog commented Aug 5, 2019

Well, not exactly: the one in master (hopefully!) doesn't throw an exception, but if I add a single line that throws an exception, then it does.

I just realized, however, that I have an experiment turned on in the Flutter plugin settings: "Replace the Run and Debug console output with a custom Flutter Logging view.".

If I turn that off, I get better results, but they still don't all have links (e.g. hooks.dart):
image

@devoncarew
Copy link
Member

Ah, looks much better!

dart:ui/hooks.dart may be a different issue (or a more specific one). The way that dart:ui is contributed to the SDK is indirect, and likely not understood by our url regex code.

@stevemessick
Copy link
Member

cc: @pq

@stevemessick stevemessick added this to the On Deck milestone Aug 6, 2019
@gspencergoog
Copy link
Author

Any updates on this? It would be really helpful to be able to click on links instead of all the copy/pasting I currently do.

@helin24 helin24 self-assigned this Apr 27, 2020
@devoncarew
Copy link
Member

@gspencergoog - I assume that some of the clicking link issues were resolved in the last release? If there are remaining issues, can you include the details in this issue?

@helin24 - I did find one additional unlinked issue. When running a flutter web app, the stack traces is generates aren't linked.

Bad state: Future already completed
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 216:49  throw_
dart-sdk/lib/async/future_impl.dart 42:79                                     complete
packages/devtools_app/src/service_manager.dart 141:22                         vmServiceOpened
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 47:50            onValue
dart-sdk/lib/async/zone.dart 1439:54                                          runUnary
dart-sdk/lib/async/future_impl.dart 141:18                                    handleValue
dart-sdk/lib/async/future_impl.dart 686:44                                    handleValueCallback
dart-sdk/lib/async/future_impl.dart 715:32                                    _propagateToListeners
dart-sdk/lib/async/future_impl.dart 526:5                                     [_completeWithValue]
dart-sdk/lib/async/future_impl.dart 560:7                                     callback
dart-sdk/lib/async/schedule_microtask.dart 43:11                              _microtaskLoop
dart-sdk/lib/async/schedule_microtask.dart 52:5                               _startMicrotaskLoop
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 168:15           <fn>

This stacktrace is (I believe) written by DDC. To address this, we can either improve our stack trace regexs to also match this format, or adjust the output of DDC to better match one of the existing Dart formats (the VM, package:test, flutter test, ...)

@gspencergoog
Copy link
Author

Yes, this is looking much better, and it's really so nice to be able to just jump right to the problem without having to copy/paste or open the file and retype the line number.

I haven't run into any stack traces that aren't linked recently.

@dratushnyy
Copy link
Contributor

Hey, @helin24, are you still working on this issue? 😃

@helin24
Copy link
Member

helin24 commented Jul 27, 2020

@dratushnyy thanks for the reminder! I actually made some changes to flutter related tot his but haven't made additional changes within flutter-intellij. Did you find an additional case of this happening?

@dratushnyy
Copy link
Contributor

@helin24 no, not really, I was just curious, I will pick up a different one 😃

@helin24
Copy link
Member

helin24 commented Jul 28, 2020

Ah got it! I'm not actively working on this, so feel free to take it if you're looking for a starter issue.

@devoncarew
Copy link
Member

I think this one has been addressed (we had a few related issues). I'll close this out.

@AlexandrLevin-SelfTable
Copy link

AlexandrLevin-SelfTable commented Jan 20, 2022

@devoncarew

I did find one additional unlinked issue. When running a flutter web app, the stack traces is generates aren't linked.

Hey, has this bug been fixed? I still can't click on stack trace locations while running flutter web application 😞

@Z6P0
Copy link

Z6P0 commented Apr 6, 2022

The bug is still here. Just create the default "counter" project, add a "throw", and the line in the stack trace is not clickable. Please reopen.

@smaznet
Copy link

smaznet commented Apr 9, 2022

i have this issue in android studio version 2021.2.1 Beta 4

@helin24 helin24 reopened this Apr 20, 2022
@smaznet
Copy link

smaznet commented Apr 21, 2022

my issue solved by updating dart plugin to newer version

@helin24
Copy link
Member

helin24 commented Apr 22, 2022

@AlexandrLevin-SelfTable I'm reproducing this error for flutter web. Fixing this might be a little different so I'm opening #6131

@Z6P0 Are you also using flutter web? If not, can you post a screenshot of what you're seeing and what version of the Flutter plugin you're using?

@helin24 helin24 added the waiting for customer response Auto-close if no response label Apr 22, 2022
@Z6P0
Copy link

Z6P0 commented Apr 25, 2022

@helin24 Apparently it was a problem with the Dart plugin: I updated it, and now the links are back!
For the record here is a screenshot of the problem, with the default "counter" app. I don't use Flutter web, and the Flutter plugin version is 66.0.3.

2022-04-25_10-59-25

@helin24
Copy link
Member

helin24 commented May 6, 2022

Okay I see, I will close this issue and keep the flutter web one open. Thanks for updating!

@helin24 helin24 closed this as completed May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants