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_tools] Unhandled ArgumentError in TestCommand._parseTestArgument when path contains Windows reserved characters #191896
When running flutter test on Windows (or when target arguments are formatted with Windows paths), TestCommand._parseTestArgument parses target path arguments by calling Uri.file(filePart).
On Windows, Uri.file invokes _Uri._checkWindowsPathReservedCharacters, which disallows wildcard / glob characters (*, ?), redirection characters (<, >, |), quotes ("), or malformed colons. If a user specifies a glob or pattern that is not expanded by their shell (common on Windows cmd.exe or PowerShell, e.g. flutter test test/*_test.dart), Uri.file throws an ArgumentError: Invalid argument(s): Illegal character in path.
Because _parseTestArgument does not catch ArgumentError, the exception is unhandled and causes flutter_tools to crash with an unhandled tool crash report instead of exiting cleanly with a user-friendly ToolExit.
Reproduction
On Windows (or with Windows path parsing in tests), run:
flutter test"test/*_test.dart"
Actual Result:
Crash with ArgumentError: Invalid argument(s): Illegal character in path.
Expected Result:
Clean exit with ToolExit reporting invalid test path/target syntax.
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
[flutter_tools] Handle Windows reserved characters in test target path (
[flutter_tools] Handle Windows reserved characters in test target path (
[flutter_tools] Handle Windows reserved characters in test target path (
github-actions commentedon Oct 9, 2026
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.