dioxus-cli version 0.6.3 randomizes server file name, making it impossible to configure firewall
Problem
In some environments, the firewall must always be on. This means each executable that wants to connect to the network in any way, must be manually allowed by the user by clicking a button. On some platforms, like "Windows Advanced Firewall", users cannot make any wildcard/regex rules, only exact path rules - so executable names must be predictable.
dioxus-cli version 0.6.3 now randomizes the server binary name by attaching some random text at the end of the file, just before executing it.
Here it is in task manager:
This means:
- firewall configurations do not work anymore, as the filename will change every rebuild.
- using "Windows Advanced Firewall", the user is bombarded with fullscreen modals like these:
Steps To Reproduce
Steps to reproduce the behavior:
dx --version --> dioxus 0.6.3 (fc1f1c2)dx new, full stack = yes, platform = webdx serve --platform webgenerates different executable name every rebuild
Expected behavior
Execute from the same path every time.
Or, if really necessary, alternate between server.exe and server.exe-1 so the user only clicks "allow" twice. Through the "access denied because program open" windows-specific problem might be better solved by closing the old process before overwriting?
Screenshots
See above
Environment:
- Dioxus version: 0.6.3 + 0.6.2
- Rust version: 1.87 nightly
- OS info: Windows 11
- App platform: fullstack web
Questionnaire
Workaround
cargo binstall [email protected] --force -y
We only need unique names for the assets that get served. I believe the server name changes on windows so we can keep the old server running until the new bundle is fully built, but we can alternate between just two names instead of generating a unique name every time. This method would need to be modified
Would it make sense to use minimal proxy-server with a name that do not change between server rebuilds in development?
Probably not. I believe we just need to move the logic for shutting down the server and overwriting the binary so that they're together. The server executable could have the same name.
I am having the same problem with dioxus-cli 0.6.3. I tried creating a fix by changing the mentioned method, but i noticed that it no longer exist in main. I currently do not know if it is already fixed or where the exe name comes from.
Update: the issue seems to be fixed in 0.7.