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
flutter run exits on hot reload when a build hook removes a generated asset #442
Hot reload ends the flutter run session when a build hook deletes a file in flutter_scene_generated/ that the tool had already listed. The tool collects the app's assets before the hook re-runs, then fails to copy the file the hook removed, and the app exits.
Application finished.
Flutter failed to copy .../flutter_scene_generated/texture.etc1s_cooked.ed4b3bc6.ktx2 to .../flutter_assets/flutter_scene_generated/texture.etc1s_cooked.ed4b3bc6.ktx2 due to source location error. The file or directory could not be found.
Any hook run that drops or replaces an output triggers it, for example deleting a source image the hook cooks, or switching a texture's buildTextures encoding (#433), which replaces its .fstex with a .ktx2.
Steps to reproduce (seen on macOS with Metal):
flutter run an app whose hook cooks a texture with buildTextures.
Delete that source image and remove it from the hook's textures list.
Press r.
The root cause is in the Flutter tool, which should list assets after hooks run and should not end the session over a failed asset copy. Until that's fixed upstream, we can keep a replaced output on disk for one more build so the reload that still lists it can copy it.
Once we have a minimal reproduction outside flutter_scene, we'll file an upstream Flutter issue and link it here.
Activity