Running for web from macos got stuck
See original GitHub issueDescription
Browser got stuck when trying to run this script from a macOS. Also flet opens the system default browser and should open Chrome as Flutter does as default.
Only happens when trying to run on web. Run normally when using:
flet.app(target=main)
Code example to reproduce the issue:
import flet
from flet import IconButton, Page, Row, TextField, icons
def main(page: Page):
page.title = 'Flet counter example'
page.vertical_alignment = 'center'
txt_number = TextField(value='0', text_align='right', width=100)
def minus_click(e):
txt_number.value = int(txt_number.value) - 1
page.update()
def plus_click(e):
txt_number.value = int(txt_number.value) + 1
page.update()
page.add(
Row(
[
IconButton(icons.REMOVE, on_click=minus_click),
txt_number,
IconButton(icons.ADD, on_click=plus_click),
],
alignment='center',
)
)
flet.app(
target=main,
view=flet.WEB_BROWSER,
web_renderer="html",
route_url_strategy="path",
)
Describe the results you received:
Describe the results you expected: Should open Chrome and not the system default browser. Should appear a page with two icons and a textfield.
Additional information you deem important (e.g. issue happens only occasionally):
Flet version (pip show flet
):
0.1.60
Operating system:
macOS
12.3.1
Additional environment details:
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.2, on macOS 12.3.1 21E258 darwin-arm, locale
en-ES)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 13.3.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.71.2)
[✓] Connected device (2 available)
[✓] HTTP Host Availability
• No issues found!
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
[Solved!] 10 Ways to Fix MacBook Pro Stuck on Loading Screen
2. Reboot into Safe Mode ... The next solution that you should try is to reboot the MacBook Pro in safe mode. The...
Read more >If an app freezes or quits unexpectedly on Mac - Apple Support
Choose Apple menu > Force Quit, select the app in the dialog that appears, then click Force Quit. If the app quit, reopen...
Read more >How to fix a frozen MacBook or Mac - Macworld
Click on the Apple logo in the menu bar and choose Force Quit. If an app is not responding it will be highlighted...
Read more >How to Unfreeze a Mac and What to Do if it Keeps Freezing
We recommend running a full virus scan with MacKeeper to check if ... But if your Mac is frozen completely and you can't...
Read more >How to fix a Mac stuck on loading screen problem? - MacPaw
So the first solution to this problem is to reset your Mac's SMC. If your MacBook is stuck on the loading screen, this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
First, as dev I would want to run Flutter web on my MacBook as I do normally with Flutter apps. So maybe is a hidden bug that could appear in other base system
Flutter documentation says that u need chrome for debugging. So if no Chrome you should not be able to debug for web.
https://docs.flutter.dev/get-started/web