dioxus icon indicating copy to clipboard operation
dioxus copied to clipboard

dioxus-cli version 0.6.3 randomizes server file name, making it impossible to configure firewall

Open johnny-smitherson opened this issue 10 months ago • 3 comments

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.

Image

Here it is in task manager:

Image

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:
Image Image

Steps To Reproduce

Steps to reproduce the behavior:

  • dx --version --> dioxus 0.6.3 (fc1f1c2)
  • dx new, full stack = yes, platform = web
  • dx serve --platform web generates 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

johnny-smitherson avatar Feb 22 '25 19:02 johnny-smitherson

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

ealmloff avatar Feb 24 '25 15:02 ealmloff

Would it make sense to use minimal proxy-server with a name that do not change between server rebuilds in development?

MatiasHiltunen avatar Apr 13 '25 18:04 MatiasHiltunen

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.

DogeDark avatar Apr 14 '25 18:04 DogeDark

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.

Icekey avatar Aug 08 '25 22:08 Icekey