web-apps icon indicating copy to clipboard operation
web-apps copied to clipboard

Creating web apps

Open Merlin-Clos opened this issue 1 year ago • 18 comments

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.

Merlin-Clos avatar Oct 27 '25 18:10 Merlin-Clos

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.

rafaelhlima avatar Oct 27 '25 23:10 rafaelhlima

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 :)

hepp3n avatar Oct 28 '25 12:10 hepp3n

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.

HeitorAugustoLN avatar Nov 01 '25 15:11 HeitorAugustoLN

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?

hepp3n avatar Nov 01 '25 15:11 hepp3n

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.

HeitorAugustoLN avatar Nov 01 '25 15:11 HeitorAugustoLN

The translation for the error message is: The desktop entry provided for Install() is invalid

HeitorAugustoLN avatar Nov 01 '25 15:11 HeitorAugustoLN

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?

esamson avatar Nov 08 '25 01:11 esamson

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.

hepp3n avatar Nov 08 '25 08:11 hepp3n

Aha. It was the icon I was missing. It wasn't obvious that setting an icon was required. Works now. Thanks.

esamson avatar Nov 08 '25 12:11 esamson

In my case, I click DONE, then I get a new dialog in which I click 'Create' but nothing happens.

Image

Error in journalctl is: xdg-desktop-por[3194]: Unhandled parent window type xdg-desktop-por[3194]: Failed to associate portal window with parent window

lukemalcolm avatar Nov 09 '25 23:11 lukemalcolm

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?!

DeathCoreDad86 avatar Nov 16 '25 10:11 DeathCoreDad86

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

jabbermacy avatar Nov 16 '25 22:11 jabbermacy

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.

Dragonsong3k avatar Nov 16 '25 23:11 Dragonsong3k

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.

aziz76 avatar Dec 04 '25 05:12 aziz76

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?

Merlin-Clos avatar Dec 04 '25 06:12 Merlin-Clos

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

scottwis avatar Jan 12 '26 20:01 scottwis

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.

hepp3n avatar Jan 15 '26 17:01 hepp3n

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.

hepp3n avatar Oct 11 '26 11:10 hepp3n