-
-
Notifications
You must be signed in to change notification settings - Fork 990
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
Bundled fullstack desktop apps don't work (Linux, Windows) #3689
Comments
#3693 should fix the CLI issue that was causing two server builds to be bundled instead of a server and desktop build.
You need to set the production url of your server in your main.rs so it doesn't try to connect to localhost: // Set the url of the server where server functions are hosted.
#[cfg(not(feature = "server"))]
dioxus::fullstack::prelude::server_fn::client::set_server_url("http://yourserverlocation"); ^ That snippet is taken from the fullstack desktop example |
Okay, I added this line, copied from the example:
This is a small step forward. Now, the echo server function works via But I don't want to use port 8080 all the time---how could I ever have more than one instance of my app? And in production (bundles), I want to choose a random free port and not worry about it at all, of course. How would I set up this? Server functions don't work when the app is run through a bundled AppImage. Typing something to echo results in
|
After you bundle the app with the CLI from #3693, you need to run both the server bundle and the desktop app seperately. The CLI should print the location of both near the end of the logs. If you want to change the port or IP the server is hosted on, you can set the |
So I will have to wait for a new release then? Will I still be able to simply say I noticed there is some default setup in Dioxus' PORT and IP variables are confusing. On |
#3701 fixes serving with
You will always need to set the server url manually with |
On android setting the production url results in Deserialization error, and setting it to just http://127.0.0.1:8080 with emulator results in:
as well. |
What do you mean with "production build"---a bundled app I create with |
Problem
I simply create a fullstack app with
dx new
, bundle it withdx bundle --platform desktop
on Linux and Windows. Neither the Linux AppImage nor Windows MSI nor Windows Setup work.Steps To Reproduce
Steps to reproduce the behavior:
dx new some_app
, choose fullstack.dx bundle --platform desktop
(Linux, Windows)Expected behavior
Actual behavior:
(Sorry, my Windows is German, but
AddrInUse
should be clear.)Environment:
desktop
There is probably a lot I can configure in
Dioxus.toml
, but the documentation is somewhat scattered, thebundle
sections are unclear to me, also I'm not sure how to write mymain
function properly. Currently it looks like this, I'm still toying around:The text was updated successfully, but these errors were encountered: