-
Notifications
You must be signed in to change notification settings - Fork 484
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
Flet Client issue when compiled/ build and run for debugging and flutter module integration #3152
Comments
debug stepping through and comparing why it worked in the VM situation has surfaced a solution. So in both the WSL2 and the VM instances one can force the correct operation of the client using NOTE: BE AWARE that only the window that resulted from the This I think with clarification in documentation this usage fix is acceptable for now as one can work with it. However for the backlog a simpler debug configuration with reduction of the 2 Flet GUI pages to 1 may be worth considering. This together with the noisy log in flet/client with |
https://github.com/flet-dev/flet/blob/main/CONTRIBUTING.md#restartingrebuilding
You actually don't have to do this. As seen from the above contribution file, the command to be run has |
Description
I believe there is an issue when building the
flet/client
for debugging the flet client. It particularly makes it very difficult for further flutter module development in a Linux WSL2 distro.This issue has been discussed in #2535 where I thought I was just lacking documentation and now I wish to document my understanding of the issue and assist resolving,
NOTE in the additional information I was able to get a VM based instance to build and operate as intended but required a remote ssh session from the VM host to the VM. whilst this could enable current development requirements I believe it should work in the WSL2 instance for general use and simple IDE operation ( please see additional information below)
Code and method example to reproduce the issue:
DEBUG build
flutter run-d linux --debug
in terminal 1sdk/python/playground
export FLET_VIEW_PATH=$HOME/dev/SANDBOX/SANDBOX-flet/modules/flet/client/build/linux/x64/debug/bundle
poetry run flet run main.py -p 8550
In contrast, if I build the client with the profiling profile
PROFILING build
flutter run -d linux --profile
in terminal 1sdk/python/playground
export FLET_VIEW_PATH=$HOME/dev/SANDBOX/SANDBOX-flet/modules/flet/client/build/linux/x64/profile/bundle
poetry run flet run main.py -p 8550
the very simple
main.py
page definition is in theflet/sdk/python/playground
and reads as followsDescribe the results you received:
see above
Describe the results you expected:
I expect in the WSL2 environment that the page presented in Linux GDI should be drawn and have the hot reloading working for debugging the flutter module integration when using the debug build of a Flet client.
Additional information you deem important (e.g. issue happens only occasionally):
In the logging in terminal 2 i have noticed a slight difference in the socket connection
The line
flutter: Connected to: 127.0.0.1:8550
does not appear in the attempt to run the debugging buildin the case of the profiling build
and in the case of the debugging build
additionally I setup a virtual box vm with ubuntu22.04 desktop and have had the same issue, except with 1 working solution
If i ssh into the vm and execute the following it works
export FLET_VIEW_PATH=$HOME/dev/SANDBOX/SANDBOX-flet/modules/flet/client/build/linux/x64/debug/bundle
poetry run flet run main.py -p 8550
flutter run --debug
) also updates. Both pages draw identicallyFlet version (
pip show flet
):Give your
requirements.txt
file (don'tpip freeze
, instead give direct packages):Operating system:
WSL2 ubuntu 22.04 distro on Windows 11
Additional environment details:
The text was updated successfully, but these errors were encountered: