Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows CI Test Error: An escape sequence starting with '\u' must be followed by 4 hexadecimal digits. #2176

Closed
buenaflor opened this issue Jan 23, 2024 · 4 comments · Fixed by #2177

Comments

@buenaflor
Copy link

buenaflor commented Jan 23, 2024

Environment: Github Actions
Dart SDK: version 3.2.5, stable
OS: Windows

Steps to reproduce

  • Create a folder that starts with u in the test folder. e.g utils so it looks something like test/utils/my_test.dart
    • Or create a test file that starts with u. e.g unsupported_throwables_test.dart
  • Run a test on windows-latest with GH actions
dart test -p chrome --test-randomize-ordering-seed=random --chain-stack-traces
# or
dart test -p vm  --test-randomize-ordering-seed=random --chain-stack-traces
  • Receive error:
/C:/Users/runneradmin/AppData/Local/Temp/dart_test_2615570/runInBrowser.dart:8:61:
Error: An escape sequence starting with '\u' must be followed by 4 hexadecimal digits.
          dom.window.console.log('Startup for test path test\unsupported_throwables_test.dart');

or

/C:/Users/runneradmin/AppData/Local/Temp/dart_test_74c18bb9/runInBrowser.dart:8:61:
Error: An escape sequence starting with '\u' must be followed by 4 hexadecimal digits.
          dom.window.console.log('Startup for test path test\utils\http_header_utils_test.dart');

Link to error

@sigmundch sigmundch transferred this issue from dart-lang/sdk Jan 24, 2024
@sigmundch
Copy link
Member

This appears like an issue in the test runner, but I'm not certain. Transferring to the test repo for additional triage

cc @natebosch

@natebosch
Copy link
Member

I would not expect this to repro with -p vm, but there is a clear problem with -p chrome.

natebosch added a commit that referenced this issue Jan 24, 2024
Fixes #2176

On windows a path can include a `\` followed by a letter that is not a
valid escape code in a Dart string. Prefix the string with `r` to make
it a raw string and log the path directly.
natebosch added a commit that referenced this issue Jan 24, 2024
Fixes #2176

On windows a path can include a `\` followed by a letter that is not a
valid escape code in a Dart string. Prefix the string with `r` to make
it a raw string and log the path directly.
@natebosch
Copy link
Member

@buenaflor - I have published a version with a fix for this issue - you should be able to get unblocked with a dart pub upgrade.

@buenaflor
Copy link
Author

all good now, thx for the quick fix! @natebosch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants