You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the opened issues and there are no duplicates
Describe the bug
I tried running a simple flet dynamic web app on a Raspberry Pi 4b (fresh install).
EDIT: same results when doing this on Ubuntu Server on an amd64 host.
Uvicorn runs the app with uvicorn test:app --port 8000 --host 0.0.0.0 but when i try to visit the app in a browser of another device in my local network the app gets stuck at loading (endless spinning indicator).
Firefox inspector shows Uncaught : WebSocketChannelException: WebSocket connection failed. main.dart.js:3855:19
and Firefox can’t establish a connection to the server at ws://192.168.0.61:8000/flet-app/ws.
all other GET requests receive response status code 200
there is no firewalll running on the host
uvicorn shows the 200 codes on opening/reloading the page and shows no issues.
i installed flet via pip install flet[all]
OS: Rasperry Pi OS (64bit Lite Bookworm / 64bit Lite Bullseye legacy)
i have no clue but i did not find anything about anyone hosting a flet app on an Raspberry Pi either besides @FeodorFitsner mentioning that flet does not run on the 32bit ones in an old issue.
run any flet app on Raspberry Pi OS 64 lite (Bookworm or legacy Bullseye)
e.g. uvicorn test:app --port 8000 --host 0.0.0.0
Expected behavior
the app should load in browser
Screenshots / Videos
Captures
[Upload media here]
Operating System
Raspberry Pi OS Lite
Operating system details
Raspberry Pi OS (Lite/Desktop) (64-bit) Bookworm|Bullseye (legacy),
Raspberry Pi 4b / arm64
Flet version
0.26.0
Regression
No, it isn't
Suggestions
No response
Logs
Additional details
browser log
`Exception while loading service worker: Error: Service Worker API unavailable.
The current context is NOT secure.
Read more: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts
loadServiceWorker http://192.168.0.61:8000/flutter_bootstrap.js:3
load http://192.168.0.61:8000/flutter_bootstrap.js:3 http://192.168.0.61:8000/flutter_bootstrap.js:13
flutter_bootstrap.js:3:3905
Injecting <script> tag. Using callback. flutter_bootstrap.js:1:1846
WEBGL_debug_renderer_info is deprecated in Firefox and will be removed. Please use RENDERER. 2 canvaskit.js:14:383
WebGL warning: getParameter: The READ_BUFFER attachment is multisampled. 2
Source map error: Error: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Stack in the worker:parseSourceMapInput@resource://devtools/client/shared/vendor/source-map/lib/util.js:163:15
_factory@resource://devtools/client/shared/vendor/source-map/lib/source-map-consumer.js:1066:22
SourceMapConsumer@resource://devtools/client/shared/vendor/source-map/lib/source-map-consumer.js:26:12
_fetch@resource://devtools/client/shared/source-map-loader/utils/fetchSourceMap.js:83:19
Resource URL: http://192.168.0.61:8000/flutter_bootstrap.js
Source Map URL: flutter.js.map
Firefox can’t establish a connection to the server at ws://192.168.0.61:8000/ws. main.dart.js:7766:16
Uncaught : WebSocketChannelException: WebSocket connection failed. main.dart.js:3855:19
Firefox can’t establish a connection to the server at ws://192.168.0.61:8000/ws. main.dart.js:7766:16
Uncaught : WebSocketChannelException: WebSocket connection failed. main.dart.js:3855:19
Firefox can’t establish a connection to the server at ws://192.168.0.61:8000/ws. main.dart.js:7766:16
Uncaught : WebSocketChannelException: WebSocket connection failed. main.dart.js:3855:19
Firefox can’t establish a connection to the server at ws://192.168.0.61:8000/ws. main.dart.js:7766:16
Uncaught : WebSocketChannelException: WebSocket connection failed. main.dart.js:3855:19
Firefox can’t establish a connection to the server at ws://192.168.0.61:8000/ws. main.dart.js:7766:16
Uncaught : WebSocketChannelException: WebSocket connection failed. main.dart.js:3855:19
Firefox can’t establish a connection to the server at ws://192.168.0.61:8000/ws. main.dart.js:7766:16
Uncaught : WebSocketChannelException: WebSocket connection failed. main.dart.js:3855:19
Firefox can’t establish a connection to the server at ws://192.168.0.61:8000/ws. main.dart.js:7766:16
Uncaught : WebSocketChannelException: WebSocket connection failed. main.dart.js:3855:19
Firefox can’t establish a connection to the server at ws://192.168.0.61:8000/ws. main.dart.js:7766:16
Uncaught : WebSocketChannelException: WebSocket connection failed. main.dart.js:3855:19
Firefox can’t establish a connection to the server at ws://192.168.0.61:8000/ws. main.dart.js:7766:16
Uncaught : WebSocketChannelException: WebSocket connection failed. main.dart.js:3855:19`
i ran FastAPI without flet without any problems. Other devices can connect and visiting the swaggerui in browser works too.
the Raspberry Pi is connected to the internet too.
using the most recent dev build of flet had the same results.
The text was updated successfully, but these errors were encountered:
i have waited more than minutes while the WebSocket connection failed errors keep piling up until flets api lifecycle notices inactivity and terminates the current session.
I also tried running it with other ASGI servers like Hypercorn. Same result sadly
SOLVED: downgrading the package websockets to version 13.0.1 solved the issue
pip install websockets==13.0.1
the new version not only causes the warnings mentioned in other issue but is incompatible with recent flet when accessing a web app from another machine
Duplicate Check
Describe the bug
I tried running a simple flet dynamic web app on a Raspberry Pi 4b (fresh install).
EDIT: same results when doing this on Ubuntu Server on an amd64 host.
Uvicorn runs the app with
uvicorn test:app --port 8000 --host 0.0.0.0
but when i try to visit the app in a browser of another device in my local network the app gets stuck at loading (endless spinning indicator).Firefox inspector shows
Uncaught : WebSocketChannelException: WebSocket connection failed. main.dart.js:3855:19
and
Firefox can’t establish a connection to the server at ws://192.168.0.61:8000/flet-app/ws.
all other GET requests receive response status code 200
there is no firewalll running on the host
uvicorn shows the 200 codes on opening/reloading the page and shows no issues.
i installed flet via pip install flet[all]
OS: Rasperry Pi OS (64bit Lite Bookworm / 64bit Lite Bullseye legacy)
i have no clue but i did not find anything about anyone hosting a flet app on an Raspberry Pi either besides @FeodorFitsner mentioning that flet does not run on the 32bit ones in an old issue.
Code sample
Code
To reproduce
run any flet app on Raspberry Pi OS 64 lite (Bookworm or legacy Bullseye)
e.g. uvicorn test:app --port 8000 --host 0.0.0.0
Expected behavior
the app should load in browser
Screenshots / Videos
Captures
[Upload media here]
Operating System
Raspberry Pi OS Lite
Operating system details
Raspberry Pi OS (Lite/Desktop) (64-bit) Bookworm|Bullseye (legacy),
Raspberry Pi 4b / arm64
Flet version
0.26.0
Regression
No, it isn't
Suggestions
No response
Logs
Additional details
browser log
content of the uncaught error:
i ran FastAPI without flet without any problems. Other devices can connect and visiting the swaggerui in browser works too.
the Raspberry Pi is connected to the internet too.
using the most recent dev build of flet had the same results.
The text was updated successfully, but these errors were encountered: