devtools
devtools copied to clipboard
"Id does not exist." thrown when tapping in the layout explorer
When I tap any element in either the tree view, layout explorer or details tree the exception is thrown, this consistently happens in a project of mine, while I was able to reproduce it in a new project (flutter create .), but I'm not able to reproduce it now.
The IDE still navigates to the right place in the code even tough the exception is thrown.
This is caused by a single tap:
======== Exception caught by Flutter framework =====================================================
Id does not exist.
====================================================================================================
======== Exception caught by Flutter framework =====================================================
Id does not exist.
====================================================================================================
======== Exception caught by Flutter framework =====================================================
Id does not exist.
====================================================================================================
Non-consistently I always get thrown the full stack:
======== Exception caught by Flutter framework =====================================================
The following assertion was thrown during a service extension callback for "ext.flutter.inspector.getSelectedWidget":
Id does not exist.
When the exception was thrown, this was the stack:
#0 WidgetInspectorService.toObject (package:flutter/src/widgets/widget_inspector.dart:1283:7)
#1 WidgetInspectorService._getSelectedWidget (package:flutter/src/widgets/widget_inspector.dart:1840:48)
#2 WidgetInspectorService._registerServiceExtensionWithArg.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:864:35)
#3 WidgetInspectorService._registerServiceExtensionWithArg.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:861:17)
#4 BindingBase.registerServiceExtension.<anonymous closure> (package:flutter/src/foundation/binding.dart:597:32)
...
====================================================================================================
Here is my flutter doctor -v
:
[√] Flutter (Channel stable, 2.0.3, on Microsoft Windows [Version 10.0.19041.546], locale it-IT)
• Flutter version 2.0.3 at C:\Users\Matthew\fvm\versions\stable
• Framework revision 4d7946a68d (2 days ago), 2021-03-18 17:24:33 -0700
• Engine revision 3459eb2436
• Dart version 2.12.2
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at D:/Tools/Coding/Android/Sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = D:\Tools\Coding\Android\Sdk
• ANDROID_SDK_ROOT = D:\Tools\Coding\Android\Sdk
• Java binary at: D:\Tools\Coding\JetBrains\Toolbox\apps\AndroidStudio\ch-0\201.6858069\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.7.6)
• Visual Studio at D:\Tools (x86)\Coding\Visual Studio\Community
• Visual Studio Community 2019 version 16.7.30611.23
• Windows 10 SDK version 10.0.19041.0
[√] Android Studio (version 4.1.0)
• Android Studio at D:\Tools\Coding\JetBrains\Toolbox\apps\AndroidStudio\ch-0\201.7042882
• 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
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] Android Studio
• Android Studio at D:\Tools\Coding\JetBrains\Toolbox\apps\AndroidStudio\ch-0\201.6858069
• 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
• android-studio-dir = D:\Tools\Coding\JetBrains\Toolbox\apps\AndroidStudio\ch-0\201.6858069
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] IntelliJ IDEA Ultimate Edition (version 2020.3)
• IntelliJ at D:\Tools\Coding\JetBrains\Toolbox\apps\IDEA-U\ch-0\203.7148.57
• Flutter plugin version 54.0.3
• Dart plugin version 203.7759
[√] Connected device (4 available)
• Redmi Note 9 Pro (mobile) • d424ac1a • android-arm64 • Android 10 (API 29)
• sdk gphone x86 64 (mobile) • emulator-5554 • android-x64 • Android 11 (API 30) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19041.546]
• Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.82
• No issues found!
Please let me know if I can provide more information!
@Hexer10 are you able to reproduce this in a reduced version of your app that you would be able to share with us?
This was reported at https://github.com/Dart-Code/Dart-Code/issues/3228 too. I don't know if it's a Dart-Code, DevTools or Flutter bug, but to keep everything in one place I'll close that as a dupe of this until there's more info (we can re-open it if it seems like VS Code's fault).
This was reported at Dart-Code/Dart-Code#3228 too. I don't know if it's a Dart-Code, DevTools or Flutter bug, but to keep everything in one place I'll close that as a dupe of this until there's more info (we can re-open it if it seems like VS Code's fault).
I'm trying to narrow down the issue in my project, but it's a rather big codebase. Tough I don't thing is a IDE specific issue, since I'm getting the error on Intellij IDEA.
I also have the same issue. it is not and IDE issue because I am using Android studio and I get the same error.
======== Exception caught by Flutter framework =====================================================
The following assertion was thrown during a service extension callback for "ext.flutter.inspector.setSelectionById":
Id does not exist.
When the exception was thrown, this was the stack:
#0 WidgetInspectorService.toObject (package:flutter/src/widgets/widget_inspector.dart:1283:7)
#1 WidgetInspectorService.setSelectionById (package:flutter/src/widgets/widget_inspector.dart:1345:25)
#2 WidgetInspectorService._registerServiceExtensionWithArg.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:864:35)
#3 WidgetInspectorService._registerServiceExtensionWithArg.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:861:17)
#4 BindingBase.registerServiceExtension.<anonymous closure> (package:flutter/src/foundation/binding.dart:597:32)
...
====================================================================================================
Got Error in my project too.
======== Exception caught by Flutter framework =====================================================
The following assertion was thrown during a service extension callback for "ext.flutter.inspector.getSelectedWidget":
Id does not exist.
When the exception was thrown, this was the stack:
#0 WidgetInspectorService.toObject (package:flutter/src/widgets/widget_inspector.dart:1283:7)
#1 WidgetInspectorService._getSelectedWidget (package:flutter/src/widgets/widget_inspector.dart:1841:48)
#2 WidgetInspectorService._registerServiceExtensionWithArg.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:864:35)
#3 WidgetInspectorService._registerServiceExtensionWithArg.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:861:17)
#4 BindingBase.registerServiceExtension.<anonymous closure> (package:flutter/src/foundation/binding.dart:597:32)
...
====================================================================================================
I got this error because of nesting GridView
inside SingleChildScrollView
Same Issue
====================================================================================================
======== Exception caught by Flutter framework ===================================================== The following assertion was thrown during a service extension callback for "ext.flutter.inspector.getProperties": Id does not exist.
When the exception was thrown, this was the stack:
#0 WidgetInspectorService.toObject (package:flutter/src/widgets/widget_inspector.dart:1302:7)
#1 WidgetInspectorService._getProperties (package:flutter/src/widgets/widget_inspector.dart:1592:35)
#2 WidgetInspectorService._registerServiceExtensionWithArg. (package:flutter/src/widgets/widget_inspector.dart:869:35)
#3 WidgetInspectorService._registerServiceExtensionWithArg. (package:flutter/src/widgets/widget_inspector.dart:866:17)
#4 BindingBase.registerServiceExtension. (package:flutter/src/foundation/binding.dart:604:32)
@jacob314
I encounter the same error too, i'm using VSCode and debugging the Flutter app using in-browser Flutter DevTools.
I'm seeing this in Flutter 2.8.0
logs
======== Exception caught by Flutter framework =====================================================
The following assertion was thrown during a service extension callback for "ext.flutter.inspector.getProperties":
Id does not exist.
When the exception was thrown, this was the stack:
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 251:49 throw_
packages/flutter/src/widgets/widget_inspector.dart 1297:7 toObject
packages/flutter/src/widgets/widget_inspector.dart 1587:35 [_getProperties]
packages/flutter/src/widgets/widget_inspector.dart 867:35 <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54 runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5 _async
packages/flutter/src/widgets/widget_inspector.dart 864:38 <fn>
packages/flutter/src/foundation/binding.dart 602:32 <fn>
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 45:50 <fn>
dart-sdk/lib/async/zone.dart 1687:54 runUnary
dart-sdk/lib/async/future_impl.dart 160:18 handleValue
dart-sdk/lib/async/future_impl.dart 767:44 handleValueCallback
dart-sdk/lib/async/future_impl.dart 796:13 _propagateToListeners
dart-sdk/lib/async/future_impl.dart 593:7 [_complete]
dart-sdk/lib/async/future.dart 390:15 <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/isolate_helper.dart 48:19 internalCallback
@johnpryan Same here with Flutter 2.8
======== Exception caught by Flutter framework =====================================================
The following assertion was thrown during a service extension callback for "ext.flutter.inspector.getProperties":
Id does not exist.
When the exception was thrown, this was the stack:
#0 WidgetInspectorService.toObject (package:flutter/src/widgets/widget_inspector.dart:1297:7)
#1 WidgetInspectorService._getProperties (package:flutter/src/widgets/widget_inspector.dart:1587:35)
#2 WidgetInspectorService._registerServiceExtensionWithArg.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:867:35)
#3 WidgetInspectorService._registerServiceExtensionWithArg.<anonymous closure> (package:flutter/src/widgets/widget_inspector.dart:864:17)
#4 BindingBase.registerServiceExtension.<anonymous closure> (package:flutter/src/foundation/binding.dart:602:32)
<asynchronous suspension>
====================================================================================================
I got the same error when open widget inspector with vscode.
═══════ Exception caught by Flutter framework ═════════════════════════════════
The following assertion was thrown during a service extension callback for "ext.flutter.inspector.getProperties":
Id does not exist.
When the exception was thrown, this was the stack
#0 WidgetInspectorService.toObject
package:flutter/…/widgets/widget_inspector.dart:1297
#1 WidgetInspectorService._getProperties
package:flutter/…/widgets/widget_inspector.dart:1587
#2 WidgetInspectorService._registerServiceExtensionWithArg.<anonymous closure>
package:flutter/…/widgets/widget_inspector.dart:867
#3 WidgetInspectorService._registerServiceExtensionWithArg.<anonymous closure>
package:flutter/…/widgets/widget_inspector.dart:864
#4 BindingBase.registerServiceExtension.<anonymous closure>
package:flutter/…/foundation/binding.dart:602
<asynchronous suspension>
════════════════════════════════════════════════════════════════════════════════
════════ Exception caught by Flutter framework ═════════════════════════════════
Id does not exist.
════════════════════════════════════════════════════════════════════════════════
flutter doctor
╔════════════════════════════════════════════════════════════════════════════╗
║ A new version of Flutter is available! ║
║ ║
║ To update to the latest version, run "flutter upgrade". ║
╚════════════════════════════════════════════════════════════════════════════╝
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.8.0, on macOS 12.1 21C52 darwin-x64, locale
en-CN)
[!] Android toolchain - develop for Android devices (Android SDK version 27.0.3)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ 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 13.2.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 3.0)
[✓] VS Code (version 1.63.2)
[✓] Connected device (3 available)
! Doctor found issues in 1 category.
2.8.1 the same.
➜ ~ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.8.1, on macOS 12.1 21C52 darwin-x64, locale
en-AD)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 13.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.63.2)
[✓] Connected device (2 available)
! Error: iPad (Vitalii) is not paired with your computer. To use iPad
(Vitalii) with Xcode, unlock it and choose to trust this computer when
prompted. (code -9)
• No issues found!
Bump, same error, but not getting it always. Hot restarting sometimes restarts without errors and sometimes restarts with "Id does not exist." spam. Does not seem to be related to a specific app, hence no sample app code provided by me. Maybe a race condition somewhere?
flutter pub global activate devtools
i tried this and restarted the project and the error disappears so just have to go to the root directory of the project and execute this
DevTools hasn't been shipped on pub in quite some time now. The supported way to launch DevTools from the CLI is with dart devtools
. It would be great to see if this reproduces on the latest version of Flutter (latest stable is 3.0.5, and you'll see the DevTools version in the flutter --version
output when you are on a newer version of Flutter).
Same thing happened to me. I did the following and fixed:
Delete .dart_tool and build folders flutter clean flutter pub global activate devtools flutter pub get restart android studio
Fixed after restarting Android Studio.
Without additional information we're not able to resolve this issue, so it will be closed at this time. You're still free to add more info and respond to any questions above, though. We'll reopen the case if you do. Thanks for your contribution!
same issue https://github.com/flutter/flutter-intellij/issues/6905
Reopening this since it seems like this was erroneously closed the be cleanup bot
Without additional information we're not able to resolve this issue, so it will be closed at this time. You're still free to add more info and respond to any questions above, though. We'll reopen the case if you do. Thanks for your contribution!
@CoderDake could you fix the bot? It constantly closing the issue
oops yes thank you for bringing that to my attention :) Should be fixed now