New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some touch events are not being fired on Ubuntu-Core #2463
Comments
Some things weren't obvious to me from the discussion:
Unless you are running the Electron app with Another thing to try is running the Electron snap on Ubuntu Frame on Ubuntu 20.04. I suspect this will have the same behavior as Core, but would be good to check. |
I have tried (on 22.04 Desktop) running the chromium snap (configured to use Wayland) on Ubuntu Frame. Two finger pinch works. To configure Chrome to use Wayland:
Testing process:
Expect: page zooms This strongly suggests that the problem is with @jdbelo's Electron snap. Either with the Electron version being used or with the snap recipe (e.g. using Xwayland - although I would expect that to work anyway.) |
i can not verify that this works but it produces a lot of output
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Just to check if I understand corretly, when I run the electron app on Ubuntu Core, these flags (somehow) enable electron to use Wayland ( How do I check if it's running Wayland or XWayland? With or without flags the environment variable DISPLAY remains empty. |
Not quite. On Linux there are two protocols Electron (or other apps) can use to connect to the compositor: X11 and Wayland. X11 is an old protocol dating back to 1980 and Wayland is the more recent replacement and addresses a range of issues (like security) that have become important over the decades. Electron's "Ozone" platform supports both X11 and Wayland, but currently defaults to X11. Hence the need for the above switches.
The "modern" approach is described here: https://mir-server.io/docs/packaging-an-electron-application-as-an-iot-gui |
The current switch for the autodetection
Notewithout this switch it uses default only with that switch it starts autodetection once autodetection got reported to work correct by google via incremental rollout to testers it will get a default flag. |
Thanks So, as I'm using these flags "My" custom electron snap is available here. The only change I've done was including the flags you have suggested in the wrapper.sh file. This is my wrapper.sh file
|
That is the "old way" using X11, it includes: ...
command: usr/local/bin/x11_kiosk_launch $SNAP/snap/command-chain/desktop-launch $SNAP/usr/bin/wrapper
...
stage-snaps:
- mir-kiosk-x11 Where the |
I've been playing around with the Electron-quick-start branch of the iot-example-graphical-snap and I realized that there is no way to change de default URL. Although the env variable I was able to change the url using the However, the multitouch behavior remains the same. The zoom-in gesture isn't still working. |
That is puzzling, but this problem is not seen with other applications or toolkits. And I specifically checked with Chromium (on Classic, not Core but there should be no significant differences in the input stack). If I have time later, I will try to reproduce with your changes to the Electron snap |
@AlanGriffiths just pinging you to know if you got the time to test that if there is anything we can do upstream simply ping me running on snapd (ubuntu core) is a big thing for me as i Plan to ship Terminals and Workstations to endcustomers with that. |
@frank-dspeed Canonical doesn't have any customers with this problem. So, while I want it solved, I have other priorities... My next questions are:
If you can help with either/both of these that would help. |
@jdbelo can you please verify if that works with ubuntu-frame it is the successor of mir-kiosk i do not run into that issue with ubuntu-frame |
You've built the app as described above? Or tested one of your own?
The problem won't be the differences between It is likely to be differences in what you are testing: either the way you're building the test app, or the hardware |
@AlanGriffiths I've also realized that the flags which are being used in the Electron branch of the iot-example-graphical-snap are not exactly the same that were suggested here. Flags used on the iot-example-graphical-snap: Flags suggested here: Regarding the two questions above, I can add that I've already used two different multitouch screens and the behavior was exactly the same. |
please try it with only the hint set to auto. the other settings for ozone can be ignored and for wayland also and use a current chromium snap |
There is no problem with chromium, just with this Electron app |
Those differences shouldn't be a problem, but the snap should be using |
electron === old chromium build so everything that does not work there should also not work in chromium and vice versa |
We agree it works in current Chromium. But Chromium support for Wayland has been improving rapidly: This might be something that got fixed. |
Is there any alternative solution to electron on Ubuntu Core? I mean, I need a browser to load the URL but it mustn’t be exactly electron. |
|
WPE Webkit for Mir Kiosk does not solve this situation (I've already tested it). The custom electron snap works better and offers us more control in terms of what is being installed. Do you have any idea about what should be my next step to make pitch/zoom-in work? |
Not as such, but I can add something to this discussion: I built the I found that the pinch gestures are being interpreted as "resize" and cause the window to be resized (which would not be effective on Ubuntu Frame as the window is fullscreen). That's a choice the application makes (I don't know if that is in Electron code or in the "electron-quick-start" example). Maybe this means something to you. In any case, I think it is now clear that Mir is passing these events through correctly. So I'm closing the issue. |
Many Thanks. |
I saw the window resize |
next step is to open that in electron as alan pointed out it will be something with the custom window handling code of them as this is also not chromium behavior |
@AlanGriffiths could you please repeat the test you performed pointing electron to the google maps URL? Is the window still being resized? I've just performed this test (using Ubuntu Core) and the zoom-in gesture worked perfectly. Note: I had to make a little change to your repo. I removed |
I've also realized there are some error messages in the
|
@jdbelo this closed bug report against Mir about touch gestures not working for Electron is not the place to be asking about packaging Electron as a snap. |
Thanks. I continue to make tests because in I'm still not sure this is only an electron issue. Are you sure this is only an electron issue? If you point electron to google maps you will see that there are no problems and all gestures work perfectly. This looks weird to me. I wouldn't expect different behaviors depending on the loaded URL, but I might not have the whole picture of the issue. |
I am sure it is not a Mir issue: changing the URL used by the Electron app won't affect what Mir is doing |
Ok. Thanks for your support. My last question here is: where is the best place to request help on packaging electron apps as a snap and to discuss some points regarding electron flags and error messages (☝️)? |
For things specific to the IoT example: https://github.com/MirServer/iot-example-graphical-snap/issues and, for more general questions https://forum.snapcraft.io/c/snapcraft/13
Does Electron have some support forums? |
Yes, they do |
Hi everyone,
I’ve been struggling to integrate a multitouch film into my kiosk solution without success. For some reason, there are multitouch inputs that are not recognized (for instance, two fingers pinch) on the ubuntu-core (core20).
I opened this discussion on snapcraft forum and there I was recommended to open this issue here as well. You track the discussion here.
In a nutshell, some multitouch events are recognized in Ubuntu Desktop 20.04 but aren't recognized in Ubuntu Core (core20).
Does anyone have an idea about how to overcome this situation?
Thanks
The text was updated successfully, but these errors were encountered: