devtools
devtools copied to clipboard
Error in Layout Explorer
vm_service.dart:2020 Uncaught (in promise) Error: Server error (-32000) from ext.flutter.inspector.getLayoutExplorerNode():
FormatException: Invalid empty scheme (at character 1)
:
^
#0 _Uri._fail (dart:core/uri.dart:1625:5)
#1 new _Uri.notSimple (dart:core/uri.dart:1469:9)
#2 Uri.parse (dart:core/uri.dart:1024:17)
#3 StackFrame.fromStackTraceLine (package:flutter/src/foundation/stack_frame.dart:218:32)
#4 MappedListIterable.elementAt (dart:_internal/iterable.dart:417:29)
#5 ListIterator.moveNext (dart:_internal/iterable.dart:346:26)
#6 SkipWhileIterator.moveNext (dart:_internal/iterable.dart:673:22)
#7 new List.from (dart:core-patch/array_patch.dart:47:19)
#8 Iterable.toList (dart:core/iterable.dart:400:5)
#9 StackFrame.fromStackString (package:flutter/src/foundation/stack_frame.dart:94:10)
#10 StackFrame.fromStackTrace (package:flutter/src/foundation/stack_frame.dart:80:12)
#11 FlutterErrorDetails.debugFillProperties (package:flutter/src/foundation/assertions.dart:557:57)
#12 DiagnosticableNode.builder (package:flutter/src/foundation/diagnostics.dart:2900:14)
#13 _FlutterErrorDetailsNode.builder (package:flutter/src/foundation/assertions.dart:996:55)
#14 DiagnosticableNode.emptyBodyDescription (package:flutter/src/foundation/diagnostics.dart:2911:58)
#15 DiagnosticsNode.toJsonMap (package:flutter/src/foundation/diagnostics.dart:1554:11)
#16 WidgetInspectorService._nodeToJson (package:flutter/src/widgets/widget_inspector.dart:1420:18)
#17 WidgetInspectorService._reportError (package:flutter/src/widgets/widget_inspector.dart:917:43)
#18 FlutterError.reportError (package:flutter/src/foundation/assertions.dart:903:14)
#19 BindingBase.registerServiceExtension.<anonymous closure> (package:flutter/src/foundation/binding.dart:538:22)
<asynchronous suspension>
#20 BindingBase.registerServiceExtension.<anonymous closure> (package:flutter/src/foundation/binding.dart)
#21 _runExtension (dart:developer-patch/developer.dart:86:23)
at Object.createErrorWithStack (dart_sdk.js:4075)
at Object._rethrow (dart_sdk.js:41760)
at async._AsyncCallbackEntry.new.callback (dart_sdk.js:41756)
at Object._microtaskLoop (dart_sdk.js:41616)
at _startMicrotaskLoop (dart_sdk.js:41622)
at dart_sdk.js:37798
There are two bugs: 1. This is a Flutter framework bug dealing with stack traces from eval expression. The likely fix is a change in package:flutter 2. Why did the layout explorer trigger an exception in the first place? Do you recall what you were doing that reproduced the issue?
I was just selecting a Column widget. I was developing DevTools on desktop MacOS. I then ran DevTools on Chrome to inspect the DevTools macos instance I was developing. I selected a Column widget from the UI I was building and kept getting this error.
I am getting this error consistently in my project right now.
Navigating to/from
Layout Explorer
seems to cause it, and changing widget in the tree view..
EDIT: Actually, nevermind. It seems to just happen constantly whenever I do anything in the Details Tree or the Widget Tree. And the Layout Explorer is not rendering at all.
When I clicked any widget from Flutter inspector, the same error always occured:
// from /usr/local/Caskroom/flutter/1.22.5/flutter/bin/cache/pkg/sky_engine/lib/core/uri.dart:1627
static Never _fail(String uri, int index, String message) {
throw FormatException(message, uri, index);
}
and the message said, "Invalid empty scheme".
My flutter doctor -v
:
[✓] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.7 19H15 darwin-x64, locale ko-KR)
• Flutter version 1.22.6 at /usr/local/Caskroom/flutter/1.22.5/flutter
• Framework revision 9b2d32b605 (3 weeks ago), 2021-01-22 14:36:39 -0800
• Engine revision 2f0af37152
• Dart version 2.10.5
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/home/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = /Users/home/Library/Android/sdk
• ANDROID_SDK_ROOT = /Users/home/Library/Android/sdk
• Java binary at: /Users/home/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/193.6626763/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 12.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
• CocoaPods version 1.10.0
It doens't look like normal behavior at all.
Is there a solution to this problem? I have also encountered this problem, using the mac
Unsuable for me on Mac running debug on an iOS device. Same issues as everyone above.
@doug-orchard What version of Flutter (and DevTools) are you using?
Can any body fix this? I am also involved in this problem. Layout inspector can't work .
This may be related: https://github.com/flutter/flutter/issues/115228. It was fixed by https://github.com/flutter/flutter/pull/115526 yesterday - can you try on Flutter master and see if you are still seeing the problem?