Skip to content

node.js responds nothing and even no error when executing *.js file which be stored in specific path with Non-ASCII characters since v22.5.0 #55773

@GitPopcorn

Description

@GitPopcorn

Version

v22.5.0

Platform

Microsoft Windows NT 10.0.19045.0 x64
Microsoft Windows NT 10.0.22631.0 x64

Subsystem

No response

What steps will reproduce the bug?

  1. Run a cmd.exe.
  2. Run command mkdir "D:\2024年11月"
  3. Run command echo console.log(123);>"D:\2024年11月\test.js"
  4. Run command node "D:\2024年11月\test.js"

How often does it reproduce? Is there a required condition?

It always happend as long as the path of script file is certain.

What is the expected behavior? Why is that the expected behavior?

The script file was completely launched and executed, print 123 in stdout or some other error in stderr.

What do you see instead?

No any response from node.exe, can not figure out what happened, and you will got a read ECONNRESET error if you run command to inspect like node inspect "D:\2024年11月\test.js"

Additional information

  1. This issue does not occur when I run a node.exe in v22.1.0, but does in almost all the versions after v22.5.0, include v22.11.0, v23.1.0. I have test it with several times of re-installations for node.exe in these versions.
  2. The issue is not related to the current page (CHCP/character set) of cmd.exe, neither the character set of script file.
  3. As shown in theses images, all the things happened just in one session of cmd, the only difference is the version of node.exe.
    Snipaste_2024-11-08_12-14-54
    Snipaste_2024-11-08_12-15-33

Activity

changed the title [-]node.js responds nothing and even no error when executing *.js file be stored in special path with Non-ASCII characters since v22.5.0[/-] [+]node.js responds nothing and even no error when executing *.js file which be stored in specific path with Non-ASCII characters since v22.5.0[/+] on Nov 8, 2024
aduh95

aduh95 commented on Nov 8, 2024

@aduh95
Contributor

Can you set NODE_DEBUG=* in your env and re-run it please? Also, please consider copying/pasting rather than sharing screenshots – screenshots can make things harder for folks using screen-readers, folks using a low-bandwidth internet, and makes it needlessly harder to copy/paste the output if I want to search through the codebase.

GitPopcorn

GitPopcorn commented on Nov 8, 2024

@GitPopcorn
Author

Can you set NODE_DEBUG=* in your env and re-run it please? Also, please consider copying/pasting rather than sharing screenshots – screenshots can make things harder for folks using screen-readers, folks using a low-bandwidth internet, and makes it needlessly harder to copy/paste the output if I want to search through the codebase.

Thanks for your reply, but I have to clarify that the screenshots is only for a intuitive display, the commands and step to reproduce the issue are all declared above.

And I have re-installed the Node.JS with version v22.5.0, set NODE_DEBUG=* and return the script, but nothing changed:

D:\>node -v
v22.5.0

D:\>mkdir "D:\2024年11月"

D:\>echo console.log(123);>"D:\2024年11月\test.js"

D:\>type "D:\2024年11月\test.js"
console.log(123);

D:\>set NODE_DEBUG=*

D:\>echo %NODE_DEBUG%
*

D:\>node "D:\2024年11月\test.js"

D:\>

D:\>mkdir "D:\2024▲11▲"

D:\>echo console.log(123);>"D:\2024▲11▲\test.js"

D:\>type "D:\2024▲11▲\test.js"
console.log(123);

D:\>set NODE_DEBUG=*

D:\>echo %NODE_DEBUG%
*

D:\>node "D:\2024▲11▲\test.js"

D:\>

I really think it's stable and easy to reproduce...

aduh95

aduh95 commented on Nov 8, 2024

@aduh95
Contributor

FWIW I cannot reproduce on macOS on main.

$ mkdir '2024年11月'
$ echo 'console.log(123)' > '2024年11月/index.js' 
$ ./node '2024年11月'
123

I have to clarify that the screenshots is only for a intuitive display

Sure, hopefully you'll agree that the text version does as good as a job at that, without the shortcoming of a screenshot :)

GitPopcorn

GitPopcorn commented on Nov 8, 2024

@GitPopcorn
Author

FWIW I cannot reproduce on macOS on main.

$ mkdir '2024年11月'
$ echo 'console.log(123)' > '2024年11月/index.js' 
$ ./node '2024年11月'
123

I have to clarify that the screenshots is only for a intuitive display

Sure, hopefully you'll agree that the text version does as good as a job at that, without the shortcoming of a screenshot :)

Ok, since this could not be reproduced in all environments, I would close this issue and do some more test in other envionment like WSL or remote Linux server before I submit again, thanks for your test, have a nice day 😃

aduh95

aduh95 commented on Nov 8, 2024

@aduh95
Contributor

We can also leave it open and see if someone with a Windows machine can reproduce (assuming it's Windows-related)

huseyinacacak-janea

huseyinacacak-janea commented on Nov 14, 2024

@huseyinacacak-janea
Contributor

I wasn't able to reproduce this issue with v22.5.0, v22.10.0, and v23.1.0 on Windows.

islandryu

islandryu commented on Nov 15, 2024

@islandryu
Member

I was able to reproduce this issue on my environment, so I will work on this.

added 2 commits that reference this issue on Nov 15, 2024
19f43e3
d0e4106
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @aduh95@GitPopcorn@islandryu@huseyinacacak-janea

      Issue actions

        node.js responds nothing and even no error when executing *.js file which be stored in specific path with Non-ASCII characters since v22.5.0 · Issue #55773 · nodejs/node