ninjadev64 / opendeck-starterpack

This repository contains an OpenAction plugin that provides basic actions for use in OpenDeck.
MIT License
2 stars 2 forks source link

Input simulation not working under Wayland with KDE Plasma 6 #2

Open AkechiShiro opened 3 months ago

AkechiShiro commented 3 months ago

I see this in the logs when launching the AppImage and trying to use the OpenDeck starter kit plugin.

Gtk-Message: 00:54:34.762: Failed to load module "colorreload-gtk-module"

** (opendeck:67764): WARNING **: 00:54:34.914: webkit_settings_set_enable_offline_web_application_cache is deprecated and does nothing.
[2024-08-07][22:54:34][DEBUG][tiny_http] Server listening on 0.0.0.0:57118
[2024-08-07][22:54:34][DEBUG][tiny_http] Running accept thread
Gtk-Message: 00:54:35.541: Failed to load module "colorreload-gtk-module"
[2024-08-07][22:54:43][DEBUG][reqwest::connect] starting new connection: https://github.com/
[2024-08-07][22:54:43][DEBUG][reqwest::async_impl::client] redirecting 'https://github.com/ninjadev64/opendeck-starterpack/releases/download/1.2.0/com.amansprojects.starterpack.zip' to 'https://objects.githubusercontent.com/github-production-release-asset-2e65be/784394057/fb83901b-dcc8-4609-8d1d-a620465860b0?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=releaseassetproduction%2F20240807%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240807T225443Z&X-Amz-Expires=300&X-Amz-Signature=1ae2c57c37a774003231b457a1178260fb4c54d3a8075fdf1758889b67bb4dda&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=784394057&response-content-disposition=attachment%3B%20filename%3Dcom.amansprojects.starterpack.zip&response-content-type=application%2Foctet-stream'
[2024-08-07][22:54:43][DEBUG][reqwest::connect] starting new connection: https://objects.githubusercontent.com/
[2024-08-07][22:54:44][DEBUG][opendeck::zip_extract] Extracting to /home/kenshin/.config/com.amansprojects.opendeck/plugins
[2024-08-07][22:54:44][DEBUG][opendeck::zip_extract] Extracted 19 files
[2024-08-07][22:54:44][DEBUG][os_info::imp::lsb_release] lsb_release command failed with Os { code: 2, kind: NotFound, message: "No such file or directory" }
[2024-08-07][22:54:44][DEBUG][opendeck::events] Registered plugin com.amansprojects.starterpack.sdPlugin
[2024-08-07][22:54:51][DEBUG][os_info::imp::lsb_release] lsb_release command failed with Os { code: 2, kind: NotFound, message: "No such file or directory" }

But nothing seems to work, no commands can be launched, no input is simulated.

ninjadev64 commented 3 months ago

Seems like a bug in the os-info crate.

AkechiShiro commented 3 months ago

@ninjadev64

Should I report upstream and check with them and let this open until it's fixed upstream ??

Do you think this could cause the loss of functionality with OpenDeck that I see ?

AkechiShiro commented 3 months ago

It seems even with the package lsb-release I still have no functionality, should I be on Wayland or X11 for input simulation ?

ninjadev64 commented 3 months ago

Do you think this could cause the loss of functionality with OpenDeck that I see ?

Yes, OpenDeck will not be able to start plugins if this crate is returning an error, as the operating system info from this crate is passed to plugins.

ninjadev64 commented 3 months ago

Please do also try using Run Command with touch ~/test and see if a test file is created in your home directory. It was midnight when I first read this issue on my phone, and reading it again, it looks like that error from os-info is not fatal, and the plugin is being registered.

AkechiShiro commented 3 months ago

The run command action seems to work but input simulation doesn't work on Wayland KDE/Plasma 6

ninjadev64 commented 3 months ago

The run command action seems to work but input simulation doesn't work on Wayland KDE/Plasma 6

What are you putting in the text box?

ninjadev64 commented 3 months ago

You could also check the logs of the starter pack plugin in ~/.config/com.amansprojects.opendeck/plugins/com.amansprojects.starterpack/plugin.log

AkechiShiro commented 3 months ago

I don't see this folder but I have those :

 com.amansprojects.starterpack.sdPlugin
 com.barraider.advancedlauncher.sdPlugin
 com.exension.stocks.sdPlugin

I checked inside starterpack.sdPlugin but the plugin.log file doesn't have much besides this line :

 21:00:17 [DEBUG] (1) tungstenite::handshake::client: Client handshake done.

EDIT : In the text box, I just left the default text that was set but it doesn't work (probably should input Hello World).

ninjadev64 commented 3 months ago

I don't see this folder but I have those :

 com.amansprojects.starterpack.sdPlugin
 com.barraider.advancedlauncher.sdPlugin
 com.exension.stocks.sdPlugin

Yeah, sorry, the first one is what I meant. By the way, Advanced Launcher will only work on Windows.

I checked inside starterpack.sdPlugin but the plugin.log file doesn't have much besides this line :

 21:00:17 [DEBUG] (1) tungstenite::handshake::client: Client handshake done.

And nothing else is added after you press the input simulation button?

EDIT : In the text box, I just left the default text that was set but it doesn't work (probably should input Hello World).

The default text is not actually set, it's just a greyed-out placeholder, you would have to copy it into the box and press Update manually, otherwise it's empty.

AkechiShiro commented 3 months ago

Yes nothing seems to be added, oh okay I didn't understand, will try to set it then and attempt to test, maybe it does work and I just didn't set the text actually...

I saw also that wine gets launched maybe the advanced launcher works only with Wine ?

AkechiShiro commented 3 months ago

Seems to still not do anything, the errors in the logs are most likely due to a typo I made prior to the last command I input in the opendeck software : image

ninjadev64 commented 3 months ago

Hmm, maybe a problem with enigo then.

AkechiShiro commented 3 months ago

Should I open an issue upstream pointing to this one ?

AkechiShiro commented 3 months ago

Is wayland feature flags added for opendeck, I see that it's not out of the box with enigo @ninjadev64

ninjadev64 commented 3 months ago

Is wayland feature flags added for opendeck, I see that it's not out of the box with enigo @ninjadev64

Not sure, but I use Wayland (GNOME though) and it works for me. Maybe test under Xorg to narrow down the problem a bit further.

ninjadev64 commented 3 months ago

@AkechiShiro in the latest release, I removed a filter on the log that would have been preventing any logs from enigo from being added to the log file. Please do update to 1.3.0 of this plugin and see if there's any useful information in the logs now.

Edit: you can also try with just [t("hello world")] as a more simple test case.