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

fix(dev): use fs.statsSync to determine existence of socket path #2362

Closed
wants to merge 1 commit into from

Conversation

chengzhuo5
Copy link

@chengzhuo5 chengzhuo5 commented Apr 15, 2024

πŸ”— Linked issue

#1115
nuxt/nuxt#15164

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

In #1115, use accessSync to ensure socketPath exists. However, in some special file systems (such as the sandbox provided by security software), accessSync cannot determine whether the socketPath exists and will block dev server, but statsSync can determine correctly.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

… existence of socket path

In some special file systems (such as the sandbox provided by security software), accessSync cannot determine whether the socketPath exists, but statsSync can.

Signed-off-by: MinarKotonoha <chengzhuo5@qq.com>
@pi0
Copy link
Member

pi0 commented Apr 15, 2024

Thanks for PR.

(such as the sandbox provided by security software

Can you please elaborate more which security software? I need to reproduce.

@chengzhuo5
Copy link
Author

Thanks for PR.

(such as the sandbox provided by security software

Can you please elaborate more which security software? I need to reproduce.

This is a sandbox software named DataCloak, which can only be used by the enterprise that purchased it, so you cannot reproduce this issue.

DataCloak on Windows will use the Windows Filtering Platform driver to take over any IO operations. When fs.accessSync("\\?\pipe\" or "\\.\pipe\") is called, DataCloak looks for it from the file system, but apparently it doesn't exist.

@pi0
Copy link
Member

pi0 commented Apr 16, 2024

Thanks for the explanation dear @chengzhuo5. It seems a bug/issue with this protection software and if widely unsolvable, we might propose fixes to lower-level layers (Node.js).

I would suggest that you contact them (i also submitted a request pointing to this PR) about it maybe they have some explanation or consider fixing it. A simpler Node.js script to reproduce might give them better context.

I have made two relevant trackers also, let's see what comes first:

@pi0 pi0 closed this Apr 16, 2024
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 this pull request may close these issues.

None yet

2 participants