flet icon indicating copy to clipboard operation
flet copied to clipboard

Failed to start Flutter renderer: No available configurations for the given RGBA pixel format

Open mehrdad-dev opened this issue 3 years ago • 7 comments

I can't run your examples, flet just opened a black screen after running the script.

image

mehrdad-dev avatar Aug 08 '22 07:08 mehrdad-dev

Could you please provide more info like what OS is that, version of Python, etc.?

FeodorFitsner avatar Aug 08 '22 18:08 FeodorFitsner

Full error message, a code sample to reproduce the issue.

FeodorFitsner avatar Aug 08 '22 18:08 FeodorFitsner

Error: note: second warning occurred when I close the app

App URL: http://127.0.0.1:39159
Connected to Flet app and handling user sessions...

** (flet:15375): WARNING **: 08:53:19.431: Failed to start Flutter renderer: No available configurations for the given RGBA pixel format

(flet:15375): GLib-GObject-WARNING **: 08:53:23.631: ../../../gobject/gsignal.c:2736: instance '0x12db290' has no handler with id '100'

OS: Linux Mint 20 Kernel version: 5.4.0-60-generic Python 3.8.5

Script: it doesn't matter what it is. flet can't run any script successfully.

import flet
from flet import ElevatedButton, Text, TextField


def main(page):
    def btn_click(e):
        if not txt_name.value:
            txt_name.error_text = "Please enter your name"
            page.update()
        else:
            name = txt_name.value
            page.clean()
            page.add(Text(f"Hello, {name}!"))

    txt_name = TextField(label="Your name")

    page.add(txt_name, ElevatedButton("Say hello!", on_click=btn_click))


flet.app(target=main)

mehrdad-dev avatar Aug 09 '22 04:08 mehrdad-dev

Might make sense to report the issue to flutter as well. I see similar (but not same) "failed to start" due to Linux graphics issues, e.g. here.

There is also the exact same error reported in connection to some other app using Flutter on Linux (Ubuntu).

mikaelho avatar Aug 10 '22 04:08 mikaelho

Well, it would be more helpful for Flutter if @mehrdad-dev submit an issue: install Flutter SDK, do a simple code repro, run flutter doctor, etc. - do all the steps required in issue template. I don't have enough data to submit an issue.

FeodorFitsner avatar Aug 10 '22 16:08 FeodorFitsner

Yes, definitely meant that the user with the problematic OS would be best placed to submit the issue.

mikaelho avatar Aug 10 '22 17:08 mikaelho

Alright, I will send a report after doing these steps.

mehrdad-dev avatar Aug 10 '22 17:08 mehrdad-dev

@mehrdad-dev Did you manage to submit a report to Flutter team?

FeodorFitsner avatar Aug 22 '22 04:08 FeodorFitsner