Unable to generate snap of Flutter app

[ +8 ms] Generating /root/parts/moon-hrm/build/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java [ +83 ms] Building Linux application… [ +7 ms] executing: [build/linux/x64/release/] cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DFLUTTER_TARGET_PLATFORM=linux-x64 /root/parts/moon-hrm/build/linux [ +279 ms] CMake Error: The current CMakeCache.txt directory /root/parts/moon-hrm/build/build/linux/x64/release/CMakeCache.txt is different than the directory /home/moontech/Documents/Jeet/HRM/moon-hrm-flutter/build/linux/x64/release where CMakeCache.txt was created. This may result in binaries being created in the wrong place. If you are not sure, reedit the CMakeCache.txt [ +8 ms] CMake Error: The source “/root/parts/moon-hrm/build/linux/CMakeLists.txt” does not match the source “/home/moontech/Documents/Jeet/HRM/moon-hrm-flutter/linux/CMakeLists.txt” used to generate cache. Re-run cmake with a different source directory. [ +30 ms] Building Linux application… (completed in 317ms) [ +1 ms] “flutter linux” took 1,406ms. [ +10 ms] Unable to generate build files [ ] #0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3) #1 _runCmake (package:flutter_tools/src/linux/build_linux.dart:174:5) #2 buildLinux (package:flutter_tools/src/linux/build_linux.dart:81:5) #3 BuildLinuxCommand.runCommand (package:flutter_tools/src/commands/build_linux.dart:87:5) #4 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1450:27) #5 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19) #6 CommandRunner.runCommand (package:args/command_runner.dart:212:13) #7 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:421:9) #8 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19) #9 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:5) #10 run.. (package:flutter_tools/runner.dart:130:9) #11 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19) #12 main (package:flutter_tools/executable.dart:94:3)

[ +87 ms] ensureAnalyticsSent: 82ms [ ] Running 1 shutdown hook [ +1 ms] Shutdown hooks complete [ +95 ms] exiting with code 1 Failed to run ‘flutter build linux --release -v -t lib/main.dart’ for ‘moon-hrm’: Exited with code 1. Verify that the part is using the correct parameters and try again.

if any expert know about this issue please tell me on my email: jeetnadiyadara07@gmail.com

Kindly share the snapcraft.yaml manifest with us.

I only briefly looked at your issue, but the error sounds familiar to one I had before, that I solved by doing flutter clean before calling snapcraft

Basically, what happens is that your build folder is mounted into the building container, but build evnrionment is completely different, so it complains (and rightfully so).

2 Likes

snapcraft.yaml: name: moonhrm version: ‘0.1.0’ base: core18 summary: A new Flutter project using WebView for Linux description: An HR Management App that simplifies HR and saves your crucial time managing employees and all their related work.

grade: stable icon: snap/gui/moonhrm.png

apps: moonhrm: command: moonhrm extensions: [flutter-master] plugs: - network - wayland - x11 - desktop

parts: moonhrm: source: . plugin: flutter flutter-target: lib/main.dart override-build: | export CXX=g++ flutter build linux --release -v -t lib/main.dart build-packages: - cmake - libgtk-3-dev - libwebkit2gtk-4.0-dev stage-packages: - libgtk-3-0 - libwebkit2gtk-4.0-37

layout: /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1: bind: $SNAP/gnome-platform/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1

this is worked but now other error as i’m using desktop_webview_flutter in my app the errro is related to it can you please check this:

===================error====================== [ +15 ms] Generating /root/parts/moonhrm/build/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java [ +72 ms] Building Linux application… [ +4 ms] executing: [build/linux/x64/release/] cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DFLUTTER_TARGET_PLATFORM=linux-x64 /root/parts/moonhrm/build/linux [ +603 ms] – The CXX compiler identification is GNU 7.5.0 [ +10 ms] – Check for working CXX compiler: /usr/bin/g++ [ +91 ms] – Check for working CXX compiler: /usr/bin/g++ – works [ +1 ms] – Detecting CXX compiler ABI info [ +52 ms] – Detecting CXX compiler ABI info - done [ +11 ms] – Detecting CXX compile features [ +1 ms] – Detecting CXX compile features - done [ +39 ms] – Found PkgConfig: /snap/flutter/current/usr/bin/pkg-config (found version “0.29.1”) [ ] – Checking for module ‘gtk±3.0’ [ +24 ms] – Found gtk±3.0, version 3.24.20 [ +52 ms] – Checking for module ‘glib-2.0’ [ +12 ms] – Found glib-2.0, version 2.64.6 [ +28 ms] – Checking for module ‘gio-2.0’ [ +12 ms] – Found gio-2.0, version 2.64.6 [ +35 ms] – Checking for module ‘webkit2gtk-4.0’ [ +13 ms] – Found webkit2gtk-4.0, version 2.32.4 [ +58 ms] – Checking for module ‘webkit2gtk-4.1’ [ +2 ms] – No package ‘webkit2gtk-4.1’ found [ ] CMake Error at /snap/flutter/145/usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message): [ +1 ms] A required package was not found [ ] Call Stack (most recent call first): [ ] /snap/flutter/145/usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal) [ ] flutter/ephemeral/.plugin_symlinks/desktop_webview_window/linux/CMakeLists.txt:10 (pkg_check_modules) [ ] – Configuring incomplete, errors occurred! [ ] See also “/root/parts/moonhrm/build/build/linux/x64/release/CMakeFiles/CMakeOutput.log”. [ +68 ms] Building Linux application… (completed in 1,122ms) [ ] “flutter linux” took 5,388ms. [ +5 ms] Unable to generate build files [ ] #0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3) #1 _runCmake (package:flutter_tools/src/linux/build_linux.dart:174:5) #2 buildLinux (package:flutter_tools/src/linux/build_linux.dart:81:5) #3 BuildLinuxCommand.runCommand (package:flutter_tools/src/commands/build_linux.dart:87:5) #4 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1450:27) #5 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19) #6 CommandRunner.runCommand (package:args/command_runner.dart:212:13) #7 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:421:9) #8 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19) #9 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:5) #10 run.. (package:flutter_tools/runner.dart:130:9) #11 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19) #12 main (package:flutter_tools/executable.dart:94:3)

[ +80 ms] ensureAnalyticsSent: 78ms [ ] Running 1 shutdown hook [ ] Shutdown hooks complete [ +96 ms] exiting with code 1 Failed to run ‘override-build’: Exit code was 1. Run the same command again with --debug to shell into the environment if you wish to introspect this failure.

I think to get any reply you should do some basic effort of formatting your question properly.

Please put any code or terminal output in a code block (prefix with ``` your code goes here ```), otherwise it is literally unreadable.

1 Like

Sorry, for this i will take care of this @Charlee

package : desktop_webview_window

snapcraft.yaml:

name: moonhrm
version: '0.1.0'
base: core18
summary: A new Flutter project using WebView for Linux
description: An HR Management App that simplifies HR and saves your crucial time managing employees and all their related work.

grade: stable
icon: snap/gui/moonhrm.png

apps:
  moonhrm:
    command: moonhrm
    extensions: [flutter-master]
    plugs:
      - network
      - wayland
      - x11
      - desktop

parts:
  moonhrm:
    source: .
    plugin: flutter
    flutter-target: lib/main.dart
    override-build: |
      export CXX=g++
      flutter build linux --release -v -t lib/main.dart
    build-packages:
      - cmake
      - libgtk-3-dev
      - libwebkit2gtk-4.0-dev
    stage-packages:
      - libgtk-3-0
      - libwebkit2gtk-4.0-37

layout:
  /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1:
    bind: $SNAP/gnome-platform/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1

the issue i’m facing:

[ +15 ms] Generating /root/parts/moonhrm/build/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[ +72 ms] Building Linux application…
[ +4 ms] executing: [build/linux/x64/release/] cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DFLUTTER_TARGET_PLATFORM=linux-x64 /root/parts/moonhrm/build/linux   

[ +603 ms] – The CXX compiler identification is GNU 7.5.0
[ +10 ms] – Check for working CXX compiler: /usr/bin/g++
[ +91 ms] – Check for working CXX compiler: /usr/bin/g++ – works
[ +1 ms] – Detecting CXX compiler ABI info
[ +52 ms] – Detecting CXX compiler ABI info - done
[ +11 ms] – Detecting CXX compile features
[ +1 ms] – Detecting CXX compile features - done
[ +39 ms] – Found PkgConfig: /snap/flutter/current/usr/bin/pkg-config (found version “0.29.1”)
[ ] – Checking for module ‘gtk±3.0’
[ +24 ms] – Found gtk±3.0, version 3.24.20
[ +52 ms] – Checking for module ‘glib-2.0’
[ +12 ms] – Found glib-2.0, version 2.64.6
[ +28 ms] – Checking for module ‘gio-2.0’
[ +12 ms] – Found gio-2.0, version 2.64.6
[ +35 ms] – Checking for module ‘webkit2gtk-4.0’
[ +13 ms] – Found webkit2gtk-4.0, version 2.32.4
[ +58 ms] – Checking for module ‘webkit2gtk-4.1’
[ +2 ms] – No package ‘webkit2gtk-4.1’ found
[ ] CMake Error at /snap/flutter/145/usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message):
[ +1 ms] A required package was not found
[ ] Call Stack (most recent call first):   

[ ] /snap/flutter/145/usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal)
[ ] flutter/ephemeral/.plugin_symlinks/desktop_webview_window/linux/CMakeLists.txt:10 (pkg_check_modules)
[ ] – Configuring incomplete, errors occurred!
[ ] See also “/root/parts/moonhrm/build/build/linux/x64/release/CMakeFiles/CMakeOutput.log”.
[ +68 ms] Building Linux application… (completed in 1,122ms)
[ ] “flutter linux” took 5,388ms.
[ +5 ms] Unable to generate build files
[ ] #0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
[ ] #1 _runCmake (package:flutter_tools/src/linux/build_linux.dart:174:5)   

[ ] #2 buildLinux (package:flutter_tools/src/linux/build_linux.dart:81:5)
[ ] #3 BuildLinuxCommand.runCommand (package:flutter_tools/src/commands/build_linux.dart:87:5)
[ ] #4 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1450:27)
[ ] #5 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19)
[ ] #6 CommandRunner.runCommand (package:args/command_runner.dart:212:13)
[ ] #7 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:421:9)
[ ] #8 AppContext.run. (package:flutter_tools/src/base/context.dart:153:19)

i’m get this and then i search in project but i haven’t use webkit-4.1 still it shows this please reply me if you find something .

Thnak you.

Hi @jeet_patel7.

I suggest you update this part of your *.yaml file like this :

build-packages:
  - cmake
  - libgtk-3-dev
  - libwebkit2gtk-4.1-dev # Update
stage-packages:
  - libgtk-3-0
  - libwebkit2gtk-4.1-0 # Update

@baldeuniversel i try it but its not working

moontech@moontech-B360M-D3H:~/Documents/Jeet/HRM/moon-hrm-flutter$ snapcraft
Launching a VM.
The flutter plugin is currently in beta, its API may break. Use at your own risk.
Hit:1 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Reading package lists... Done
Could not find a required package in 'build-packages': libwebkit2gtk-4.1-dev
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.

@jeet_patel7 ! What if you used core22 or core24 ? :face_with_monocle:

Normally the target package ( libwebkit2gtk-4.1-dev) exists (maybe from core22 …).

no core22 not supports flutter plugin and extension so i try with core20 and extension flutter-master

snapcraft.yaml :

name: moonhrm
version: '0.1.0'
base: core20
summary: A new Flutter project using WebView for Linux
description: An HR Management App that simplifies HR and saves your crucial time managing employees and all their related work.

grade: stable
icon: snap/gui/moonhrm.png

apps:
  moonhrm:
    command: moonhrm
    extensions: [flutter-master]
    plugs:
      - network
      - wayland
      - x11
      - desktop

parts:
  moonhrm:
    source: .
    plugin: flutter
    flutter-target: lib/main.dart
    override-build: |
      export CXX=g++
      flutter build linux --release -v -t lib/main.dart
    build-packages:
      - cmake
      - libgtk-3-dev
      - libwebkit2gtk-4.1-dev
    stage-packages:
      - libgtk-3-0
      - libwebkit2gtk-4.1-0


layout:
  /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1:
    bind: $SNAP/gnome-platform/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1

Error :

moontech@moontech-B360M-D3H:~/Documents/Jeet/HRM/moon-hrm-flutter$ snapcraft
Launching a VM.
Project base changed from 'core18' to 'core20', cleaning first.
Name:           snapcraft-moonhrm
State:          Delayed Shutdown
Snapshots:      0
IPv4:           10.114.135.138
Release:        Ubuntu 18.04.6 LTS
Image hash:     24c87304639a (Ubuntu 18.04 LTS)
CPU(s):         2
Load:           0.53 0.49 0.20
Disk usage:     1.5GiB out of 248.0GiB
Memory usage:   72.1MiB out of 1.9GiB
Mounts:         /home/moontech/Documents/Jeet/HRM/moon-hrm-flutter => /root/project
                    UID map: 1000:0
                    GID map: 1000:0
[2024-09-06T16:18:52.008] [error] [snapcraft-moonhrm] process error occurred Crashed program: qemu-system-x86_64; error: Process crashed
[2024-09-06T16:18:52.016] [error] [snapcraft-moonhrm] error: program: qemu-system-x86_64; error: Process crashed
Launched: snapcraft-moonhrm
Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  apt-transport-https
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 1704 B of archives.
After this operation, 162 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/universe amd64 apt-transport-https all 2.0.10 [1704 B]
Fetched 1704 B in 0s (6182 B/s)               
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package apt-transport-https.
(Reading database ... 19299 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_2.0.10_all.deb ...
Unpacking apt-transport-https (2.0.10) ...
Setting up apt-transport-https (2.0.10) ...
2024-09-06T16:20:53+05:30 INFO Waiting for automatic snapd restart...
snapd 2.63 from Canonical✓ installed
"snapd" switched to the "latest/stable" channel

core20 20240416 from Canonical✓ installed
"core20" switched to the "latest/stable" channel

snapcraft 7.5.6 from Canonical✓ installed
"snapcraft" switched to the "7.x/stable" channel

Failed to load extension 'flutter-master': this extension does not support the 'core20' base.
Either use a different extension, or use a base supported by this extension.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.

Then i try with gnome extension with core22 but nothing works

moontech@moontech-B360M-D3H:~/Documents/Jeet/HRM/moon-hrm-flutter$ snapcraft
Launching a VM.
Failed to find extension 'gnome': a extension by that name does not exist.
Check the extension name and try again.
Run the same command again with --debug to shell into the environment if you wish to introspect this failure.

@jeet_patel7 ! Unless I’m mistaken, the extension your are looking for is gnome-3-38 for core20

@baldeuniversel @Charlee i try that also i modify snapcraft.yaml and it is as given:

name: moonhrm
version: '0.1.0'
base: core22
summary: A new Flutter project using WebView for Linux
description: An HR Management App that simplifies HR and saves your crucial time managing employees and all their related work.
confinement: strict
grade: stable
icon: snap/gui/moonhrm.png

apps:
  moonhrm:
    command: moonhrm
    extensions: [gnome]
    plugs:
      - network
      - wayland
      - x11
      - desktop

parts:
  moonhrm:
    source: .
    plugin: flutter
    flutter-target: lib/main.dart
#    override-build: |
#      export CXX=g++
#      flutter build linux --release -v -t lib/main.dart
    build-packages:
      - cmake
      - libgtk-3-dev
      - libwebkit2gtk-4.0-dev
    stage-packages:
      - libgtk-3-0
      - libwebkit2gtk-4.0-37


layout:
  /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1:
    bind: $SNAP/gnome-platform/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1

now i’m getting error like this:

:: [  +91 ms] Building Linux application...                                                                                                                                                                               
:: [   +9 ms] executing: [build/linux/x64/release/] cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DFLUTTER_TARGET_PLATFORM=linux-x64 /root/parts/moonhrm/build/linux                                                         
:: [ +741 ms] -- The CXX compiler identification is GNU 11.4.0                                                                                                                                                            
:: [  +15 ms] -- Detecting CXX compiler ABI info                                                                                                                                                                          
:: [  +91 ms] -- Detecting CXX compiler ABI info - done                                                                                                                                                                   
:: [  +11 ms] -- Check for working CXX compiler: /usr/bin/g++ - skipped                                                                                                                                                   
:: [        ] -- Detecting CXX compile features                                                                                                                                                                           
:: [   +5 ms] -- Detecting CXX compile features - done                                                                                                                                                                    
:: [  +36 ms] -- Found PkgConfig: /snap/gnome-42-2204-sdk/current/usr/bin/pkg-config (found version "0.29.2")                                                                                                             
:: [        ] -- Checking for module 'gtk+-3.0'                                                                                                                                                                           
:: [ +100 ms] --   Found gtk+-3.0, version 3.24.38                                                                                                                                                                        
:: [ +596 ms] -- Checking for module 'glib-2.0'                                                                                                                                                                           
:: [  +15 ms] --   Found glib-2.0, version 2.78.1                                                                                                                                                                         
:: [  +35 ms] -- Checking for module 'gio-2.0'                                                                                                                                                                            
:: [  +19 ms] --   Found gio-2.0, version 2.78.1                                                                                                                                                                          
:: [  +94 ms] -- Checking for module 'webkit2gtk-4.0'                                                                                                                                                                     
:: [  +72 ms] --   Found webkit2gtk-4.0, version 2.42.5                                                                                                                                                                   
:: [ +832 ms] -- Checking for module 'webkit2gtk-4.1'                                                                                                                                                                     
:: [  +51 ms] --   Found webkit2gtk-4.1, version 2.42.5                                                                                                                                                                   
:: [ +283 ms] -- Found X11: /usr/include                                                                                                                                                                                  
:: [        ] -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so                                                                                                     
:: [ +102 ms] -- Looking for XOpenDisplay in /usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so - found                                                                                             
:: [        ] -- Looking for gethostbyname                                                                                                                                                                                
:: [  +70 ms] -- Looking for gethostbyname - found                                                                                                                                                                        
:: [        ] -- Looking for connect                                                                                                                                                                                      
:: [  +73 ms] -- Looking for connect - found                                                                                                                                                                              
:: [        ] -- Looking for remove                                                                                                                                                                                       
:: [  +74 ms] -- Looking for remove - found                                                                                                                                                                               
:: [        ] -- Looking for shmat                                                                                                                                                                                        
:: [  +73 ms] -- Looking for shmat - found                                                                                                                                                                                
:: [        ] -- Looking for IceConnectionNumber in ICE                                                                                                                                                                   
:: [  +73 ms] -- Looking for IceConnectionNumber in ICE - found                                                                                                                                                           
:: [   +9 ms] -- Checking for module 'ayatana-appindicator3-0.1'                                                                                                                                                          
:: [  +28 ms] --   Found ayatana-appindicator3-0.1, version 0.5.93                                                                                                                                                        
:: [ +542 ms] -- Configuring done                                                                                                                                                                                         
:: [ +246 ms] CMake Warning at flutter/ephemeral/.plugin_symlinks/hid_listener/linux/CMakeLists.txt:23 (add_library):                                                                                                     
:: [   +1 ms]   Cannot generate a safe runtime search path for target hid_listener_plugin                                                                                                                                 
:: [        ]   because files in some directories may conflict with libraries in implicit                                                                                                                                 
:: [        ]   directories:                                                                                                                                                                                              
:: [        ]     runtime library [libSM.so.6] in /usr/lib/x86_64-linux-gnu may be hidden by files in:                                                                                                                    
:: [        ]       /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu                                                                                                                                              
:: [        ]     runtime library [libICE.so.6] in /usr/lib/x86_64-linux-gnu may be hidden by files in:                                                                                                                   
:: [        ]       /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu                                                                                                                                              
:: [        ]     runtime library [libX11.so.6] in /usr/lib/x86_64-linux-gnu may be hidden by files in:                                                                                                                   
:: [        ]       /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu                                                                                                                                              
:: [        ]     runtime library [libXext.so.6] in /usr/lib/x86_64-linux-gnu may be hidden by files in:                                                                                                                  
:: [        ]       /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu                                                                                                                                              
:: [        ]     runtime library [libXi.so.6] in /usr/lib/x86_64-linux-gnu may be hidden by files in:                                                                                                                    
:: [        ]       /snap/gnome-42-2204-sdk/current/usr/lib/x86_64-linux-gnu                                                                                                                                              
:: [        ]   Some of these libraries may not be found correctly.                                                                                                                                                       
:: [  +54 ms] -- Generating done                                                                                                                                                                                          
:: [   +8 ms] -- Build files have been written to: /root/parts/moonhrm/build/build/linux/x64/release                                                                                                                      
:: [  +21 ms] executing: ninja -C build/linux/x64/release install                                                                                                                                                         
:: [   +7 ms] ninja: Entering directory `build/linux/x64/release'                                                                                                                                                         
:: [+12625 ms] [1/34] Generating /root/parts/moonhrm/build/linux/flutter/ephemeral/libflutter_linux_gtk.so, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_engine.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_method_call.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_method_response.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_value.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_view.h, /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/flutter_linux.h, _phony_                                                                                                                                                                   
:: [   +5 ms] FAILED: /root/parts/moonhrm/build/linux/flutter/ephemeral/libflutter_linux_gtk.so /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_basic_message_channel.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_binary_codec.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_binary_messenger.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_dart_project.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_engine.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_json_message_codec.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_json_method_codec.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_message_codec.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_method_call.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_method_channel.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_method_codec.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_method_response.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_plugin_registrar.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_plugin_registry.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_standard_message_codec.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_standard_method_codec.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_string_codec.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_value.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/fl_view.h /root/parts/moonhrm/build/linux/flutter/ephemeral/flutter_linux/flutter_linux.h flutter/_phony_ /root/parts/moonhrm/build/build/linux/x64/release/flutter/_phony_                                                                                                                         
:: [        ] cd /root/parts/moonhrm/build/build/linux/x64/release/flutter && /usr/bin/cmake -E env FLUTTER_ROOT=/root/parts/moonhrm/build/flutter-distro PROJECT_DIR=/root/parts/moonhrm/build DART_OBFUSCATION=false TRACK_WIDGET_CREATION=true TREE_SHAKE_ICONS=true PACKAGE_CONFIG=/root/parts/moonhrm/build/.dart_tool/package_config.json FLUTTER_TARGET=lib/main.dart /root/parts/moonhrm/build/flutter-distro/packages/flutter_tools/bin/tool_backend.sh linux-x64 Release                                                                                                                                                                                              
:: [        ]    Woah! You appear to be trying to run flutter as root.                                                                                                                                                    
:: [        ]    We strongly recommend running the flutter tool without superuser privileges.                                                                                                                             
:: [        ]   /                                                                                                                                                                                                         
:: [   +2 ms] 📎                                                                                                                                                                                                           
:: [        ] [  +12 ms] Unable to locate an Android SDK.                                                                                                                                                                 
:: [        ] [   +5 ms] executing: uname -m                                                                                                                                                                              
:: [        ] [   +3 ms] Exit code 0 from: uname -m                                                                                                                                                                       
:: [        ] [        ] x86_64                                                                                                                                                                                           
:: [        ] [  +28 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.                                                                                                             
:: [        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.                                                                                                           
:: [        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.                                                                                                                      
:: [        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.                                                                                                                           
:: [        ] [        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.                                                                                                                  
:: [        ] [   +1 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.                                                                                                                  
:: [        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.                                                                                                                    
:: [        ] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.                                                                                                                    
:: [        ] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.                                                                                                                
:: [        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.                                                                                                                
:: [        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.                                                                                                               
:: [        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.                                                                                                               
:: [        ] [  +79 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.                                                                                                                           
:: [        ] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.                                                                                                                           
:: [        ] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.                                                                                                             
:: [        ] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.                                                                                                           
:: [        ] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.                                                                                                                      
:: [        ] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.                                                                                                                           
:: [        ] [        ] Artifact Instance of 'LegacyCanvasKitRemover' is not required, skipping update.                                                                                                                  
:: [        ] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.                                                                                                                              
:: [        ] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.                                                                                                                  
:: [        ] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.                                                                                                                    
:: [        ] [   +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.                                                                                                                
:: [        ] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.                                                                                                                
:: [        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.                                                                                                               
:: [        ] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.                                                                                                               
:: [        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.                                                                                                                         
:: [        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.                                                                                                                         
:: [        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.                                                                                                                         
:: [        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.                                                                                                                         
:: [        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.                                                                                                                         
:: [        ] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.                                                                                                                     
:: [        ] [        ] Artifact Instance of 'PubDependencies' is not required, skipping update.                                                                                                                         
:: [        ] [  +44 ms] Initializing file store                                                                                                                                                                          
:: [        ] [  +20 ms] Skipping target: gen_localizations                                                                                                                                                               
:: [        ] [   +9 ms] gen_dart_plugin_registrant: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: /root/parts/moonhrm/build/.dart_tool/package_config_subset}         
:: [        ] [   +7 ms] unpack_linux: Starting due to {}                                                                                                                                                                 
:: [        ] [  +52 ms] unpack_linux: Complete                                                                                                                                                                           
:: [   +1 ms] [ +201 ms] Found plugin app_links at /root/.pub-cache/hosted/pub.dev/app_links-3.5.1/                                                                                                                       
:: [        ] [  +26 ms] Found plugin connectivity_plus at /root/.pub-cache/hosted/pub.dev/connectivity_plus-3.0.6/                                                                                                       
:: [        ] [   +9 ms] Found plugin desktop_lifecycle at /root/.pub-cache/hosted/pub.dev/desktop_lifecycle-0.1.1/                                                                                                       
:: [        ] [   +1 ms] Found plugin desktop_webview_window at /root/.pub-cache/hosted/pub.dev/desktop_webview_window-0.2.3/                                                                                             
:: [        ] [   +7 ms] Found plugin firebase_core at /root/.pub-cache/hosted/pub.dev/firebase_core-2.24.2/                                                                                                              
:: [   +1 ms] [   +2 ms] Found plugin firebase_core_web at /root/.pub-cache/hosted/pub.dev/firebase_core_web-2.10.0/                                                                                                      
:: [        ] [   +1 ms] Found plugin firebase_messaging at /root/.pub-cache/hosted/pub.dev/firebase_messaging-14.7.10/                                                                                                   
:: [        ] [   +3 ms] Found plugin firebase_messaging_web at /root/.pub-cache/hosted/pub.dev/firebase_messaging_web-3.5.18/                                                                                            
:: [        ] [   +3 ms] Found plugin flutter_inappwebview at /root/.pub-cache/hosted/pub.dev/flutter_inappwebview-5.8.0/                                                                                                 
:: [        ] [   +2 ms] Found plugin flutter_local_notifications at /root/.pub-cache/hosted/pub.dev/flutter_local_notifications-16.3.3/                                                                                  
:: [        ] [   +1 ms] Found plugin flutter_local_notifications_linux at /root/.pub-cache/hosted/pub.dev/flutter_local_notifications_linux-4.0.1/                                                                       
:: [        ] [   +3 ms] Found plugin fullscreen_window at /root/.pub-cache/hosted/pub.dev/fullscreen_window-1.0.4/                                                                                                       
:: [        ] [   +1 ms] Found plugin geolocator at /root/.pub-cache/hosted/pub.dev/geolocator-10.1.1/                                                                                                                    
:: [        ] [   +2 ms] Found plugin geolocator_android at /root/.pub-cache/hosted/pub.dev/geolocator_android-4.3.1/                                                                                                     
:: [        ] [   +4 ms] Found plugin geolocator_apple at /root/.pub-cache/hosted/pub.dev/geolocator_apple-2.3.7/                                                                                                         
:: [        ] [   +2 ms] Found plugin geolocator_web at /root/.pub-cache/hosted/pub.dev/geolocator_web-2.2.1/                                                                                                             
:: [        ] [   +1 ms] Found plugin geolocator_windows at /root/.pub-cache/hosted/pub.dev/geolocator_windows-0.2.3/                                                                                                     
:: [        ] [   +5 ms] Found plugin google_sign_in at /root/.pub-cache/hosted/pub.dev/google_sign_in-6.1.6/                                                                                                             
:: [        ] [   +1 ms] Found plugin google_sign_in_android at /root/.pub-cache/hosted/pub.dev/google_sign_in_android-6.1.21/                                                                                            
:: [        ] [  +28 ms] Found plugin google_sign_in_ios at /root/.pub-cache/hosted/pub.dev/google_sign_in_ios-5.6.5/                                                                                                     
:: [        ] [   +2 ms] Found plugin google_sign_in_web at /root/.pub-cache/hosted/pub.dev/google_sign_in_web-0.12.0+4/                                                                                                  
:: [        ] [   +1 ms] Found plugin gtk at /root/.pub-cache/hosted/pub.dev/gtk-2.1.0/                                                                                                                                   
:: [        ] [   +1 ms] Found plugin hid_listener at /root/.pub-cache/hosted/pub.dev/hid_listener-2.0.1/                                                                                                                 
:: [        ] [   +8 ms] Found plugin location at /root/.pub-cache/hosted/pub.dev/location-5.0.3/                                                                                                                         
:: [        ] [   +1 ms] Found plugin location_web at /root/.pub-cache/hosted/pub.dev/location_web-4.2.0/                                                                                                                 
:: [        ] [   +8 ms] Found plugin package_info_plus at /root/.pub-cache/hosted/pub.dev/package_info_plus-4.1.0/                                                                                                       
:: [        ] [   +3 ms] Found plugin path_provider at /root/.pub-cache/hosted/pub.dev/path_provider-2.0.15/                                                                                                              
:: [        ] [   +1 ms] Found plugin path_provider_android at /root/.pub-cache/hosted/pub.dev/path_provider_android-2.0.27/                                                                                              
:: [        ] [   +1 ms] Found plugin path_provider_foundation at /root/.pub-cache/hosted/pub.dev/path_provider_foundation-2.2.4/                                                                                         
:: [        ] [        ] Found plugin path_provider_linux at /root/.pub-cache/hosted/pub.dev/path_provider_linux-2.1.11/                                                                                                  
:: [        ] [   +1 ms] Found plugin path_provider_windows at /root/.pub-cache/hosted/pub.dev/path_provider_windows-2.1.7/                                                                                               
:: [        ] [        ] Found plugin permission_handler at /root/.pub-cache/hosted/pub.dev/permission_handler-11.0.1/                                                                                                    
:: [        ] [        ] Found plugin permission_handler_android at /root/.pub-cache/hosted/pub.dev/permission_handler_android-11.1.0/                                                                                    
:: [        ] [        ] Found plugin permission_handler_apple at /root/.pub-cache/hosted/pub.dev/permission_handler_apple-9.1.4/                                                                                         
:: [        ] [   +1 ms] Found plugin permission_handler_windows at /root/.pub-cache/hosted/pub.dev/permission_handler_windows-0.1.3/                                                                                     
:: [        ] [   +5 ms] Found plugin screen_capturer at /root/.pub-cache/hosted/pub.dev/screen_capturer-0.1.6/                                                                                                           
:: [        ] [        ] Found plugin screen_retriever at /root/.pub-cache/hosted/pub.dev/screen_retriever-0.1.6/                                                                                                         
:: [        ] [        ] Found plugin shared_preferences at /root/.pub-cache/hosted/pub.dev/shared_preferences-2.2.0/                                                                                                     
:: [        ] [        ] Found plugin shared_preferences_android at /root/.pub-cache/hosted/pub.dev/shared_preferences_android-2.2.0/                                                                                     
:: [        ] [        ] Found plugin shared_preferences_foundation at /root/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.3.2/                                                                               
:: [        ] [        ] Found plugin shared_preferences_linux at /root/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.3.0/                                                                                         
:: [        ] [   +1 ms] Found plugin shared_preferences_web at /root/.pub-cache/hosted/pub.dev/shared_preferences_web-2.2.0/                                                                                             
:: [        ] [        ] Found plugin shared_preferences_windows at /root/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.3.0/                                                                                     
:: [        ] [   +2 ms] Found plugin sign_in_with_apple at /root/.pub-cache/hosted/pub.dev/sign_in_with_apple-5.0.0/                                                                                                     
:: [        ] [   +1 ms] Found plugin sign_in_with_apple_web at /root/.pub-cache/hosted/pub.dev/sign_in_with_apple_web-1.0.1/                                                                                             
:: [        ] [   +1 ms] Found plugin sqflite at /root/.pub-cache/hosted/pub.dev/sqflite-2.2.8+4/                                                                                                                         
:: [        ] [   +3 ms] Found plugin system_tray at /root/.pub-cache/hosted/pub.dev/system_tray-2.0.3/                                                                                                                   
:: [        ] [   +3 ms] Found plugin url_launcher at /root/.pub-cache/hosted/pub.dev/url_launcher-6.1.11/                                                                                                                
:: [        ] [        ] Found plugin url_launcher_android at /root/.pub-cache/hosted/pub.dev/url_launcher_android-6.0.37/                                                                                                
:: [        ] [        ] Found plugin url_launcher_ios at /root/.pub-cache/hosted/pub.dev/url_launcher_ios-6.1.4/                                                                                                         
:: [        ] [        ] Found plugin url_launcher_linux at /root/.pub-cache/hosted/pub.dev/url_launcher_linux-3.0.5/                                                                                                     
:: [        ] [        ] Found plugin url_launcher_macos at /root/.pub-cache/hosted/pub.dev/url_launcher_macos-3.0.6/                                                                                                     
:: [        ] [   +1 ms] Found plugin url_launcher_web at /root/.pub-cache/hosted/pub.dev/url_launcher_web-2.0.18/                                                                                                        
:: [        ] [        ] Found plugin url_launcher_windows at /root/.pub-cache/hosted/pub.dev/url_launcher_windows-3.0.7/                                                                                                 
:: [        ] [   +5 ms] Found plugin webview_flutter at /root/.pub-cache/hosted/pub.dev/webview_flutter-4.2.2/                                                                                                           
:: [        ] [        ] Found plugin webview_flutter_android at /root/.pub-cache/hosted/pub.dev/webview_flutter_android-3.9.2/                                                                                           
:: [        ] [   +1 ms] Found plugin webview_flutter_wkwebview at /root/.pub-cache/hosted/pub.dev/webview_flutter_wkwebview-3.7.2/                                                                                       
:: [        ] [        ] Found plugin webview_win_floating at /root/.pub-cache/hosted/pub.dev/webview_win_floating-2.2.0/                                                                                                 
:: [        ] [   +1 ms] Found plugin win_capture at /root/.pub-cache/hosted/pub.dev/win_capture-0.0.5/                                                                                                                   
:: [        ] [        ] Found plugin win_toast at /root/.pub-cache/hosted/pub.dev/win_toast-0.3.0/                                                                                                                       
:: [        ] [   +8 ms] Found plugin window_manager at /root/.pub-cache/hosted/pub.dev/window_manager-0.3.5/                                                                                                             
:: [        ] [   +9 ms] Found plugin keyboard_event at /root/parts/moonhrm/build/lib/packages/keyboard_event-main/                                                                                                       
:: [        ] [        ] Found plugin mouse_event at /root/parts/moonhrm/build/lib/packages/mouse_event-master/                                                                                                           
:: [        ] [  +17 ms] gen_dart_plugin_registrant: Complete                                                                                                                                                             
:: [        ] [        ] kernel_snapshot_program: Starting due to {}                                                                                                                                                      
:: [   +2 ms] [   +8 ms] /root/parts/moonhrm/build/flutter-distro/bin/cache/dart-sdk/bin/dartaotruntime --disable-dart-dev /root/parts/moonhrm/build/flutter-distro/bin/cache/dart-sdk/bin/snapshots/frontend_server_aot.dart.snapshot --sdk-root /root/parts/moonhrm/build/flutter-distro/bin/cache/artifacts/engine/common/flutter_patched_sdk_product/ --target=flutter --no-print-incremental-dependencies -Ddart.vm.profile=false -Ddart.vm.product=true --delete-tostring-package-uri=dart:ui --delete-tostring-package-uri=package:flutter --aot --tfa --target-os linux --packages /root/parts/moonhrm/build/.dart_tool/package_config.json --output-dill /root/parts/moonhrm/build/.dart_tool/flutter_build/da301c7b1f1986771ce5f17a523ccf73/program.dill --depfile /root/parts/moonhrm/build/.dart_tool/flutter_build/da301c7b1f1986771ce5f17a523ccf73/kernel_snapshot_program.d --source file:///root/parts/moonhrm/build/.dart_tool/flutter_build/dart_plugin_registrant.dart --source package:flutter/src/dart_plugin_registrant.dart -Dflutter.dart_plugin_registrant=file:///root/parts/moonhrm/build/.dart_tool/flutter_build/dart_plugin_registrant.dart --verbosity=error package:moon_hrm/main.dart                                                                                                                                           
:: [        ] [+2225 ms] ../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:31:9: Error: Type 'UnmodifiableUint8ListView' not found.                                                                        
:: [        ] [   +1 ms]   final UnmodifiableUint8ListView bytes;                                                                                                                                                         
:: [        ] [        ]         ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                
:: [        ] [+3055 ms] ../../../.pub-cache/hosted/pub.dev/get-4.6.5/lib/get_navigation/src/extension_navigation.dart:222:62: Error: The getter 'backgroundColor' isn't defined for the class 'ThemeData'.               
:: [        ] [        ]  - 'ThemeData' is from 'package:flutter/src/material/theme_data.dart' ('flutter-distro/packages/flutter/lib/src/material/theme_data.dart').                                                      
:: [        ] [        ] Try correcting the name to the name of an existing getter, or defining a getter or field named 'backgroundColor'.                                                                                
:: [        ] [        ]                   TextStyle(color: confirmTextColor ?? theme.backgroundColor),                                                                                                                   
:: [        ] [        ]                                                              ^^^^^^^^^^^^^^^                                                                                                                     
:: [        ] [+1353 ms] ../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:31:9: Error: 'UnmodifiableUint8ListView' isn't a type.                                                                          
:: [        ] [        ]   final UnmodifiableUint8ListView bytes;                                                                                                                                                         
:: [        ] [        ]         ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                
:: [        ] [        ] ../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:51:17: Error: Method not found: 'UnmodifiableUint8ListView'.                                                                    
:: [        ] [        ]     return Guid(UnmodifiableUint8ListView(guid));                                                                                                                                                
:: [        ] [        ]                 ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                        
:: [        ] [        ] ../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:55:31: Error: Method not found: 'UnmodifiableUint8ListView'.                                                                    
:: [        ] [        ]   factory Guid.zero() => Guid(UnmodifiableUint8ListView(Uint8List(16)));                                                                                                                         
:: [        ] [        ]                               ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                          
:: [        ] [        ] ../../../.pub-cache/hosted/pub.dev/win32-4.1.4/lib/src/guid.dart:99:17: Error: Method not found: 'UnmodifiableUint8ListView'.                                                                    
:: [        ] [        ]     return Guid(UnmodifiableUint8ListView(Uint8List.fromList(guidAsBytes)));                                                                                                                     
:: [        ] [        ]                 ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                        
:: [        ] [ +573 ms] ../../../.pub-cache/hosted/pub.dev/archive-3.3.7/lib/src/bzip2/bzip2.dart:5:7: Error: Method not found: 'UnmodifiableUint8ListView'.                                                             
:: [        ] [        ]       UnmodifiableUint8ListView(Uint8List(0));                                                                                                                                                   
:: [        ] [        ]       ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                  
:: [        ] [        ] ../../../.pub-cache/hosted/pub.dev/archive-3.3.7/lib/src/bzip2/bzip2.dart:7:7: Error: Method not found: 'UnmodifiableUint32ListView'.                                                            
:: [        ] [        ]       UnmodifiableUint32ListView(Uint32List(0));                                                                                                                                                 
:: [        ] [        ]       ^^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                 
:: [        ] [        ] ../../../.pub-cache/hosted/pub.dev/archive-3.3.7/lib/src/bzip2/bzip2.dart:9:7: Error: Method not found: 'UnmodifiableInt32ListView'.                                                             
:: [        ] [        ]       UnmodifiableInt32ListView(Int32List(0));                                                                                                                                                   
:: [        ] [        ]       ^^^^^^^^^^^^^^^^^^^^^^^^^                                                                                                                                                                  
:: [        ] [+4152 ms] Persisting file store                                                                                                                                                                            
:: [        ] [   +2 ms] Done persisting file store                                                                                                                                                                       
:: [        ] [   +2 ms] Target kernel_snapshot_program failed: Exception                                                                                                                                                 
:: [        ]            #0      KernelSnapshotProgram.build (package:flutter_tools/src/build_system/targets/common.dart:276:7)                                                                                           
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #1      _BuildInstance._invokeInternal (package:flutter_tools/src/build_system/build_system.dart:875:9)                                                                                          
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #2      Future.wait.<anonymous closure> (dart:async/future.dart:534:21)                                                                                                                          
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #3      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:813:32)                                                                                            
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #4      Future.wait.<anonymous closure> (dart:async/future.dart:534:21)                                                                                                                          
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #5      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:813:32)                                                                                            
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #6      Future.wait.<anonymous closure> (dart:async/future.dart:534:21)                                                                                                                          
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #7      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:813:32)                                                                                            
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #8      Future.wait.<anonymous closure> (dart:async/future.dart:534:21)                                                                                                                          
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #9      _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:813:32)                                                                                            
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #10     Future.wait.<anonymous closure> (dart:async/future.dart:534:21)                                                                                                                          
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #11     _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:813:32)                                                                                            
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #12     Future.wait.<anonymous closure> (dart:async/future.dart:534:21)                                                                                                                          
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #13     _BuildInstance.invokeTarget (package:flutter_tools/src/build_system/build_system.dart:813:32)                                                                                            
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #14     FlutterBuildSystem.build (package:flutter_tools/src/build_system/build_system.dart:635:16)                                                                                               
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #15     AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:328:32)                                                                                                     
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #16     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1408:27)                                                                                   
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #17     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)                                                                                                  
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #18     CommandRunner.runCommand (package:args/command_runner.dart:212:13)                                                                                                                       
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #19     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:420:9)                                                                 
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #20     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)                                                                                                  
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #21     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:5)                                                                                     
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #22     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:130:9)                                                                                                    
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #23     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)                                                                                                  
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #24     main (package:flutter_tools/executable.dart:93:3)                                                                                                                                        
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ] [   +7 ms] "flutter assemble" took 12,038ms.                                                                                                                                                                
:: [        ] [   +5 ms]                                                                                                                                                                                                  
:: [        ]            #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)                                                                                                                          
:: [        ]            #1      AssembleCommand.runCommand (package:flutter_tools/src/commands/assemble.dart:345:7)                                                                                                      
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1408:27)                                                                                   
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)                                                                                                  
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #4      CommandRunner.runCommand (package:args/command_runner.dart:212:13)                                                                                                                       
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:420:9)                                                                 
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)                                                                                                  
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:5)                                                                                     
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:130:9)                                                                                                    
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)                                                                                                  
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ]            #10     main (package:flutter_tools/executable.dart:93:3)                                                                                                                                        
:: [        ]            <asynchronous suspension>                                                                                                                                                                        
:: [        ] [ +187 ms] ensureAnalyticsSent: 185ms                                                                                                                                                                       
:: [        ] [        ] Running 1 shutdown hook                                                                                                                                                                          
:: [        ] [        ] Shutdown hooks complete                                                                                                                                                                          
:: [        ] [  +12 ms] exiting with code 1                                                                                                                                                                              
:: [        ] ninja: build stopped: subcommand failed.                                                                                                                                                                    
:: [  +10 ms] Building Linux application... (completed in 17.1s)                                                                                                                                                          
:: [   +1 ms] "flutter linux" took 17,966ms.                                                                                                                                                                              
:: [  +41 ms] Build process failed                                                                                                                                                                                        
:: [        ]                                                                                                                                                                                                             
::            #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)                                                                                                                                     
::            #1      _runBuild (package:flutter_tools/src/linux/build_linux.dart:210:5)                                                                                                                                  
::            <asynchronous suspension>                                                                                                                                                                                   
::            #2      buildLinux (package:flutter_tools/src/linux/build_linux.dart:83:5)                                                                                                                                  
::            <asynchronous suspension>                                                                                                                                                                                   
::            #3      BuildLinuxCommand.runCommand (package:flutter_tools/src/commands/build_linux.dart:87:5)                                                                                                             
::            <asynchronous suspension>                                                                                                                                                                                   
::            #4      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1408:27)                                                                                              
::            <asynchronous suspension>                                                                                                                                                                                   
::            #5      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)                                                                                                             
::            <asynchronous suspension>                                                                                                                                                                                   
::            #6      CommandRunner.runCommand (package:args/command_runner.dart:212:13)                                                                                                                                  
::            <asynchronous suspension>                                                                                                                                                                                   
::            #7      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:420:9)                                                                            
::            <asynchronous suspension>                                                                                                                                                                                   
::            #8      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)                                                                                                             
::            <asynchronous suspension>                                                                                                                                                                                   
::            #9      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:364:5)                                                                                                
::            <asynchronous suspension>                                                                                                                                                                                   
::            #10     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:130:9)                                                                                                               
::            <asynchronous suspension>                                                                                                                                                                                   
::            #11     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:153:19)                                                                                                             
::            <asynchronous suspension>                                                                                                                                                                                   
::            #12     main (package:flutter_tools/executable.dart:93:3)                                                                                                                                                   
::            <asynchronous suspension>                                                                                                                                                                                   
::                                                                                                                                                                                                                        
::                                                                                                                                                                                                                        
:: [ +179 ms] ensureAnalyticsSent: 175ms                                                                                                                                                                                  
:: [        ] Running 1 shutdown hook                                                                                                                                                                                     
:: [        ] Shutdown hooks complete                                                                                                                                                                                     
:: [   +2 ms] exiting with code 1                                                                                                                                                                                         
Failed to run the build script for part 'moonhrm'.                                                                                                                                                                        
Failed to execute pack in instance.                       

i’m fresher in this but as of my experience i faced error like this when my flutter project runs on lower version of flutter and i have higher version of flutter sdk installed on system.

so it is possible that while we commnd snapcraft it always download flutter sdk and build it and my project runs on flutter 3.10.5

please help me if you got something related!

@jeet_patel7, there are a lot of bugs. I’m not a regular user of flutter :slightly_smiling_face:, but if you share your code(in private if you want) I can reproduce the bug and search solutions.

As much I understand, you’re complicating things, also using local builds without cleaning. So, please share the source code with us in a tarball or something in private, (I guess it’s a proprietary app?). Also, use core24 and gnome extension. Use this method to build the flutter app.

core24 and core22 almost have similar things… not much of a change. And also, after each build, clean the instance with

snapcraft clean
1 Like

Sorry , But I can’t provide you code but i try some cases and then now i getting error at the end of packing snap

snapcraft.yaml :

name: moonhrm
version: '0.1.0'
base: core22
summary: A new Flutter project using WebView for Linux
description: An HR Management App that simplifies HR and saves your crucial time managing employees and all their related work.
confinement: strict
grade: stable
icon: snap/gui/moonhrm.png

apps:
  moonhrm:
    command: moonhrm
    extensions: [gnome]
    plugs:
      - network
      - home
      - x11
      - wayland
      - desktop
      - desktop-legacy
      - gsettings

parts:
  moonhrm:
    source: .
    plugin: flutter
    flutter-target: lib/main.dart
    build-packages:
      - cmake
      - libgtk-3-dev
      - libwebkit2gtk-4.0-dev
    stage-packages:
      - libgtk-3-0
      - libwebkit2gtk-4.0-37
      - libgtk-3-0                 # GTK 3 for graphical interface
      - libwebkit2gtk-4.0-37       # WebKit2 GTK library
      - libwebkit2gtk-4.0-dev      # WebKit2 GTK development files
      - libgl1-mesa-glx            # OpenGL support for graphics rendering
      - libc6                      # GNU C Library
      - libx11-6                   # X11 client-side library
      - libstdc++6                 # Standard C++ library
      - libglib2.0-0               # GLib library for low-level system functionality
      - libpango-1.0-0             # Pango library for text layout and rendering
      - libatk1.0-0                # ATK library for accessibility
      - libcairo2                  # Cairo graphics library
      - libepoxy0                  # Epoxy library for OpenGL
      - libfontconfig1             # Font configuration and customization library
      - libfreetype6               # Freetype font rendering library
      - libxcomposite1             # X Composite extension library
      - libxdamage1                # X Damage extension library
      - libxext6                   # X11 miscellaneous extensions library
      - libxfixes3                 # X11 miscellaneous 'fixes' extension library
      - libxi6                     # X11 Input extension library
      - libxrender1                # X Rendering extension client library
      - libxtst6                   # X11 Testing -- Record extension library
      - libnss3                    # Network Security Services (NSS) libraries
      - libasound2                 # ALSA sound library
      - libxrandr2                 # X RandR extension library for screen resizing
      - libxcb1                    # X C Binding library for low-level X protocol
      - libxkbcommon0              # XKB common library for keyboard handling
      - libwayland-client0         # Wayland protocol client library
      - libwayland-cursor0         # Wayland protocol cursor library
      - libwayland-egl1            # Wayland EGL library for OpenGL
      - libatk-bridge2.0-0         # ATK Bridge for accessibility
      - libgbm1                    # Generic buffer management API library
      - libdrm2                    # Direct Rendering Manager runtime library


layout:
  /usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1:
    bind: $SNAP/gnome-platform/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/webkit2gtk-4.1

snap.log : https://drive.google.com/file/d/1jofM7NyFs1v-GhulvZUzvhD7sA8WHEYd/view?usp=sharing

please see logs at end and help me

hello @baldeuniversel @Charlee @soumyaDghosh now i change package named webview_cef and i created snap successfully Thank you for support.

but now the issue is i’m facing problem that after installations of snap icon created and when click on icon nothing opens i don’t know why this happened.

the way i build snap :

flutter clean && flutter pub get && flutter build linux --release

snapcraft

snapcraft.yaml :

name: webview-cef-demo
base: core22  # The base snap provides the environment to run your application.
version: '0.1'  # Increment this for each release.
summary: A demo app using webview_cef with CEF
description: |
  This snap packages a demo application using the webview_cef package, which
  embeds Chromium Embedded Framework (CEF) to render web content.

grade: devel  # Change to 'stable' for production releases.
confinement: strict  # Change to 'classic' if your app needs more system access.

#icon: snap/gui/webview-cef-demo.png  # Replace with your actual icon path.

apps:
  webview-cef-demo:
    command: webview_cef_demo  # Path to the binary to execute.
    extensions: [gnome]  # Use GNOME extension for desktop integration.
    plugs:  # Plugs define the permissions your snap will request.
      - network
      - network-manager
      - x11
      - wayland
      - desktop
      - opengl  # Add OpenGL for rendering support.
    environment:
      LD_LIBRARY_PATH: $SNAP/usr/lib/:$SNAP/usr/lib/x86_64-linux-gnu/  # Ensure the CEF libraries are in the path.
#    desktop: snap/gui/webview-cef-demo.desktop  # For adding a desktop launcher.

parts:
  webview-cef-demo:
    source-type: local
    source: build/linux/x64/release/bundle  # Path to your built app
    plugin: dump  # We're copying pre-built files
    organize:
      /webview_cef_demo: bin/webview_cef_demo  # Moving the executable to bin/
      lib/libcef.so: usr/lib/libcef.so  # Moving the CEF library to usr/lib/
      lib/libhid_listener.so: usr/lib/libhid_listener.so
      lib/libscreen_retriever_plugin.so: usr/lib/libscreen_retriever_plugin.so
      lib/libsystem_tray_plugin.so: usr/lib/libsystem_tray_plugin.so
      lib/libwebview_cef_plugin.so: usr/lib/libwebview_cef_plugin.so
      lib/libwin_capture_plugin.so: usr/lib/libwin_capture_plugin.so
      lib/libwindow_manager_plugin.so: usr/lib/libwindow_manager_plugin.so
      lib/libgtk_plugin.so: usr/lib/libgtk_plugin.so
      lib/linux-vdso.so.1: usr/lib/linux-vdso.so.1
    stage-packages:
      - xdg-desktop-portal
      - libgtk-3-0
      - libnss3
      - libx11-6
      - libxcomposite1
      - libxrandr2
      - libxrender1
      - libxtst6
      - libglib2.0-0
      - libgconf-2-4
      - libxss1
      - libgdk-pixbuf2.0-0
      - libgtk-3-bin
      - libcanberra-gtk3-module
      - icu-devtools
      - libicu70
      - libatk-bridge2.0-0
      - libcanberra-gtk-module
      - libx11-dev  # Added X11 development package
      - xorg-dev  # Added package for X11 dependencies

webview-cef-demo.desktop:

[Desktop Entry]
Name=Linux Webview Demo
Comment=Super Cool App that does everything
Exec=webview-cef-demo
Icon=${SNAP}/meta/gui/webview-cef-demo.png # Replace name with your app name.
Terminal=false
Type=Application
Categories=Utility

also i providing code(.zip) : https://drive.google.com/file/d/1jQqGnEyU4JZMILQoZNS79odCDwOi0S7q/view?usp=sharing

please reply me if anyone can have solutions.

1 Like

Remove almost all the stage-packages. Also, please fix your flutter project. The structure seems to be very incorrect.

EDIT: I was trying to build it from source as one should. You must not use some prebuilt binary, as there can be version mismatches.

Hi ! @jeet_patel7.

I succeeded to create the desired snap via the build/*/ source directory by applying some changes.

But, there is an issue → ELF bug, I wonder if you compiled your project correctly :face_with_monocle:

While examining one of your project’s source files, I realized that at least one variable declared somewhere was not used at all …

1 Like

@baldeuniversel

i’m not understand can you please explain me this? about ELF bug

and you say this: I succeeded to create the desired snap via the build/*/ source directory by applying some changes.

so the app is opening ? when click on icon?

@jeet_patel7 ! Yep, I succeeded to create the snap in question, but the project seems not to have compiled correctly. :face_with_monocle:

The ELF are Linux specific files that can be executables, shared libraries … .

There is another way(very direct, very simple) to build and create a snap based on flutter. :slightly_smiling_face:

Follow the axample posted by @soumyaDghosh.