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

Cannot start counter app right after installation #181

Closed
sagism opened this issue Aug 12, 2022 · 10 comments
Closed

Cannot start counter app right after installation #181

sagism opened this issue Aug 12, 2022 · 10 comments

Comments

@sagism
Copy link

sagism commented Aug 12, 2022

% pip install flet
...
% python counter.py
App URL: http://127.0.0.1:64269
Connected to Flet app and handling user sessions...
The application cannot be opened for an unexpected reason, error=Error Domain=NSOSStatusErrorDomain Code=-10827 "kLSNoExecutableErr: The executable is missing" UserInfo={_LSLine=3665, _LSFunction=_LSOpenStuffCallLocal}

Python 3.10.4.
Clean virtualenv (only flet installed)

MacOS Big Sur (11.1)

@Dave-DigiMim
Copy link

Will flet run on Raspberry Pi?
I tried the sample counter.py but got this

Traceback (most recent call last):
File "counter.py", line 29, in
flet.app(target=main)
File "/home/pi/.local/lib/python3.7/site-packages/flet/flet.py", line 113, in app
fvp = _open_flet_view(conn.page_url)
File "/home/pi/.local/lib/python3.7/site-packages/flet/flet.py", line 396, in _open_flet_view
return subprocess.Popen(args)
File "/usr/lib/python3.7/subprocess.py", line 775, in init
restore_signals, start_new_session)
File "/usr/lib/python3.7/subprocess.py", line 1522, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/tmp/flet-0.1.49/flet/flet'

@FeodorFitsner
Copy link
Contributor

@sagism What OS/version is that?

@FeodorFitsner
Copy link
Contributor

@sagism it couldbe an error related to macOS Launch Services. I've never experienced such an error myself, but found this: actions/runner-images#4545

Look at the 2nd workaround here: actions/runner-images#4545 (comment)
To fix Simulator.app package they run /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f <path-to.app>

Flet.app is unpacked to $TMPDIR/flet-{version}/Flet.app, you can find its full path with ls $TMPDIR/flet*.

Then try running:

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f <path-to-Flet.app>

and then open Flet.app with:

open <path-to-Flet.app>

You should see a blank window which means it's fine.
Try running Flet Python app again and see if the window is opening.

lregister docs: https://ss64.com/osx/lsregister.html

@mikaelho could be a solution for your issue?

@Dave-DigiMim
Copy link

Dave-DigiMim commented Aug 12, 2022 via email

@FeodorFitsner
Copy link
Contributor

@Dave-DigiMim OK, Flutter is supported on Linux ARM64 platform: flutter/flutter#56992 (comment)

The app should be built on Linux ARM64 though - cross-compilation is not supported. I created #186 to track that effort.

I'm going to leave this issue open to deal with original macOS-based issue.

@FeodorFitsner
Copy link
Contributor

@Dave-DigiMim We've just released Flet 0.1.50 with Linux ARM64 support! Could you please upgrade flet module to the latest version (pip install flet --upgrade) and run your Python Flet program again. Let me know if you have a UI now!

@FeodorFitsner
Copy link
Contributor

@Dave-DigiMim It's for Raspberry Pi OS 64-bit, obviously...

@Dave-DigiMim
Copy link

Dave-DigiMim commented Aug 14, 2022 via email

@FeodorFitsner
Copy link
Contributor

I knew it! :) OK, 32-bit ARM is more challenging, let's see.

@FeodorFitsner
Copy link
Contributor

Oh, there is an open issue to support Flutter on 32-bit ARM: flutter/flutter#75823 Looks like people use flutter-pi to make it work on 32-bit ARM devices, but I'm not familiar with it. I'm opening a new issue to track that: #191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants