flutter / flutter/devtools

Layout explorer exception in DevTools

未关闭
#8,570 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
layout explorer P2 reproduce to verify screen: inspector
主要语言
Dart
星标
1.7k
派生
404
平均合并
6 天 17 小时
30 天内合并 PR
18

描述

Debugging CupertinoApp on android emulator, mixed usage Theme.of and CupertinoThemeData.of
I was trying something.

```console
[√] Flutter (Channel stable, 2.0.4, on Microsoft Windows [Version 10.0.19042.867], locale bg-BG)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Chrome - develop for the web
[√] Android Studio (version 4.1.0)
[√] VS Code, 64-bit edition (version 1.55.1)
[√] Connected device (2 available)
```
In chrome dev tools I see this exception as soon I click on a widget in the left tree.


logs

```console
main.dart.js:54020 ext.flutter.inspector.getLayoutExplorerNode: (-32000) Server error
'package:flutter/src/foundation/stack_frame.dart': Failed assertion: line 207 pos 12: 'match != null': Expected flutter/devtools#40 Eval..getLayoutExplorerNode. () to match RegExp: pattern=^#(\d+) +(.+) \((.+?):?(\d+){0,1}:?(\d+){0,1}\)$ flags=.
#0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
flutter/devtools#1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
flutter/devtools#2 StackFrame.fromStackTraceLine (package:flutter/src/foundation/stack_frame.dart:207:12)
flutter/devtools#3 MappedIterator.moveNext (dart:_internal/iterable.dart:389:20)
flutter/devtools#4 WhereTypeIterator.moveNext (dart:_internal/iterable.dart:866:20)
flutter/devtools#5 new _GrowableList._ofOther (dart:core-patch/growable_array.dart:198:26)
flutter/devtools#6 new _GrowableList.of (dart:core-patch/growable_array.dart:152:26)
flutter/devtools#7 new List.of (dart:core-patch/array_patch.dart:50:28)
flutter/devtools#8 Iterable.toList (dart:core/iterable.dart:366:12)
flutter/devtools#9 StackFrame.fromStackString (package:flutter/src/foundation/stack_frame.dart:95:10)
flutter/devtools#10 FlutterError.defaultStackFilter (package:flutter/src/foundation/assertions.dart:1016:54)
flutter/devtools#11 DiagnosticsStackTrace._applyStackFilter (package:flutter/src/foundation/assertions.dart:1187:43)
flutter/devtools#12 new DiagnosticsStackTrace (package:flutter/src/foundation/assertions.dart:1162:17)
flutter/devtools#13 FlutterErrorDetails.debugFillProperties (package:flutter/src/foundation/assertions.dart:683:22)
flutter/devtools#14 DiagnosticableNode.builder. (package:flutter/src/foundation/diagnostics.dart:2945:17)
flutter/devtools#15 DiagnosticableNode.builder (package:flutter/src/foundation/diagnostics.dart:2948:8)
flutter/devtools#16 _FlutterErrorDetailsNode.builder (package:flutter/src/foundation/assertions.dart:1209:56)
flutter/devtools#17 DiagnosticableNode.emptyBodyDescription (package:flutter/src/foundation/diagnostics.dart:2959:77)
flutter/devtools#18 DiagnosticsNode.toJsonMap. (package:flutter/src/foundation/diagnostics.dart:1578:13)
flutter/devtools#19 DiagnosticsNode.toJsonMap (package:flutter/src/foundation/diagnostics.dart:1607:6)
flutter/devtools#20 WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1499:18)
flutter/devtools#21 WidgetInspectorService._reportError (package:flutter/src/widgets/widget_inspector.dart:919:44)
flutter/devtools#22 FlutterError.reportError (package:flutter/src/foundation/assertions.dart:1103:15)
flutter/devtools#23 BindingBase.registerServiceExtension. (package:flutter/src/foundation/binding.dart:607:22)

```

I was expecting that I should be able to run a cupertino app in android emulator, as it is just UI, my app doesn't have added native plugins that I'm using.

贡献指南

打开贡献指南

调研方向

Reproduce the failure in Chrome DevTools by opening the layout explorer and clicking a widget in the left tree. Start with getLayoutExplorerNode and the stack-trace handling mentioned in package:flutter/src/foundation/stack_frame.dart, then inspect the related assertions.dart and widget_inspector.dart frames; done means the layout explorer no longer raises this exception.

由索引模型根据 Issue 内容生成。

评估

技术栈
dart
领域
devtools
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
28/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。