keymanapp / keyman

Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
https://keyman.com/
Other
372 stars 102 forks source link

fix(linux): Don't start ibus-daemon multiple times 🚌 #6283

Closed ermshiperete closed 2 years ago

ermshiperete commented 2 years ago

This change adds a 1s sleep after restarting ibus before checking that it actually runs. Hopefully this will solve the problem. Since this bug is hard to reproduce, we also log a critical error for the other code path this could happen.

Fixes #6237.

User Testing

Preparations

Tests

keymanapp-test-bot[bot] commented 2 years ago

User Test Results

Test specification and instructions

Test Artifacts

bharanidharanj commented 2 years ago
bharanidharanj commented 2 years ago
bharanidharanj commented 2 years ago
bharanidharanj commented 2 years ago
bharanidharanj commented 2 years ago
ermshiperete commented 2 years ago

@bharanidharanj Could I ask you to re-run the tests with the new instructions. Thanks!

I added some debug output, so hopefully this will allow me to figure out what's going wrong. In my local testing I'm not able to reproduce the problem after having the additional debug statements in place.

@keymanapp-test-bot retest all

bharanidharanj commented 2 years ago

GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

km-config.log

bharanidharanj commented 2 years ago

GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

km-config2.log

bharanidharanj commented 2 years ago

@bharanidharanj Could I ask you to re-run the tests with the new instructions. Thanks!

I added some debug output, so hopefully this will allow me to figure out what's going wrong. In my local testing I'm not able to reproduce the problem after having the additional debug statements in place.

@keymanapp-test-bot retest all

@ermshiperete Okay, I will re-run the tests with the new instructions, you have mentioned in this PR.

bharanidharanj commented 2 years ago

GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11

bharanidharanj commented 2 years ago

GROUP_IMPISH_X11: Ubuntu 21.10 Impish with Gnome Shell and X11

GROUP_IMPISH_WAYLAND: Ubuntu 21.10 Impish with Gnome Shell and Wayland

bharanidharanj commented 2 years ago

GROUP_WASTA: Wasta 20.04 with Cinnamon

bharanidharanj commented 2 years ago

GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

km-config.log

km-config2.log

ermshiperete commented 2 years ago

@bharanidharanj Can you please test again? Don't forget to install the new build (linked in the "User Test Results" comment). Please test on all platforms, starting with Bionic, until you get a failure. Thanks!

@keymanapp-test-bot retest GROUP_BIONIC all

bharanidharanj commented 2 years ago

@bharanidharanj Can you please test again? Don't forget to install the new build (linked in the "User Test Results" comment). Please test on all platforms, starting with Bionic, until you get a failure. Thanks!

@keymanapp-test-bot retest GROUP_BIONIC all

@ermshiperete Sure. I will test it and will post my comment.

bharanidharanj commented 2 years ago

GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

km-config.log

km-config2.log

ermshiperete commented 2 years ago

@bharanidharanj That doesn't look like it's running the version from this PR. Can you show me the output of km-config --version?

bharanidharanj commented 2 years ago

@ermshiperete km-config version 16.0.2-alpha

bharanidharanj commented 2 years ago

GROUP_IMPISH_X11: Ubuntu 21.10 Impish with Gnome Shell and X11

GROUP_IMPISH_WAYLAND: Ubuntu 21.10 Impish with Gnome Shell and Wayland

GROUP_WASTA: Wasta 20.04 with Cinnamon

km-config.log

GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11

ermshiperete commented 2 years ago

@ermshiperete km-config version 16.0.2-alpha

@bharanidharanj That should be 15.0.210-beta. Please install the package built for this PR by following the steps in the wiki. Please let me know if the instructions in the wiki are not clear enough. Thanks!

bharanidharanj commented 2 years ago

@ermshiperete As per our discussion, I have attached the Screenshot as well as the log file for your reference.

km-config.log

ermshiperete commented 2 years ago

@bharanidharanj Please try again. I made some preliminary changes - so you can stop testing after the first failure.

@keymanapp-test-bot retest all

MakaraSok commented 2 years ago

Test Results

GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

I've uninstalled and removed everything related to Keyman using

sudo apt remove keyman ibus-keyman python3-keyman-config libkmnkbp0-0
sudo apt autoremove

and

rm -rf ~/.local/share/keyman/
sudo rm -rf /usr/local/share/keyman/

then after restarting the machine, the instructions at https://github.com/keymanapp/keyman/wiki/How-to-test-artifacts-from-pull-requests-for-Keyman-for-Linux were followed, but the second line of commands show some suspicious errors, see below:

keyman@keyman-VirtualBox:~/Desktop/archive-6/results$ sudo apt update
[sudo] password for keyman: 
Hit:1 http://kh.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://kh.archive.ubuntu.com/ubuntu bionic-updates InRelease             
Hit:3 http://kh.archive.ubuntu.com/ubuntu bionic-backports InRelease           
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease              
Reading package lists... Done
Building dependency tree       
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
keyman@keyman-VirtualBox:~/Desktop/archive-6/results$ sudo dpkg -i \
> {ibus-keyman,libkmnkbp0}*$(lsb_release -s -c)*$(dpkg --print-architecture).deb \
> {keyman,python3-keyman-config}*$(lsb_release -s -c)*all.deb
Selecting previously unselected package ibus-keyman.
(Reading database ... 168797 files and directories currently installed.)
Preparing to unpack ibus-keyman_15.0.212-1~PR-6283+bionic21_amd64.deb ...
Unpacking ibus-keyman (15.0.212-1~PR-6283+bionic21) ...
Selecting previously unselected package libkmnkbp0-0:amd64.
Preparing to unpack libkmnkbp0-0_15.0.212-1~PR-6283+bionic21_amd64.deb ...
Unpacking libkmnkbp0-0:amd64 (15.0.212-1~PR-6283+bionic21) ...
Selecting previously unselected package keyman.
Preparing to unpack keyman_15.0.212-1~PR-6283+bionic21_all.deb ...
Unpacking keyman (15.0.212-1~PR-6283+bionic21) ...
Selecting previously unselected package python3-keyman-config.
Preparing to unpack python3-keyman-config_15.0.212-1~PR-6283+bionic21_all.deb ...
Unpacking python3-keyman-config (15.0.212-1~PR-6283+bionic21) ...
Setting up libkmnkbp0-0:amd64 (15.0.212-1~PR-6283+bionic21) ...
dpkg: dependency problems prevent configuration of python3-keyman-config:
 python3-keyman-config depends on python3-bs4; however:
  Package python3-bs4 is not installed.
 python3-keyman-config depends on python3-sentry-sdk (>= 1.1) | python3-raven; however:
  Package python3-sentry-sdk is not installed.
  Package python3-raven is not installed.
 python3-keyman-config depends on python3-lxml; however:
  Package python3-lxml is not installed.
 python3-keyman-config depends on python3-magic; however:
  Package python3-magic is not installed.
 python3-keyman-config depends on python3-numpy; however:
  Package python3-numpy is not installed.
 python3-keyman-config depends on python3-qrcode; however:
  Package python3-qrcode is not installed.
 python3-keyman-config depends on python3-requests-cache; however:
  Package python3-requests-cache is not installed.

dpkg: error processing package python3-keyman-config (--install):
 dependency problems - leaving unconfigured
Setting up ibus-keyman (15.0.212-1~PR-6283+bionic21) ...
dpkg: dependency problems prevent configuration of keyman:
 keyman depends on python3-keyman-config (= 15.0.212-1~PR-6283+bionic21); however:
  Package python3-keyman-config is not configured yet.

dpkg: error processing package keyman (--install):
 dependency problems - leaving unconfigured
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for libc-bin (2.27-3ubuntu1.5) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.9) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for shared-mime-info (1.9-2) ...
Errors were encountered while processing:
 python3-keyman-config
 keyman
ermshiperete commented 2 years ago

@MakaraSok The errors you get in the dpkg step are kind of expected - you get them because dpkg doesn't automatically install all dependencies python3-keyman-config requires, and so that package can't be completely installed yet. However, the next command in the instructions (sudo apt install -f) will fix this.

@keymanapp-test-bot retest GROUP_BIONIC TEST_KB_INSTALL1

bharanidharanj commented 2 years ago

GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

km-config.log

km-config2.log

bharanidharanj commented 2 years ago

GROUP_WASTA: Wasta 20.04 with Cinnamon

bharanidharanj commented 2 years ago

GROUP_FOCAL: Ubuntu 20.04 Focal with Gnome Shell and X11

bharanidharanj commented 2 years ago

GROUP_BIONIC: Ubuntu 18.04 Bionic with Gnome Shell and X11

bharanidharanj commented 2 years ago

GROUP_IMPISH_X11: Ubuntu 21.10 Impish with Gnome Shell and X11

GROUP_IMPISH_WAYLAND: Ubuntu 21.10 Impish with Gnome Shell and Wayland

keyman-server commented 2 years ago

Changes in this pull request will be available for download in Keyman version 15.0.213-beta