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

program exited when run example in flet.WEB_BROWSER mode, press Keyboard Enter key #314

Closed
scriptiot-dev opened this issue Sep 12, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@scriptiot-dev
Copy link

scriptiot-dev commented Sep 12, 2022

any example test in flet.WEB_BROWSER will crash when press Keyboard Enter key

2022-09-12 22:56:44,287     INFO [                  flet.py  _start_flet_server   274] Starting local Flet Server on port 52039...
2022-09-12 22:56:44,287     INFO [                  flet.py  _start_flet_server   275] Attached process: True
2022-09-12 22:56:44,310     INFO [                  flet.py  _start_flet_server   283] Flet Server found in: C:\Users\dragondjf\AppData\Local\Programs\Python\Python38\lib\site-packages\flet\bin\fletd.exe
2022-09-12 22:56:44,310     INFO [                  flet.py  _start_flet_server   325] Web renderer configured: canvaskit
2022-09-12 22:56:44,310     INFO [                  flet.py  _start_flet_server   329] Route URL strategy configured: hash
2022-09-12 22:56:44,320     INFO [reconnecting_websocket.py       _connect_loop    83] Connecting Flet Server at ws://127.0.0.1:52039/ws...
INFO[2022-09-12T22:56:44+08:00] Using in-memory cache
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.

[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production. - using env:   export GIN_MODE=release
 - using code:  gin.SetMode(gin.ReleaseMode)

[GIN-debug] GET    /ws                       --> github.com/flet-dev/flet/server/server.Start.func1 (4 handlers)
[GIN-debug] GET    /api/                     --> github.com/flet-dev/flet/server/server.Start.func2 (4 handlers)
[GIN-debug] GET    /api/oauth/github         --> github.com/flet-dev/flet/server/server.githubAuthHandler (4 handlers)
[GIN-debug] GET    /api/oauth/azure          --> github.com/flet-dev/flet/server/server.azureAuthHandler (4 handlers)
[GIN-debug] GET    /api/oauth/google         --> github.com/flet-dev/flet/server/server.googleAuthHandler (4 handlers)
[GIN-debug] GET    /api/auth/signout         --> github.com/flet-dev/flet/server/server.signoutHandler (4 handlers)
[GIN-debug] PUT    /api/upload               --> github.com/flet-dev/flet/server/server.uploadFileAsStream (4 handlers)
INFO[2022-09-12T22:56:44+08:00] Starting server on :52039
INFO[2022-09-12T22:56:44+08:00] Starting background tasks...
INFO[2022-09-12T22:56:44+08:00] Start background task to cleanup expired data
2022-09-12 22:56:44,524     INFO [                  flet.py_on_ws_failed_connect   248] Failed to connect: ws://127.0.0.1:52039/ws
2022-09-12 22:56:44,524     INFO [reconnecting_websocket.py       _connect_loop   100] Reconnecting Flet Server in 0.1 seconds
2022-09-12 22:56:44,625     INFO [reconnecting_websocket.py       _connect_loop    83] Connecting Flet Server at ws://127.0.0.1:52039/ws...
INFO[2022-09-12T22:56:44+08:00] New WebSocket client connected from 127.0.0.1: 0ccd5794-5245-42df-9204-9ae537a9b17b
[GIN] 2022/09/12 - 22:56:44 | 200 |       555.5µs |       127.0.0.1 | GET      "/ws"  
2022-09-12 22:56:44,627     INFO [reconnecting_websocket.py            _on_open    53] Successfully connected to ws://127.0.0.1:52039/ws
INFO[2022-09-12T22:56:44+08:00] registerHostClient()
INFO[2022-09-12T22:56:44+08:00] Registering Host client: 0ccd5794-5245-42df-9204-9ae537a9b17b
INFO[2022-09-12T22:56:44+08:00] Registering host client 0ccd5794-5245-42df-9204-9ae537a9b17b to handle 'p/index' sessions
2022-09-12 22:56:45,320     INFO [                  flet.py                 app   114] App URL: http://127.0.0.1:52039
2022-09-12 22:56:45,321     INFO [                  flet.py                 app   125] Connected to Flet app and handling user sessions...
[GIN] 2022/09/12 - 22:56:45 | 200 |       511.3µs |       127.0.0.1 | GET      "/"
[GIN] 2022/09/12 - 22:56:46 | 200 |       538.5µs |       127.0.0.1 | GET      "/flutter.js"
[GIN] 2022/09/12 - 22:56:46 | 200 |       538.5µs |       127.0.0.1 | GET      "/icons/loading-animation.png"
[GIN] 2022/09/12 - 22:56:46 | 200 |            0s |       127.0.0.1 | GET      "/flutter_service_worker.js?v=22575083"
[GIN] 2022/09/12 - 22:56:46 | 301 |            0s |       127.0.0.1 | GET      "/index.html"
[GIN] 2022/09/12 - 22:56:46 | 200 |            0s |       127.0.0.1 | GET      "/manifest.json"
[GIN] 2022/09/12 - 22:56:46 | 200 |            0s |       127.0.0.1 | GET      "/assets/FontManifest.json"
[GIN] 2022/09/12 - 22:56:46 | 200 |            0s |       127.0.0.1 | GET      "/assets/AssetManifest.json"
[GIN] 2022/09/12 - 22:56:46 | 200 |       504.2µs |       127.0.0.1 | GET      "/favicon.png"
[GIN] 2022/09/12 - 22:56:46 | 200 |      5.8603ms |       127.0.0.1 | GET      "/main.dart.js"
[GIN] 2022/09/12 - 22:56:46 | 200 |       201.3µs |       127.0.0.1 | GET      "/"
[GIN] 2022/09/12 - 22:56:46 | 200 |       439.6µs |       127.0.0.1 | GET      "/icons/icon-192.png"
[GIN] 2022/09/12 - 22:56:46 | 200 |      2.9022ms |       127.0.0.1 | GET      "/main.dart.js"
[GIN] 2022/09/12 - 22:56:47 | 200 |            0s |       127.0.0.1 | GET      "/assets/FontManifest.json"
[GIN] 2022/09/12 - 22:56:47 | 200 |      3.1548ms |       127.0.0.1 | GET      "/assets/fonts/MaterialIcons-Regular.otf"
INFO[2022-09-12T22:56:47+08:00] New WebSocket client connected from 127.0.0.1: a892e0f9-76e2-48bf-a3d7-fb9cbc600e40
[GIN] 2022/09/12 - 22:56:47 | 200 |      1.0792ms |       127.0.0.1 | GET      "/ws"
INFO[2022-09-12T22:56:47+08:00] registerWebClient()
INFO[2022-09-12T22:56:47+08:00] Registering Web client: a892e0f9-76e2-48bf-a3d7-fb9cbc600e40
INFO[2022-09-12T22:56:47+08:00] Registering Web client a892e0f9-76e2-48bf-a3d7-fb9cbc600e40 to session p/index:3a3ba799-9b2e-4cd0-a1ae-961164931d67
2022-09-12 22:56:47,349     INFO [                  flet.py  on_session_created   213] Session started: 3a3ba799-9b2e-4cd0-a1ae-961164931d67
1   
INFO[2022-09-12T22:56:55+08:00] Exiting WebSocket read loop
INFO[2022-09-12T22:56:55+08:00] Exiting WebSocket write loop
INFO[2022-09-12T22:56:55+08:00] Unregistering Host client 0ccd5794-5245-42df-9204-9ae537a9b17b (0 sessions)
INFO[2022-09-12T22:56:55+08:00] Unregistering host client 0ccd5794-5245-42df-9204-9ae537a9b17b from 'p/index' page
INFO[2022-09-12T22:56:55+08:00] Deleting page: p/index
INFO[2022-09-12T22:56:55+08:00] Parent process exited with code 0
INFO[2022-09-12T22:56:55+08:00] Shutting down server...
INFO[2022-09-12T22:56:55+08:00] Server exite

python process quit

@FeodorFitsner
Copy link
Contributor

While pressing Enter key where: terminal, browser window?
Could you give more context please: OS, python version, etc.?

@FeodorFitsner FeodorFitsner added the status: awaiting response Further information is requested label Sep 12, 2022
@scriptiot-dev
Copy link
Author

windows cmd or git bash is same

os: Windows 10
python3.8

gOTE1WCAxM.mp4

@FeodorFitsner
Copy link
Contributor

Alright, I see what you mean - thanks for providing a recording.
We are going to fix that in the next Flet release.

@FeodorFitsner FeodorFitsner added bug Something isn't working and removed status: awaiting response Further information is requested labels Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants