Closed oknozor closed 5 months ago
Yeah, I've only just today started having this issue, but there haven't been any updates to pop-launcher nor onagre in a while so it's not something that changed recently here
[2022-12-14T08:38:50Z DEBUG onagre::app::subscriptions::pop_launcher] Wrote request "{\"Activate\":0}\n" to pop-launcher stdin
[2022-12-14T08:38:50Z DEBUG onagre::app::subscriptions::pop_launcher] Got a response from pop-launcher
[2022-12-14T08:38:50Z DEBUG onagre::app::subscriptions::pop_launcher] Ok(DesktopEntry { path: "/var/lib/flatpak/exports/share/applications/org.mozilla.firefox.desktop", gpu_preference: Default })
...
[2022-12-14T08:38:50Z DEBUG onagre::app] Launch DesktopEntry "/var/lib/flatpak/exports/share/applications/org.mozilla.firefox.desktop" via run_command
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/app/mod.rs:358:74
I believe the line in the stack trace is this one: https://github.com/oknozor/onagre/blob/8d4ffe9f7f38cb2d1eb3023a128856c209100cf1/src/app/mod.rs#L358
Ah, okay, so, I put in some dbg!()
in a few places, and it seems that this line results in an error: https://github.com/oknozor/onagre/blob/8d4ffe9f7f38cb2d1eb3023a128856c209100cf1/src/freedesktop/desktop.rs#L26
It's a problem with the Firefox flatpak .desktop file:
duplicate field
Keywords
Hey @jokeyrhyme thanks for reporting the issue. I'll look into it soon.
It would be appreciated if there was a solution in onagre for this, but I feel like that actual bug is malformed .desktop files, which doesn't seem like the responsibility of onagre to address
Although, onagre doesn't need all the fields in the .desktop file, so maybe there's a bespoke/alternative parsing solution here that will extract just the bare minimum values?
It looks like pop-launcher itself uses a library made by that team
Here's another malformed .desktop file that I've had to fix :)
Describe the bug Some desktop entries does not launch correctly :
To Reproduce