Run Flutter Applications on Ubuntu Core

I finally solved this problem :partying_face:!!! (Snap creation and installation successful, Monday I will try to install and run with Ubuntu-frame)

I normally work on Windows platform, I cloned the repository and copied the snap and wayland-lunch folders in my project. In this process the files were changed and when I tried to create and install snaps the error occurred.

to solve this problem i executed the same operations on linux machine. Now work correctly!!!

On GitLab commit i look this message:

File mode changed from 100644 to 100755

Thanks for your support. (@alan_g and @ogra )

2 Likes

Hi, Iā€™m new in snapcraft. I follow this tutorial even took all the library and modified the flutter demo and success to run flutter app in Raspi 4B under Ubuntu Core 20. But somehow I using image network package which is in conventional ubuntu it run perfectly but in ubuntu core seem it not display the image and pop out the error. I assume there must be something that need to edit within snapcraft recipe.

Anybody had experienced this and hope you can help me. Thanks

@pendekxr I donā€™t know anything about using Flutter with ā€œimage network packageā€, but here are some questions that might clarify where the problem arises:

  1. Does your unsnapped app work with Ubuntu Frame on Ubuntu Desktop?
  2. Does your snapped app work with Ubuntu Frame on Ubuntu Desktop?
  3. Are there any errors in your snapā€™s logs? (snap logs snap-name)

BTW you are posting on a superseded thread (see first post). The current tutorial is here:

Much appreciate for your fast reply sir,

  1. I tried run the app but it running on linux desktop instead of ubuntu frame
  2. same goes to this cases
  3. below my snapā€™s log in Raspberry Pi under Ubuntu Core 20
snap logs iot-example-graphical-snap
2022-08-19T11:03:23Z iot-example-graphical-snap.iot-example-graphical-snap[1177]: Setting up watches.
2022-08-19T11:03:23Z iot-example-graphical-snap.iot-example-graphical-snap[1177]: Watches established.
2022-08-19T11:03:23Z iot-example-graphical-snap.iot-example-graphical-snap[1177]: /run/user/0/ CREATE,ISDIR snap.signage-app
2022-08-19T11:03:23Z iot-example-graphical-snap.iot-example-graphical-snap[1179]: Setting up watches.
2022-08-19T11:03:23Z iot-example-graphical-snap.iot-example-graphical-snap[1179]: Watches established.
2022-09-14T15:27:17Z iot-example-graphical-snap.iot-example-graphical-snap[1179]: /run/user/0/ CREATE wayland-0.lock
2022-09-14T15:29:24Z systemd[1]: Stopping Service for snap application iot-example-graphical-snap.iot-example-graphical-snap...
2022-09-14T15:29:24Z systemd[1]: snap.iot-example-graphical-snap.iot-example-graphical-snap.service: Succeeded.
2022-09-14T15:29:24Z systemd[1]: Stopped Service for snap application iot-example-graphical-snap.iot-example-graphical-snap.
2022-09-14T15:29:33Z systemd[1]: Started Service for snap application iot-example-graphical-snap.iot-example-graphical-snap.


OK, that answers one out of three questions: there are no errors in the log. If there had been that would have helped identify what is going wrong.

One of the following is the problem:

  1. your app does not work when packaged with your snap recipe
  2. your app does not work with Ubuntu Frame
  3. your app does not work on Ubuntu Core
  4. your app does not work on the type of Raspberry Pi you are using

You need to experiment to identify the problem before anyone can suggest a solution.

Does your snapped app work with Ubuntu Frame on Ubuntu Desktop?

@alan_g Hi Sir I already test those cases once more

  1. The app working fine as expected the image network displayed
  2. The snapped app not working and displayed as my photo before
snap logs iot-example-graphical-snap
2022-09-14T23:04:51+08:00 systemd[1]: Started Service for snap application iot-example-graphical-snap.iot-example-graphical-snap.
2022-09-14T23:04:51+08:00 iot-example-graphical-snap.iot-example-graphical-snap[105571]: WARNING: wayland interface not connected! Please run: /snap/iot-example-graphical-snap/current/bin/setup.sh
2022-09-14T23:04:51+08:00 iot-example-graphical-snap.iot-example-graphical-snap[105622]: Setting up watches.
2022-09-14T23:04:51+08:00 iot-example-graphical-snap.iot-example-graphical-snap[105622]: Watches established.
2022-09-14T23:04:51+08:00 systemd[1]: Stopping Service for snap application iot-example-graphical-snap.iot-example-graphical-snap...
2022-09-14T23:04:51+08:00 systemd[1]: snap.iot-example-graphical-snap.iot-example-graphical-snap.service: Succeeded.
2022-09-14T23:04:51+08:00 systemd[1]: Stopped Service for snap application iot-example-graphical-snap.iot-example-graphical-snap.

I assume the problem is number 1. May I know what will be snap recipe that enable data retrieved over network? This is not my main apps because my main apps I need to retrieve data and displayed it using API. This app I used to test only what the causes happened.

There can be various problems with your snap recipe. Likely one of the following:

  1. youā€™ve not declared a plug for network access
  2. resources your application needs are not being found at runtime

How can I declare a plug for network access that suit for this tutorialā€™s snap recipe? Is there any snippet for me to try. Much appreciate for your help, sir

I have question, in this tutorial, is it this snap recipe allowed the network communication?

1 Like

@alan_g thank you sir, right now it working like a charm! by the way at my monitor seem the ubuntu frame does not in fullscreen. Is there settings that I need to set from ubuntu frame or is it from my Pi or Ubuntu Core itself? much appreciate for your answer

The Ubuntu Frame documentation is here:

2 Likes

Thank you for the reference sir