Creating web apps
Hi, I'm on Pop_OS! 24.04 LTS Beta and I installed Quick Web Apps via the Cosmic Store (Flathub).
When I create my Notion web application, I add the logo, name, and category. I've tried all possible combinations of toggle buttons and set the window size smaller than my resolution to avoid problems.
But when I click “Done,” nothing happens.
Same issue here... after installing the flatpak version of the app, I am unable to finish creating a webapp. I fill in all the fields and the "Done" but remains disabled.
Hello,
Sorry for the issues. I thought I tested it properly so not sure yet what's the issue. Will look into it but currently I'm kind of busy. Update will be as fast as possible :)
Running into this error:
thread 'tokio-runtime-worker' panicked at /build/source/src/launcher.rs:92:14:
Failed to prepare install: Portal(InvalidArgument("O ícone do lançador dinâmico falhou na validação"))
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: webapps::launcher::WebAppLauncher::create::{{closure}}
4: <futures_util::stream::stream::map::Map<St,F> as futures_core::stream::Stream>::poll_next
5: <futures_util::stream::select_all::SelectAll<St> as futures_core::stream::Stream>::poll_next
6: <futures_util::stream::stream::forward::Forward<St,Si,Item> as core::future::future::Future>::poll
7: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
8: tokio::runtime::task::core::Core<T,S>::poll
9: tokio::runtime::task::harness::Harness<T,S>::poll
10: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
11: tokio::runtime::scheduler::multi_thread::worker::Context::run
12: tokio::runtime::context::scoped::Scoped<T>::set
13: tokio::runtime::context::runtime::enter_runtime
14: tokio::runtime::scheduler::multi_thread::worker::run
15: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
16: tokio::runtime::task::core::Core<T,S>::poll
17: tokio::runtime::task::harness::Harness<T,S>::poll
18: tokio::runtime::blocking::pool::Inner::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Hey @HeitorAugustoLN Is it saying about invalid icon? We using Dynamic Launcher Portal now to export desktop files so it must be valid here. What type of icon you choose?
It was a random png file I had, I changed it to another one and the error is different
[Desktop Entry]
Version=1.0
Type=Application
Name=youtube
Comment=Quick WebApp
Exec=dev.heppen.webapps.webview youtube2584
StartupWMClass=youtube2584
Categories=Video
thread 'tokio-runtime-worker' panicked at /build/source/src/launcher.rs:107:14:
Failed to install: Portal(InvalidArgument("A entrada desktop fornecida para Install() não é válida"))
stack backtrace:
0: __rustc::rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: webapps::launcher::WebAppLauncher::create::{{closure}}
4: <futures_util::stream::stream::map::Map<St,F> as futures_core::stream::Stream>::poll_next
5: <futures_util::stream::select_all::SelectAll<St> as futures_core::stream::Stream>::poll_next
6: <futures_util::stream::stream::forward::Forward<St,Si,Item> as core::future::future::Future>::poll
7: <futures_util::future::future::map::Map<Fut,F> as core::future::future::Future>::poll
8: tokio::runtime::task::core::Core<T,S>::poll
9: tokio::runtime::task::harness::Harness<T,S>::poll
10: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
11: tokio::runtime::scheduler::multi_thread::worker::Context::run
12: tokio::runtime::context::scoped::Scoped<T>::set
13: tokio::runtime::context::runtime::enter_runtime
14: tokio::runtime::scheduler::multi_thread::worker::run
15: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
16: tokio::runtime::task::core::Core<T,S>::poll
17: tokio::runtime::task::harness::Harness<T,S>::poll
18: tokio::runtime::blocking::pool::Inner::run
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
The translation for the error message is: The desktop entry provided for Install() is invalid
Same issue here... after installing the flatpak version of the app, I am unable to finish creating a webapp. I fill in all the fields and the "Done" but remains disabled.
I experience the same here, where the "Done" button is disabled and not clickable.
Just checking that this is the same as what original reporter is describing? @StenguyzCSGO , is your "Done" button clickable but doing nothing, or plain disabled like @rafaelhlima and myself?
is your "Done" button clickable but doing nothing
It might be issue with xdg desktop portal. Make sure one is installed. It must support Dynamic Launcher Portal. Because it's responsible for creating desktop files. So at least install xdg-desktop-portal-gtk
If it's disabled entirely.
Some check for valid entry must fail. So it must be invalid icon, invalid name or URL address. Also make sure to select of the category. If those 4 items are set, it should at least allow you to press the button. Not sure what's the case.
Aha. It was the icon I was missing. It wasn't obvious that setting an icon was required. Works now. Thanks.
In my case, I click DONE, then I get a new dialog in which I click 'Create' but nothing happens.
Error in journalctl is: xdg-desktop-por[3194]: Unhandled parent window type xdg-desktop-por[3194]: Failed to associate portal window with parent window
Hi when i try to create a web app i can add app image and text but when i click Done it doesn't do anything?!
OK no idea what I'm doing wrong, but I can't get the 'DONE' button to ever highlight.... OK added ICON, now just get javascript error box
OK no idea what I'm doing wrong, but I can't get the 'DONE' button to ever highlight.... OK added ICON, now just get javascript error box
It's a bit goofy but the Icon has to be selected. The name field, and I think one other field is required.
The UI doesn't do a good job at telling you what is required.
Hi when i try to create a web app i can add app image and text but when i click Done it doesn't do anything?!
I am getting the same thing. I selected an icon, gave a name, address and category. The 'Done' button is active but when I click it nothing happens.
Running the flatpak version.
Same issue here... after installing the flatpak version of the app, I am unable to finish creating a webapp. I fill in all the fields and the "Done" but remains disabled.
I experience the same here, where the "Done" button is disabled and not clickable.
Just checking that this is the same as what original reporter is describing? @StenguyzCSGO , is your "Done" button clickable but doing nothing, or plain disabled like @rafaelhlima and myself?
Hi, Sorry for the delay, I missed the notifications.
To clarify: I am definitely filling in all the required fields (including the Icon and Category). The "Done" button becomes active (it is not grayed out), but when I click on it, absolutely nothing happens.
Since I am on Pop_OS! 24.04 (COSMIC), it is possible that I am missing a dependency related to xdg-desktop-portal as mentioned above. Is there a specific command I should run to check the logs and confirm if the portal is crashing?
I'm also seeing this, and the problem seems to be with icon validation.
Specifically, the prepare_install call is getting back the error Dynamic launcher icon failed validation.
If I look at journalctl --user -u xdg-desktop-portal -f I see:
Icon validation: Child process exited with code 1
If I run:
sudo strace -f -s 200 -e execve -p 80939 | grep icon
I see
execve("/usr/libexec/xdg-desktop-portal-validate-icon", ["/usr/libexec/xdg-desktop-portal-validate-icon", "--sandbox", "512", "512", "/tmp/icon3GGAJ3"]
If I run xdg-desktop-portal-validate-icon --sandbox 512 512 <orig_icon_file>.png, I get an error about bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted. It works if I remove --sandbox.
I think the issue is related to Ubuntu App Armor profiles and bwrap. The default apparmor profile on Ubuntu appears to restrict bwrap from creating user namespaces, and the --sandbox options runs the validation inside a bwrap sandbox. Creating
abi <abi/4.0>,
include <tunables/global>
profile bwrap /usr/bin/bwrap flags=(unconfined) {
userns,
@hepp3n FYI
# Site-specific additions and overrides. See local/README for details.
include if exists <local/bwrap>
}
under /etc/apparmor.d/bwrap
and restarting app armor with
sudo systemctl reload apparmor
fixed the problem. Creating apps now works.
This change is generally benign, as it just allows the bwrap executable to create unprivlidged user namespaces when it setups up a sandbox, and parsing image files inside a sandbox seems like a better idea that doing it outside of a sandbox.
Howerver, anyone using the app is going to have to update the app armor profile.
Have you considered just writing the desktop entry without doing through the portal?
@hepp3n FYI
Have you considered just writing the desktop entry without doing through the portal?
Yes that was the case before. But after some time I decided to get rid of old style of creating web apps and go FULL flatpak way. So, one engine, embedded, and flatpak way of creating things to reduce used permissions. So, using portals. I was pushed into this DynamincLauncher Portal direction which I liked before but as everyone see this comes with issues.
So this is history.
To be honest. I lost inerest with using this app. Now it's much easier to make a PWA or omarchy way of creating web apps.
A lot of bad decision in my development, but I just learned new stuff. Sorry for disappointment but for me at least that was fun.
Have you considered just writing the desktop entry without doing through the portal?
Yes. Already we did that on the first versions of the app, and will be still doing when this merged: https://github.com/cosmic-utils/web-apps/pull/137
No more dynamic launcher portal.