flet icon indicating copy to clipboard operation
flet copied to clipboard

Cannot start counter app right after installation

Open sagism opened this issue 3 years ago • 10 comments

% 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)

sagism avatar Aug 12 '22 05:08 sagism

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'

Dave-DigiMim avatar Aug 12 '22 14:08 Dave-DigiMim

@sagism What OS/version is that?

FeodorFitsner avatar Aug 12 '22 16:08 FeodorFitsner

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

Look at the 2nd workaround here: https://github.com/actions/runner-images/issues/4545#issuecomment-975719151 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?

FeodorFitsner avatar Aug 12 '22 16:08 FeodorFitsner

Raspberry pi os. BusterSent from my Galaxy -------- Original message --------From: Feodor Fitsner @.> Date: 2022/08/12 18:36 (GMT+02:00) To: flet-dev/flet @.> Cc: Dave Ingram @.>, Comment @.> Subject: Re: [flet-dev/flet] Cannot start counter app right after installation (Issue #181) @sagism What OS/version is that?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Dave-DigiMim avatar Aug 12 '22 16:08 Dave-DigiMim

@Dave-DigiMim OK, Flutter is supported on Linux ARM64 platform: https://github.com/flutter/flutter/issues/56992#issuecomment-812922172

The app should be built on Linux ARM64 though - cross-compilation is not supported. I created https://github.com/flet-dev/flet/issues/186 to track that effort.

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

FeodorFitsner avatar Aug 12 '22 17:08 FeodorFitsner

@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 avatar Aug 14 '22 02:08 FeodorFitsner

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

FeodorFitsner avatar Aug 14 '22 02:08 FeodorFitsner

Ah I am on 32bit. Sent from my Galaxy -------- Original message --------From: Feodor Fitsner @.> Date: 2022/08/14 04:43 (GMT+02:00) To: flet-dev/flet @.> Cc: Dave Ingram @.>, Mention @.> Subject: Re: [flet-dev/flet] Cannot start counter app right after installation (Issue #181) @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!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Dave-DigiMim avatar Aug 14 '22 03:08 Dave-DigiMim

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

FeodorFitsner avatar Aug 14 '22 04:08 FeodorFitsner

Oh, there is an open issue to support Flutter on 32-bit ARM: https://github.com/flutter/flutter/issues/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: https://github.com/flet-dev/flet/issues/191

FeodorFitsner avatar Aug 14 '22 04:08 FeodorFitsner