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

[Bug]: Emoji added in any test title causes the ui to hang on Windows #29606

Open
HardCodr opened this issue Feb 22, 2024 · 4 comments
Open

[Bug]: Emoji added in any test title causes the ui to hang on Windows #29606

HardCodr opened this issue Feb 22, 2024 · 4 comments
Labels
upstream This is a bug in something playwright depends on, like a browser.

Comments

@HardCodr
Copy link

Version

latest

Steps to reproduce

On a Windows 11 machine:

  1. Create a test and add any emoji inside the description
await test("🖥️  some test", () => { expect(true).toBe(true) });
  1. Open playwright in --ui mode
  2. Run the test

Expected behavior

  1. Test should finish execution
  2. UI should be responsive

Actual behavior

  1. Test hangs at "After Hooks"
  2. UI is unusable

Additional context

I added emojis to my tests to have a visual distinction between tests. I love the playwright ui but having 100+ tests makes it a bit difficult to me to distinguish between the categories of API tests and regular tests.

Environment

Any Windows 11 machine (might happen on Windows 10 - haven't tested)
@yury-s yury-s self-assigned this Feb 22, 2024
@yury-s yury-s added the v1.43 label Feb 22, 2024
@yury-s
Copy link
Member

yury-s commented Feb 28, 2024

This boils down to a bug in Node.js related to emojis in file names on Windows: nodejs/node#48673. Playwright tries to write a trace into a file that contains "example-🖥️-some-test" in its path and fs.mkdirSync just hangs.

@yury-s
Copy link
Member

yury-s commented Feb 28, 2024

@HardCodr the problem is already fixed in Node v21.6.2, but apparently Node.js team is reluctant to backport the fix to LTS versions.

@vladimirp5
Copy link

Awesome! Thank you for your input!

@yury-s yury-s added v1.43 and removed v1.43 labels Feb 28, 2024
@yury-s
Copy link
Member

yury-s commented Feb 28, 2024

We could probably santitize some emoji symbols in the file names to mitigate the problem. There are multiple RegExp unicode char classes that we could match with something like /\p{Emoji}/gu.test("🖥️ some test"):

  • Emoji
  • Emoji_Presentation
  • Emoji_Modifier
  • Emoji_Modifier_Base
  • Emoji_Component

Considering that Windows filesystem properly handles all of the characters in the file names and that there is just one report so far, we'd rather wait for the Node.js fix to be rolled out.

@yury-s yury-s removed their assignment Feb 28, 2024
@yury-s yury-s added upstream This is a bug in something playwright depends on, like a browser. and removed v1.43 labels Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream This is a bug in something playwright depends on, like a browser.
Projects
None yet
Development

No branches or pull requests

3 participants