Flutter apps built with latest flutter version (3.22) fail to render

Hello,

Snaps built with the latest flutter version fail to render. The observed error:

Failed to compile fragment shader: 0:2(1): error: No precision specified in this scope for type `vec2'
Failed to link program: error: linking with uncompiled/unspecialized shader

The error happens when trying to run the flutterdemo, see this reported issue (built with the flutter snap), but also when I try to run my own flutter application (built with flutter downloaded from git).

I need the latest flutter version for my flutter application to build…

Where to I start debugging this? I suspect some library is missing in mesa-core22, but I don’t know how to figure out whether this is true.

One issue here is that I cannot run the snap with snap run --shell, because the application is wrapped by bin/graphics-core22-wrapper and bin/wayland-launch, and I don’t actually enter the shell when trying to run with --shell.

Any help is much appreciated.

@alan_g I see you are involved in the flutter example code, have you seen this issue?

I have seen the bug report on the snap (which has a workaround). I’ve not had time to try reproducing or investigating.

But if this isn’t an issue with the snap, but with Flutter (" also when I try to run my own flutter application (built with flutter downloaded from git)"), I doubt I can help

We’ve filed the bug upstream, it seems to be limited to GLES, and maybe even only some devices.

I’ve been able to reproduce on a Raspberry Pi.

https://github.com/flutter/flutter/issues/152297

2 Likes

still happens with Flutter 3.24, blocking me from updating my app to the next version.

I tried to build with the master channel but that threw me into dependency hell once again.

Then I tried to migrate to core24 which now seems to be possible as I’m using the gnome extension and that is now available under core24 (wasn’t some months ago iirc) but that also didn’t help

Update: With Flutter 3.24.1 my app FluffyChat can render again but … the colors are inverted now. I have not installed the handy_window package (which caused inverted colors for me in the past) so… no idea what causes this now

edit: Migrating from core22 to core24 fixed the problem for me :+1: so this seems to be fixed now when using core24.

2 Likes

Do you have any clue what the difference is there?

For us migrating to core24 is not really an option, I would prefer to fix on core22…

You think this is flutter, ubuntu-frame or mesa-core22?

@Charlee, follow the flutter bug linked above: it was a flutter bug

I was talking about the inverted colors, which I also experience (I just tested my app)