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

Cannot create a file when that file already exists. #716

Closed
4 tasks done
hosseinkhojany opened this issue Jul 15, 2023 · 20 comments
Closed
4 tasks done

Cannot create a file when that file already exists. #716

hosseinkhojany opened this issue Jul 15, 2023 · 20 comments
Labels
bug Something isn't working

Comments

@hosseinkhojany
Copy link

hosseinkhojany commented Jul 15, 2023

Welcome

  • Yes, I'm using the latest major release. Only such installations are supported.
  • Yes, I'm using the latest Golang release. Only such installations are supported.
  • Yes, I've searched similar issues on GitHub and didn't find any.
  • Yes, I've included all information below (version, FULL config, FULL log, etc).

Description of the problem

Network adapter interface not generating in windows 10 , 8 ,7 but it work correctly in windows 11

After the below error is printed, if you try again, singbox making the adapter successfully, but it takes about 15 seconds to print this error

SingBox FATAL[0016] start service: initialize inbound/tun[tun-in]: configure tun interface: Cannot create a file when that file already exists.

Version of sing-box

$ sing-box version
sing-box version 1.3-beta11

Environment: go1.20.3 windows/amd64
Tags: with_gvisor,with_quic,with_wireguard,with_utls,with_reality_server,with_clash_api
Revision: e02317a34851617c0eb2cb6634b4b62901aa04dc
CGO: disabled

Server and client configuration file

# asdg

Server and client log file

# dsafsadg
@hosseinkhojany
Copy link
Author

I tested on last major but have this issue

@nekohasekai nekohasekai added the bug Something isn't working label Jul 18, 2023
@hosseinkhojany
Copy link
Author

hosseinkhojany commented Jul 19, 2023

I found a solution for this, changing the interface_name solves the problem, you just need to change the interface_name every time, before starting the tunnel.

@Sp1ke47
Copy link

Sp1ke47 commented Jul 22, 2023

Same for most GUI clients using singbox as core like NekoRay and V2rayN. In some situations like startup after a former accidental quit, the previous network interface isn't removed automatically. Sometimes more restarts are needed do the trick.

@zhouxinghong
Copy link

I found a solution for this, changing the interface_name solves the problem, you just need to change the interface_name before starting the tunnel.

May I ask which interface name needs to be modified, for example: V2rayN tool

@zhouxinghong
Copy link

zhouxinghong commented Aug 1, 2023

This error occurs very frequently in clients.

@Totoro-Li
Copy link

Any progress on this? More than 1 month and this issue gets reflected in all downstream proxy projects.

@hosseinkhojany
Copy link
Author

hosseinkhojany commented Aug 9, 2023

@zhouxinghong
Copy link

@zhouxinghong interface_name in the singbox config https://sing-box.sagernet.org/configuration/inbound/tun/#interface_name

Thank you very much! 👍

@Zhopeful88
Copy link

@zhouxinghong interface_name in the singbox config https://sing-box.sagernet.org/configuration/inbound/tun/#interface_name

I can not find the config on sinbox folder,and it should be on the where folder?

@hosseinkhojany
Copy link
Author

What client are you using?
@Zhopeful88

@Zhopeful88
Copy link

What client are you using? @Zhopeful88

Windows /V2RyaN ,if not use the Tun,WhatsApp can not chat,if open the tun,WhatsApp was ok,but ins , fb and other
many website can''t open,I test just amazon and other one could be open (had not test more)

@Zhopeful88
Copy link

What client are you using? @Zhopeful88

I had find config.json files,but can't modification the name,like me change the name like the "-tun1",but if I open the Tun model,the name will be changed the "*-tun"

@hosseinkhojany
Copy link
Author

hosseinkhojany commented Aug 13, 2023

why not start singbox manually with cmd in windows ?
singbox.exe run -c config.json

@Zhopeful88
Copy link

Had test,this will appear on next time

@hosseinkhojany
Copy link
Author

hosseinkhojany commented Aug 14, 2023

You have to change the interface_name each time
If you are familiar with Python or any scripting language, you can easily write a program that automatically changes the interface_name every time.

@Zhopeful88
Copy link

You have to change the interface_name each time If you are familiar with Python or any scripting language, you can easily write a program that automatically changes the interface_name every time.

I just have the VS IDE,but if I change the name on the congfig files ,Tun on TUN,the name will reset

@Zhopeful88
Copy link

Same for most GUI clients using singbox as core like NekoRay and V2rayN. In some situations like startup after a former accidental quit, the previous network interface isn't removed automatically. Sometimes more restarts are needed do the trick.

Yes,I thinks so this,I had see on V2rayN github,the some one tell me add one remove function when open TUN,check it first,if exist ,remove it ,and open later,but the Devcon name was not consistent,I had not time to test it

@Gasconyman
Copy link

Has anyone found a solution for this problem? I am using v2rayN on windows 10, there is no config file in the Singbox directory to change the tunnel name.

@Zhopeful88
Copy link

Has anyone found a solution for this problem? I am using v2rayN on windows 10, there is no config file in the Singbox directory to change the tunnel name.

Yes。I found it,and now ,I used the nekoray 3.16 was ok!3.17 use the latest sing-box was have some bug

@nekohasekai
Copy link
Member

Since this is an issue caused by a third-party application, we will not discuss it any further.

@nekohasekai nekohasekai closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2023
@SagerNet SagerNet locked as too heated and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants