webview_cef
webview_cef copied to clipboard
Facing issue while create snap build
this is my log file after run snapcraft -v command.
error logs:
-Wl,-rpath,/root/parts/linux-webview-demo/build/build/linux/x64/release/plugins/webview_cef:/root/parts/linux-webview-demo/build/linux/flutter/ephemeral:/r oot/parts/linux-webview-demo/build/linux/flutter/ephemeral/.plugin_symlinks/webview_cef/linux/../third/cef/Release: plugins/webview_cef/libwebview_cef_plugin.so -lflutter_linux_gtk /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgtk-3.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgdk-3.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libpango-1.0.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libharfbuzz.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libatk-1.0.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libcairo-gobject.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libcairo.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgio-2.0.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libgobject-2.0.so /snap/flutter/current/usr/lib/x86_64-linux-gnu/libglib-2.0.so /root/parts/linux-webview-demo/build/linux/flutter/ephemeral/.plugin_symlinks/webview_cef/linux/../third/cef/Release/libcef.so plugins/webview_cef/libcef_dll_wrapper/libcef_dll_wrapper.a -lGL -lX11 -lgmodule-2.0 -lgthread-2.0 -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lXi && : [ ] /snap/flutter/current/usr/bin/ld: warning: libnss3.so, needed by /root/parts/linux-webview-demo/build/linux/flutter/ephemeral/.plugin_symlinks/webview_cef/linux/../third/cef/Release/libcef.so, not found (try using -rpath or -rpath-link) [ ] /snap/flutter/current/usr/bin/ld: warning: libnssutil3.so, needed by /root/parts/linux-webview-demo/build/linux/flutter/ephemeral/.plugin_symlinks/webview_cef/linux/../third/cef/Release/libcef.so, not found (try using -rpath or -rpath-link) [ ] /snap/flutter/current/usr/bin/ld: warning: libsmime3.so, needed by /root/parts/linux-webview-demo/build/linux/flutter/ephemeral/.plugin_symlinks/webview_cef/linux/../third/cef/Release/libcef.so, not found (try using -rpath or -rpath-link) [ ] /snap/flutter/current/usr/bin/ld: warning: libnspr4.so, needed by /root/parts/linux-webview-demo/build/linux/flutter/ephemeral/.plugin_symlinks/webview_cef/linux/../third/cef/Release/libcef.so, not found (try using -rpath or -rpath-link) [ ] /snap/flutter/current/usr/bin/ld: warning: libasound.so.2, needed by /root/parts/linux-webview-demo/build/linux/flutter/ephemeral/.plugin_symlinks/webview_cef/linux/../third/cef/Release/libcef.so, not found (try using -rpath or -rpath-link)
snapcraft.yaml : name: linux-webview-demo # Substitute with your app's name version: '1.0.0' # Your app's version summary: A short description of your app description: | A longer description of your app, detailing what it does.
grade: devel # Use "devel" for development versions confinement: devmode # Use "devmode" if strict confinement causes issues during testing
base: core18 # Base Snap; core20 is Ubuntu 20.04 architectures:
- amd64
parts: linux-webview-demo: plugin: flutter source: . flutter-target: lib/main.dart # Entry point of your Flutter app build-packages: - clang - cmake - make - pkg-config - libgtk-3-dev - libc6-dev - libssl-dev - libwebkit2gtk-4.0-dev
webview-cef: plugin: nil # Custom plugin configuration source: . # Point to the root of your project stage-packages: - libnss3 - libnss3-dev - libnspr4 - libnspr4-dev - libasound2 - libasound2-dev # Development package for ALSA to ensure all symbols are included organize: usr/lib/x86_64-linux-gnu/libcef.so: lib/libcef.so usr/lib/x86_64-linux-gnu/libnss3.so: lib/libnss3.so usr/lib/x86_64-linux-gnu/libnssutil3.so: lib/libnssutil3.so usr/lib/x86_64-linux-gnu/libsmime3.so: lib/libsmime3.so usr/lib/x86_64-linux-gnu/libnspr4.so: lib/libnspr4.so usr/lib/x86_64-linux-gnu/libasound.so.2: lib/libasound.so.2
apps: linux-webview-demo: # Substitute with your app's name environment: LD_LIBRARY_PATH: "$SNAP/usr/lib/x86_64-linux-gnu:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib:$SNAP/lib" command: bin/linux-webview-demo # The executable file of your app extensions: [flutter-stable] # Use Flutter extension to handle dependencies plugs: - network - network-bind - wayland - x11 - opengl`
pubspec.yaml : `name: webview_cef_example description: Demonstrates how to use the webview_cef plugin. publish_to: 'none' # Remove this line if you wish to publish to pub.dev
environment: sdk: ">=2.17.1 <3.0.0"
dependencies: flutter: sdk: flutter
webview_cef: path: lib/packages/webview_cef #<======== how i use webview_cef. cupertino_icons: ^1.0.2
dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^2.0.0
flutter: uses-material-design: true
@cadivus the build bundle that generated in Ubuntu 24.04 is not run in Ubuntu 22.04 , and Ubuntu 20.04
see this:
`premal@premal:~/Downloads/FileZilla3/bundle$ ./Moon_HRM
./Moon_HRM: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.38' not found (required by /home/premal/Downloads/FileZilla3/bundle/lib/libwebview_cef_plugin.so)
@cadivus the build bundle that generated in Ubuntu 24.04 is not run in Ubuntu 22.04 , and Ubuntu 20.04
It does run on Ubuntu 22.04. The workflows run with Ubuntu 22.04 and as you see it works:
(https://github.com/hlwhl/webview_cef/actions/runs/11514113294/job/32052077289)
The problem is that you installed Flutter using Snap, but Snap is an isolated environment. So as you see in your error logs, the dependencies can't be found.
Please install Flutter the usual way (https://docs.flutter.dev/get-started/install/linux/android#download-then-install-flutter) and try again. You may also need to install some dependencies:
https://github.com/hlwhl/webview_cef/blob/bc445974dd165a527615ed152706be333c93b4b3/.github/workflows/test_linux_x86.yaml#L35
I think that's what I already texted here (https://github.com/hlwhl/webview_cef/issues/160):
Maybe,it is because of you're using a Snap installation of Flutter. Did you try to install it directly as described here?:
no i have installed flutter downloaded from flutter sdk archive. but still it not run on 22.04
@patel0712 You exported your logs using snapcraft. Also your error logs show that you are using Snap, see lines like this:
/snap/flutter
You are still using the Snap version as your logs show. Maybe removing the Snap version helps to always use the other installation.
but when i run command snapcraft -v then it install latest flutter from snap i think that may be issue?
can you please check and guide me through snapcraft.yaml file if any issue are there.
see this:
Processing triggers for libgdk-pixbuf2.0-0:amd64 (2.36.11-2) ... Processing triggers for libc-bin (2.27-3ubuntu1.6) ... clang set to automatically installed. cmake set to automatically installed. gcc set to automatically installed. libc6-dev set to automatically installed. libgtk-3-dev set to automatically installed. libssl-dev set to automatically installed. libwebkit2gtk-4.0-dev set to automatically installed. make set to automatically installed. pkg-config set to automatically installed. snapd is not logged in, snap install commands will use sudo flutter 0+git.2149a81 from Flutter Team✓ installed snapd is not logged in, snap install commands will use sudo gtk-common-themes 0.1-81-g442e511 from Canonical✓ installed snapd is not logged in, snap install commands will use sudo gnome-3-28-1804 3.28.0-19-g98f9e67.98f9e67 from Canonical✓ installed Pulling flutter-extension
- flutter channel stable Initializing Flutter % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 213k 100 213k 0 0 521k 0 --:--:-- --:--:-- --:--:-- 521k Downloading https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_3.24.5-stable.tar.xz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 661M 100 661M 0 0 15.7M 0 0:00:42 0:00:42 --:--:-- 16.9M
but when i run command snapcraft -v then it install latest flutter from snap i think that may be issue?
Yes, probably. Snapcraft uses Snap. That's why I ask you not to use Snap for running Flutter.
can you please check and guide me through snapcraft.yaml file if any issue are there.
I don't think this project officially supports Snap (and I don't think I broke Snap when upgrading CEF. You could check that by checking out an older version of this repo).
I'm sure there is a way to add these dependenciens (ninja-build libgtk-3-dev clang cmake pkg-config build-essential) to Snap, but I never worked with Snap and am not planning to.
Without Snap, Ubuntu 22.04 (as you can see in the workflows) and Ubuntu 24.04 are supported, but not if Flutter runs in Snap.
okay thanks for your support also if you find anything related to this then please let me know on [email protected]