canonical / iot-example-graphical-snap

Developer Guide for Embedding IoT GUI with Ubuntu Frame
MIT License
22 stars 10 forks source link

flutterdemo not working with latest flutter 3.22 #31

Closed hlvs-apps closed 2 weeks ago

hlvs-apps commented 1 month ago

Hello, I was trying to run the 2/Flutter-demo, but it only showed a black screen, combined with

WARNING **: 13:47:43.682: Failed to compile fragment shader: 0:2(1): error: No precision specified in this scope for type `vec2'

WARNING **: 13:47:43.683: Failed to link program: error: linking with uncompiled/unspecialized shader

Same error on both frame-it and ubuntu core

This only seems to happen with the new flutter 3.22, if you change flutter upgrade in snapcraft.yaml to e.g. git -C ~/snap/flutter/common/flutter/ checkout 3.19.6 for flutter 3.19.6, the app starts without issues. I tested varoious flutter versions, this bug seems to be introduced in flutter 3.22.0.

CharleeSF commented 1 month ago

I am encountering the same problem for all flutter applications built with flutter 3.22

AlanGriffiths commented 1 month ago

This appears to be a problem with Flutter on Linux, not with the template for snapping Flutter apps.

Possibly, https://github.com/flutter/flutter/issues/149897

Saviq commented 1 month ago

It's actually this one:

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

Saviq commented 1 month ago

Here's a workaround that you can apply, but things are also working with Flutter master for me (because that's not taking the shader code path):

https://github.com/canonical/ubuntu-frame/pull/191/commits/e149fa75c8e1b96ef4a0d3df82908150e5c18937

I'll close this issue as the fix is elsewhere.

CharleeSF commented 2 weeks ago

This issue can be closed as well because on flutter 3.24.1 it works again