Layout explorer exception in DevTools
- Langage dominant
- Dart
- Étoiles
- 1.7k
- Forks
- 404
- Merge moyen
- 6 j 17 h
- PR mergées (30 j)
- 18
Description
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.
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- dart
- Domaine
- devtools
- Type d'issue
- Bug
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 28/100