You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[ Widget Preview ] Crash when .dart_tool/widget_preview_scaffold/.dart_tool doesn't exist on subsequent runs #178660
This can happen if flutter widget-preview start is interrupted or flutter pub get isn't run in the widget_preview_scaffold project when it's first initialized.
Example Logs
StateError: Bad state: Could not determine run package name. Project path "/private/var/folders/_y/rdj_3wtj5mbbtf6syy_2cw6800d8lv/T/flutter_widget_preview_test.HHIWrz/.dart_tool/widget_preview_scaffold/" did not occur as package root in package config "/private/var/folders/_y/rdj_3wtj5mbbtf6syy_2cw6800d8lv/T/flutter_widget_preview_test.HHIWrz/.dart_tool/package_config.json". Please report a reproduction on https://github.com/flutter/flutter/issues/169475.
```console
#0 DartBuild.build (package:flutter_tools/src/build_system/targets/native_assets.dart:50:7)
<asynchronous suspension>
#1 _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:915:9)
<asynchronous suspension>
#2 FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:662:16)
<asynchronous suspension>
#3 FlutterHookRunnerNative.runHooks (package:flutter_tools/src/build_system/targets/hook_runner_native.dart:30:35)
<asynchronous suspension>
#4 ResidentWebRunner._updateDevFS (package:flutter_tools/src/isolated/resident_web_runner.dart:760:28)
<asynchronous suspension>
#5 ResidentWebRunner.run.<anonymous closure> (package:flutter_tools/src/isolated/resident_web_runner.dart:324:41)
<asynchronous suspension>
#6 asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:108:24)
<asynchronous suspension>
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
[ Widget Preview ] Fix crash when `widget_preview_scaffold/.dart_tool…
[ Widget Preview ] Fix crash when `widget_preview_scaffold/.dart_tool…
[ Widget Preview ] Fix crash when `widget_preview_scaffold/.dart_tool…
[ Widget Preview ] Fix crash when `widget_preview_scaffold/.dart_tool…
[ Widget Preview ] Fix crash when `widget_preview_scaffold/.dart_tool…
github-actions commentedon Dec 1, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.[ Widget Preview ] Fix crash when `widget_preview_scaffold/.dart_tool…
[ Widget Preview ] Fix crash when `widget_preview_scaffold/.dart_tool…
[ Widget Preview ] Fix crash when `widget_preview_scaffold/.dart_tool…