Comments (3)
I've been able to build the flet bundle for web/Linux and a presumed fix to this issue but I am unable to get them to run for tests due to the following error repeated with multiple variations. If anyone knows how to fix this or is willing to test that my changes work, that would be appreciated
** (flet:303499): CRITICAL **: ... : assertion 'FL_IS_*' failed
from flet.
Can you share your code and the steps to repro?
from flet.
Can you share your code and the steps to repro?
Code with changes is here but I get the same issue with the main branch
I attempted to follow the steps from CONTRIBUTING.md
Flutter installed:
[✓] Flutter (Channel stable, 3.22.2, on Pop!_OS 22.04 LTS
6.8.0-76060800daily20240311-generic, locale en_US.UTF-8)
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from:
https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK
components.
(or visit https://flutter.dev/docs/get-started/install/linux#android-setup
for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[!] Android Studio (not installed)
[✓] VS Code (version 1.89.1)
[✓] Connected device (2 available)
[✓] Network resources
Cloned the main branch and set the variables, built the project successfully for linux and web
export FLET_VIEW_PATH=/$PATH_TO_FLET/client/build/linux/x64/release/bundle
export FLET_WEB_PATH=/$PATH_TO_FLETt/client/build/web
cd $PATH_TO_FLET/client
flutter build linux
flutter build web
Installed poetry, initialized, and ran test
curl -sSL https://install.python-poetry.org | python3 -
cd $PATH_TO_FLET/sdk/python
poetry install
# Doesn't display properly
poetry run flet run -w -p 8550 playground/hello.py
cd $PATH_TO_FLET/client
# Leads to errors mentioned previously
flutter run
Connected devices:
Linux (desktop) • linux • linux-x64 • Pop!_OS 22.04 LTS
6.8.0-76060800daily20240311-generic
Chrome (web) • chrome • web-javascript • Chromium 125.0.6422.141
[1]: Linux (linux)
[2]: Chrome (chrome)
Please choose one (or "q" to quit): 1
Launching lib/main.dart on Linux in debug mode...
Building Linux application...
✓ Built build/linux/x64/debug/bundle/flet
** (flet:408553): CRITICAL **: 14:54:03.738: FlBinaryMessenger *fl_engine_get_binary_messenger(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlTextureRegistrar *fl_engine_get_texture_registrar(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlPluginRegistrar *fl_plugin_registrar_new(FlView *, FlBinaryMessenger *, FlTextureRegistrar *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlBinaryMessenger *fl_plugin_registrar_get_messenger(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlMethodChannel *fl_method_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlMethodChannel *fl_method_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlEventChannel *fl_event_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: void fl_method_channel_set_method_call_handler(FlMethodChannel *, FlMethodChannelMethodCallHandler, gpointer, GDestroyNotify): assertion 'FL_IS_METHOD_CHANNEL(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: void fl_method_channel_set_method_call_handler(FlMethodChannel *, FlMethodChannelMethodCallHandler, gpointer, GDestroyNotify): assertion 'FL_IS_METHOD_CHANNEL(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlBinaryMessenger *fl_engine_get_binary_messenger(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlTextureRegistrar *fl_engine_get_texture_registrar(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlPluginRegistrar *fl_plugin_registrar_new(FlView *, FlBinaryMessenger *, FlTextureRegistrar *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlBinaryMessenger *fl_engine_get_binary_messenger(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlTextureRegistrar *fl_engine_get_texture_registrar(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlPluginRegistrar *fl_plugin_registrar_new(FlView *, FlBinaryMessenger *, FlTextureRegistrar *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlBinaryMessenger *fl_plugin_registrar_get_messenger(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlMethodChannel *fl_method_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: void fl_method_channel_set_method_call_handler(FlMethodChannel *, FlMethodChannelMethodCallHandler, gpointer, GDestroyNotify): assertion 'FL_IS_METHOD_CHANNEL(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlTextureRegistrar *fl_plugin_registrar_get_texture_registrar(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlBinaryMessenger *fl_engine_get_binary_messenger(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlTextureRegistrar *fl_engine_get_texture_registrar(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlPluginRegistrar *fl_plugin_registrar_new(FlView *, FlBinaryMessenger *, FlTextureRegistrar *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlBinaryMessenger *fl_engine_get_binary_messenger(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlTextureRegistrar *fl_engine_get_texture_registrar(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlPluginRegistrar *fl_plugin_registrar_new(FlView *, FlBinaryMessenger *, FlTextureRegistrar *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
(flet:408553): GLib-GObject-CRITICAL **: 14:54:03.738: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlBinaryMessenger *fl_plugin_registrar_get_messenger(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.738: FlMethodChannel *fl_method_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: void fl_method_channel_set_method_call_handler(FlMethodChannel *, FlMethodChannelMethodCallHandler, gpointer, GDestroyNotify): assertion 'FL_IS_METHOD_CHANNEL(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlBinaryMessenger *fl_engine_get_binary_messenger(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlTextureRegistrar *fl_engine_get_texture_registrar(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlPluginRegistrar *fl_plugin_registrar_new(FlView *, FlBinaryMessenger *, FlTextureRegistrar *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
(flet:408553): GLib-GObject-CRITICAL **: 14:54:03.739: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlBinaryMessenger *fl_plugin_registrar_get_messenger(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlMethodChannel *fl_method_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: void fl_method_channel_set_method_call_handler(FlMethodChannel *, FlMethodChannelMethodCallHandler, gpointer, GDestroyNotify): assertion 'FL_IS_METHOD_CHANNEL(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlBinaryMessenger *fl_engine_get_binary_messenger(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlTextureRegistrar *fl_engine_get_texture_registrar(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlPluginRegistrar *fl_plugin_registrar_new(FlView *, FlBinaryMessenger *, FlTextureRegistrar *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
(flet:408553): GLib-GObject-CRITICAL **: 14:54:03.739: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
(flet:408553): GLib-GObject-WARNING **: 14:54:03.739: invalid (NULL) pointer instance
(flet:408553): GLib-GObject-CRITICAL **: 14:54:03.739: g_signal_handler_find: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
(flet:408553): GLib-GObject-WARNING **: 14:54:03.739: invalid (NULL) pointer instance
(flet:408553): GLib-GObject-CRITICAL **: 14:54:03.739: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
(flet:408553): GLib-GObject-WARNING **: 14:54:03.739: invalid (NULL) pointer instance
(flet:408553): GLib-GObject-CRITICAL **: 14:54:03.739: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
(flet:408553): GLib-GObject-WARNING **: 14:54:03.739: invalid (NULL) pointer instance
(flet:408553): GLib-GObject-CRITICAL **: 14:54:03.739: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
(flet:408553): GLib-GObject-WARNING **: 14:54:03.739: invalid (NULL) pointer instance
(flet:408553): GLib-GObject-CRITICAL **: 14:54:03.739: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
(flet:408553): GLib-GObject-WARNING **: 14:54:03.739: invalid (NULL) pointer instance
(flet:408553): GLib-GObject-CRITICAL **: 14:54:03.739: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
(flet:408553): GLib-GObject-WARNING **: 14:54:03.739: invalid (NULL) pointer instance
(flet:408553): GLib-GObject-CRITICAL **: 14:54:03.739: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
(flet:408553): GLib-GObject-WARNING **: 14:54:03.739: invalid (NULL) pointer instance
(flet:408553): GLib-GObject-CRITICAL **: 14:54:03.739: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
(flet:408553): GLib-GObject-WARNING **: 14:54:03.739: invalid (NULL) pointer instance
(flet:408553): GLib-GObject-CRITICAL **: 14:54:03.739: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
(flet:408553): GLib-GObject-WARNING **: 14:54:03.739: invalid (NULL) pointer instance
(flet:408553): GLib-GObject-CRITICAL **: 14:54:03.739: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlView *fl_plugin_registrar_get_view(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
(flet:408553): Gtk-CRITICAL **: 14:54:03.739: gtk_container_forall: assertion 'GTK_IS_CONTAINER (container)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlBinaryMessenger *fl_plugin_registrar_get_messenger(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlMethodChannel *fl_method_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: void fl_method_channel_set_method_call_handler(FlMethodChannel *, FlMethodChannelMethodCallHandler, gpointer, GDestroyNotify): assertion 'FL_IS_METHOD_CHANNEL(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlBinaryMessenger *fl_engine_get_binary_messenger(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlTextureRegistrar *fl_engine_get_texture_registrar(FlEngine *): assertion 'FL_IS_ENGINE(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlPluginRegistrar *fl_plugin_registrar_new(FlView *, FlBinaryMessenger *, FlTextureRegistrar *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
(flet:408553): GLib-GObject-CRITICAL **: 14:54:03.739: g_object_ref: assertion 'G_IS_OBJECT (object)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlBinaryMessenger *fl_plugin_registrar_get_messenger(FlPluginRegistrar *): assertion 'FL_IS_PLUGIN_REGISTRAR(self)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: FlMethodChannel *fl_method_channel_new(FlBinaryMessenger *, const gchar *, FlMethodCodec *): assertion 'FL_IS_BINARY_MESSENGER(messenger)' failed
** (flet:408553): CRITICAL **: 14:54:03.739: void fl_method_channel_set_method_call_handler(FlMethodChannel *, FlMethodChannelMethodCallHandler, gpointer, GDestroyNotify): assertion 'FL_IS_METHOD_CHANNEL(self)' failed
package:media_kit_libs_linux registered.
Test files:
hello.py
import flet
from flet import Page, Text
def main(page: Page):
page.add(Text("Hello, world!"))
flet.app(target=main)
test.py
import flet as ft
def main(page: ft.Page):
page.horizontal_alignment = ft.CrossAxisAlignment.CENTER
def close_anchor(e):
text = f"Color {e.control.data}"
anchor.value = text
anchor.update()
# print(f"closing view from {text}")
# anchor.close_view(text)
anchor = ft.SearchBar(
view_elevation=4,
divider_color=ft.colors.AMBER,
bar_hint_text="Search colors...",
view_hint_text="Choose a color from the suggestions...",
controls=[
ft.ListTile(title=ft.Text(f"Color {i}"), on_click=close_anchor, data=i)
for i in range(10)
],
)
page.add(
ft.Row(
alignment=ft.MainAxisAlignment.CENTER,
controls=[
ft.OutlinedButton(
"Open Search View",
on_click=lambda _: anchor.open_view(),
),
],
),
anchor,
)
ft.app(main)
from flet.
Related Issues (20)
- Add Audience parameter to Auth0OAuthProvider HOT 5
- Too large size of apk compare to other type of app HOT 2
- GestureDetector fails to run on_enter and on_exit events because of KeyError exception in HoverEvent HOT 4
- Column can not scroll HOT 5
- OS OPEN FUNCTION IS EMBBEDING JSON FILE INSIDE WINDOWS BUILD INSTEAD OF READ IT AT EACH EXECUTION
- Client storage requests do not work on web (static)
- LineCharts with custom bottom_axis labels stop rendering after list max length is reached
- jump in markdown content HOT 6
- The Page container needs a property similar to on_keyboard_event for mouse movement HOT 1
- Filepicker not working in web browser HOT 1
- Google AdSense Support For Web HOT 1
- Need Feature For Displaying HTML CSS Directly In Flet HOT 1
- Need Any Official Platform Where We Can Host Our Flet Web Apps HOT 1
- ResponsiveRow bug in different sizes HOT 1
- I can't get application output with flet HOT 5
- Troubleshooting MacOS Application Development with Flet HOT 2
- NavigationBar error HOT 1
- page.query does not work properly.
- Homescreen Widgets in mobile platforms
- localization: missing Simplified Chinese fonts support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flet.