Skip to content
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

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome #1429

Closed
aryoda opened this issue Apr 25, 2023 · 9 comments · Fixed by #1431
Closed

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome #1429

aryoda opened this issue Apr 25, 2023 · 9 comments · Fixed by #1431
Assignees
Labels
Bug Wayland Issues related to Wayland-based desktop environments

Comments

@aryoda
Copy link
Contributor

aryoda commented Apr 25, 2023

The user @topas-rec reported in #1421 (comment) a failing unit test on ARCH Linux caused by this additional (not expected) warning in the actual output:

Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.

Furthermore this warning occurs if the optional package qt5-wayland is not installed:

qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""

System info:

$ echo $XDG_SESSION_TYPE
wayland

$ echo $QT_QPA_PLATFORM


$ echo $XDG_CURRENT_DESKTOP
GNOME

Details

python -m unittest  -b test/test_backintime.py
.Fs
======================================================================
FAIL: test_local_snapshot_is_successful (test.test_backintime.TestBackInTime)
end to end test - from BIT initialization through snapshot
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tobiasb/.cache/yay/backintime/src/backintime-1.3.3/common/test/test_backintime.py", line 147, in test_local_snapshot_is_successful
    self.assertRegex(filtered_log_output, re.compile(r'''INFO: Lock
AssertionError: Regex didn't match: 'INFO: Lock\nINFO: Take a new snapshot. Profile: 1 Main profile\nINFO: Call rsync to take the snapshot\nINFO: Save config file\nINFO: Save permissions\nINFO: Create info file\nINFO: Unlock\n' not found in 'INFO: Lock\nINFO: Take a new snapshot. Profile: 1 Main profile\nINFO: Call rsync to take the snapshot\nINFO: Save config file\nINFO: Save permissions\nINFO: Create info file\nWarning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.\nqt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""\nThis application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.\n\nAvailable platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.\n\nINFO: Unlock\n'

See also

https://aur.archlinux.org/pkgbase/backintime#comment-911755

@aryoda aryoda added the Wayland Issues related to Wayland-based desktop environments label Apr 25, 2023
@aryoda aryoda self-assigned this Apr 25, 2023
@aryoda
Copy link
Contributor Author

aryoda commented Apr 25, 2023

I have added both warnings to the unit test exclusion list since the goal of the unit test is to test only BiT CLI (not the GUI parts which are related to Qt5 and are triggered if the e.g. the system tray plugin is installed).

In the future a refactoring of BiT CLI und Qt (GUI) should be used to improve the unit test isolation to get rid of such side effects.

Also note: A non-english system language may possibly lead to a failed unit test again if Qt5 uses it (not tested)...

aryoda added a commit that referenced this issue Apr 25, 2023
Also ignores the qt.qpa.plugin warning:
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
@buhtz
Copy link
Member

buhtz commented Apr 26, 2023

I have...

Great!

First I was confused about the workflow and tried to find out where that commit belongs to. ;) Now I get it that you created an extra public upstream branch. IMHO can be merged into "dev".

Also note: A non-english system language may possibly lead to a failed unit test again if Qt5 uses it (not tested)...

To my knowledge because of that pythons unittests by default ignoring system language. So it is always English (or untranslated).

@aryoda
Copy link
Contributor Author

aryoda commented Apr 26, 2023

@buhtz

tried to find out where that commit belongs to

yes, I didn't mention that I was using the Github UI directly to create and link the branch in this repo (and delete it again after merging).

IMHO can be merged into "dev".

I'd like to wait for feed-back from the ARCH community who reported this issue and merge then (via PR if possible)

@killajoe
Copy link

killajoe commented May 2, 2023

using git PKGBUILD backintime-git still fails on testing:
make: *** [Makefile:570: unittest] Error 1

Traceback (most recent call last):
  File "/home/joe/.cache/yay/backintime-git/src/backintime/common/test/test_backintime.py", line 176, in test_local_snapshot_is_successful
    self.assertRegex(filtered_log_output, re.compile(r'''INFO: Lock
AssertionError: Regex didn't match: 'INFO: Lock\nINFO: Take a new snapshot. Profile: 1 Main profile\nINFO: Call rsync to take the snapshot\nINFO: Save config file\nINFO: Save permissions\nINFO: Create info file\nINFO: Unlock' not found in 'INFO: Lock\nINFO: Take a new snapshot. Profile: 1 Main profile\nINFO: Call rsync to take the snapshot\nINFO: Save config file\nINFO: Save permissions\nWarning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.\nINFO: Create info file\nINFO: Unlock'

@aryoda
Copy link
Contributor Author

aryoda commented May 2, 2023

using git PKGBUILD backintime-git still fails on testing

Yes, the PKGBUILD does not yet use my fix (commit f056d90) because it is not yet merged.

I will merge it ASAP since the warning message to be ignored is the same...

Update: Pull request created (see below)

aryoda added a commit that referenced this issue May 2, 2023
@aryoda aryoda added the Bug label May 2, 2023
aryoda added a commit that referenced this issue May 3, 2023
* Fix #1429 (Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome)

Also ignores the qt.qpa.plugin warning:
qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
@aryoda
Copy link
Contributor Author

aryoda commented May 3, 2023

The fix is merged into the dev branch now: 66d248f

@topas-rec
Copy link

Tried to test it - but I still get the error.

I changed to the latest dev version, installed qt5-wayland, exported export QT_QPA_PLATFORM=wayland.

Results are in the log with checks for the variables set and a cat of the file CHANGES to show that it is the dev version used for the build.

Build log
[tobiasb@tobias-pc ~]$ sudo pacman --sync qt5-wayland
resolving dependencies...
looking for conflicting packages...

Packages (1) qt5-wayland-5.15.9+kde+r55-1

Total Installed Size:  6.11 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                                                                                             [#####################################################################################] 100%
(1/1) checking package integrity                                                                                                           [#####################################################################################] 100%
(1/1) loading package files                                                                                                                [#####################################################################################] 100%
(1/1) checking for file conflicts                                                                                                          [#####################################################################################] 100%
(1/1) checking available disk space                                                                                                        [#####################################################################################] 100%
:: Processing package changes...
(1/1) installing qt5-wayland                                                                                                               [#####################################################################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[tobiasb@tobias-pc ~]$ export QT_QPA_PLATFORM=wayland
[tobiasb@tobias-pc ~]$ yay --sync --aur --editmenu --mflags --skipinteg backintime
AUR Explicit (1): backintime-1.3.3-3
AUR Dependency (1): backintime-cli-1.3.3-3
:: PKGBUILD up to date, skipping download: backintime
:: PKGBUILD up to date, skipping download: backintime
  1 backintime                               (Build Files Exist)
==> Packages to cleanBuild?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> A
:: Deleting (1/1): /home/tobiasb/.cache/yay/backintime
HEAD is now at 1a14ec8 Update to 1.3.3-3
warning: could not open directory 'pkg/': Permission denied
Removing dev.zip
Removing pkg/
Removing src/
  1 backintime                               (Build Files Exist)
==> Diffs to show?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 
  1 backintime                               (Build Files Exist)
==> PKGBUILDs to edit?
==> [N]one [A]ll [Ab]ort [I]nstalled [No]tInstalled or (1 2 3, 1-3, ^4)
==> 1
 -> 
$EDITOR is not set
 -> Add $EDITOR or $VISUAL to your environment variables
==> Edit PKGBUILD with?
==> nano

:: Proceed with install? [Y/n] 
==> Making package: backintime dev-3 (Sat 06 May 2023 08:15:20 CEST)
==> Retrieving sources...
  -> Downloading dev.zip...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  853k    0  853k    0     0  1312k      0 --:--:-- --:--:-- --:--:-- 1312k
==> WARNING: Skipping all source file integrity checks.
:: (1/1) Parsing SRCINFO: backintime
==> Making package: backintime dev-3 (Sat 06 May 2023 08:15:22 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found dev.zip
==> WARNING: Skipping all source file integrity checks.
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting dev.zip with bsdtar
==> Sources are ready.
==> Making package: backintime dev-3 (Sat 06 May 2023 08:15:24 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Starting build()...
All OK. Now run:
    make
    sudo make install
msgfmt -o po/zh_TW.mo po/zh_TW.po
msgfmt -o po/zh_CN.mo po/zh_CN.po
msgfmt -o po/uk.mo po/uk.po
msgfmt -o po/tr.mo po/tr.po
msgfmt -o po/th.mo po/th.po
msgfmt -o po/sv.mo po/sv.po
msgfmt -o po/sr.mo po/sr.po
msgfmt -o po/sl.mo po/sl.po
msgfmt -o po/sk.mo po/sk.po
msgfmt -o po/ru.mo po/ru.po
msgfmt -o po/ro.mo po/ro.po
msgfmt -o po/pt.mo po/pt.po
msgfmt -o po/pt_BR.mo po/pt_BR.po
msgfmt -o po/pl.mo po/pl.po
msgfmt -o po/nn.mo po/nn.po
msgfmt -o po/nl.mo po/nl.po
msgfmt -o po/nb.mo po/nb.po
msgfmt -o po/lt.mo po/lt.po
msgfmt -o po/ko.mo po/ko.po
msgfmt -o po/jv.mo po/jv.po
msgfmt -o po/ja.mo po/ja.po
msgfmt -o po/it.mo po/it.po
msgfmt -o po/is.mo po/is.po
msgfmt -o po/id.mo po/id.po
msgfmt -o po/hu.mo po/hu.po
msgfmt -o po/hr.mo po/hr.po
msgfmt -o po/he.mo po/he.po
msgfmt -o po/gl.mo po/gl.po
msgfmt -o po/fr.mo po/fr.po
msgfmt -o po/fo.mo po/fo.po
msgfmt -o po/fi.mo po/fi.po
msgfmt -o po/eu.mo po/eu.po
msgfmt -o po/et.mo po/et.po
msgfmt -o po/es.mo po/es.po
msgfmt -o po/eo.mo po/eo.po
msgfmt -o po/en_GB.mo po/en_GB.po
msgfmt -o po/en_CA.mo po/en_CA.po
msgfmt -o po/el.mo po/el.po
msgfmt -o po/de.mo po/de.po
msgfmt -o po/da.mo po/da.po
msgfmt -o po/cs.mo po/cs.po
msgfmt -o po/ca.mo po/ca.po
msgfmt -o po/bs.mo po/bs.po
msgfmt -o po/bg.mo po/bg.po
msgfmt -o po/ar.mo po/ar.po
#man pages
for i in $(ls -1 man/C/); do case $i in *.gz|*~) continue;; *) gzip -n --best -c man/C/$i > man/C/${i}.gz;; esac; done
#config-examples
gzip -n --best -c config-example-local > config-example-local.gz
gzip -n --best -c config-example-ssh > config-example-ssh.gz
All OK. Now run:
    make
    sudo make install
#man pages
for i in $(ls -1 man/C/); do case $i in *.gz|*~) continue;; *) gzip -n --best -c man/C/$i > man/C/${i}.gz;; esac; done
==> Starting check()...
python -m unittest  -b test/test_applicationinstance.py
...................
----------------------------------------------------------------------
Ran 19 tests in 0.033s

OK
python -m unittest  -b test/test_argparser.py
.....................
----------------------------------------------------------------------
Ran 21 tests in 2.554s

OK
python -m unittest  -b test/test_backintime.py
.Fs
======================================================================
FAIL: test_local_snapshot_is_successful (test.test_backintime.TestBackInTime.test_local_snapshot_is_successful)
From BIT initialization through snapshot
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tobiasb/.cache/yay/backintime/src/backintime-dev/common/test/test_backintime.py", line 178, in test_local_snapshot_is_successful
    self.assertRegex(filtered_log_output, re.compile(r'''INFO: Lock
AssertionError: Regex didn't match: 'INFO: Lock\nINFO: Take a new snapshot. Profile: 1 Main profile\nINFO: Call rsync to take the snapshot\nINFO: Save config file\nINFO: Save permissions\nINFO: Create info file\nINFO: Unlock' not found in 'INFO: Lock\nINFO: Take a new snapshot. Profile: 1 Main profile\nINFO: Call rsync to take the snapshot\nINFO: Save config file\nINFO: Save permissions\nINFO: Create info file\nWarning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.\nINFO: Unlock'

----------------------------------------------------------------------
Ran 3 tests in 2.844s

FAILED (failures=1, skipped=1)
make: *** [Makefile:570: unittest] Error 1
==> ERROR: A failure occurred in check().
    Aborting...
 -> Failed to install layer, rolling up to next layer.error:error making: backintime - exit status 4
==> Making package: backintime dev-3 (Sat 06 May 2023 08:15:32 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found dev.zip
==> WARNING: Skipping all source file integrity checks.
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting dev.zip with bsdtar
==> Sources are ready.
==> Making package: backintime dev-3 (Sat 06 May 2023 08:15:35 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
All OK. Now run:
    make
    sudo make install
msgfmt -o po/zh_TW.mo po/zh_TW.po
msgfmt -o po/zh_CN.mo po/zh_CN.po
msgfmt -o po/uk.mo po/uk.po
msgfmt -o po/tr.mo po/tr.po
msgfmt -o po/th.mo po/th.po
msgfmt -o po/sv.mo po/sv.po
msgfmt -o po/sr.mo po/sr.po
msgfmt -o po/sl.mo po/sl.po
msgfmt -o po/sk.mo po/sk.po
msgfmt -o po/ru.mo po/ru.po
msgfmt -o po/ro.mo po/ro.po
msgfmt -o po/pt.mo po/pt.po
msgfmt -o po/pt_BR.mo po/pt_BR.po
msgfmt -o po/pl.mo po/pl.po
msgfmt -o po/nn.mo po/nn.po
msgfmt -o po/nl.mo po/nl.po
msgfmt -o po/nb.mo po/nb.po
msgfmt -o po/lt.mo po/lt.po
msgfmt -o po/ko.mo po/ko.po
msgfmt -o po/jv.mo po/jv.po
msgfmt -o po/ja.mo po/ja.po
msgfmt -o po/it.mo po/it.po
msgfmt -o po/is.mo po/is.po
msgfmt -o po/id.mo po/id.po
msgfmt -o po/hu.mo po/hu.po
msgfmt -o po/hr.mo po/hr.po
msgfmt -o po/he.mo po/he.po
msgfmt -o po/gl.mo po/gl.po
msgfmt -o po/fr.mo po/fr.po
msgfmt -o po/fo.mo po/fo.po
msgfmt -o po/fi.mo po/fi.po
msgfmt -o po/eu.mo po/eu.po
msgfmt -o po/et.mo po/et.po
msgfmt -o po/es.mo po/es.po
msgfmt -o po/eo.mo po/eo.po
msgfmt -o po/en_GB.mo po/en_GB.po
msgfmt -o po/en_CA.mo po/en_CA.po
msgfmt -o po/el.mo po/el.po
msgfmt -o po/de.mo po/de.po
msgfmt -o po/da.mo po/da.po
msgfmt -o po/cs.mo po/cs.po
msgfmt -o po/ca.mo po/ca.po
msgfmt -o po/bs.mo po/bs.po
msgfmt -o po/bg.mo po/bg.po
msgfmt -o po/ar.mo po/ar.po
#man pages
for i in $(ls -1 man/C/); do case $i in *.gz|*~) continue;; *) gzip -n --best -c man/C/$i > man/C/${i}.gz;; esac; done
#config-examples
gzip -n --best -c config-example-local > config-example-local.gz
gzip -n --best -c config-example-ssh > config-example-ssh.gz
All OK. Now run:
    make
    sudo make install
#man pages
for i in $(ls -1 man/C/); do case $i in *.gz|*~) continue;; *) gzip -n --best -c man/C/$i > man/C/${i}.gz;; esac; done
==> Starting check()...
python -m unittest  -b test/test_applicationinstance.py
...................
----------------------------------------------------------------------
Ran 19 tests in 0.033s

OK
python -m unittest  -b test/test_argparser.py
.....................
----------------------------------------------------------------------
Ran 21 tests in 2.511s

OK
python -m unittest  -b test/test_backintime.py
.Fs
======================================================================
FAIL: test_local_snapshot_is_successful (test.test_backintime.TestBackInTime.test_local_snapshot_is_successful)
From BIT initialization through snapshot
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tobiasb/.cache/yay/backintime/src/backintime-dev/common/test/test_backintime.py", line 178, in test_local_snapshot_is_successful
    self.assertRegex(filtered_log_output, re.compile(r'''INFO: Lock
AssertionError: Regex didn't match: 'INFO: Lock\nINFO: Take a new snapshot. Profile: 1 Main profile\nINFO: Call rsync to take the snapshot\nINFO: Save config file\nINFO: Save permissions\nINFO: Create info file\nINFO: Unlock' not found in 'INFO: Lock\nINFO: Take a new snapshot. Profile: 1 Main profile\nINFO: Call rsync to take the snapshot\nINFO: Save config file\nINFO: Save permissions\nINFO: Create info file\nWarning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.\nINFO: Unlock'

----------------------------------------------------------------------
Ran 3 tests in 2.857s

FAILED (failures=1, skipped=1)
make: *** [Makefile:570: unittest] Error 1
==> ERROR: A failure occurred in check().
    Aborting...
 -> error making: backintime-exit status 4
==> Making package: backintime dev-3 (Sat 06 May 2023 08:15:42 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found dev.zip
==> WARNING: Skipping all source file integrity checks.
==> Removing existing $srcdir/ directory...
==> Extracting sources...
  -> Extracting dev.zip with bsdtar
==> Sources are ready.
==> Making package: backintime dev-3 (Sat 06 May 2023 08:15:45 CEST)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> WARNING: Using existing $srcdir/ tree
==> Removing existing $pkgdir/ directory...
==> Starting build()...
All OK. Now run:
    make
    sudo make install
msgfmt -o po/zh_TW.mo po/zh_TW.po
msgfmt -o po/zh_CN.mo po/zh_CN.po
msgfmt -o po/uk.mo po/uk.po
msgfmt -o po/tr.mo po/tr.po
msgfmt -o po/th.mo po/th.po
msgfmt -o po/sv.mo po/sv.po
msgfmt -o po/sr.mo po/sr.po
msgfmt -o po/sl.mo po/sl.po
msgfmt -o po/sk.mo po/sk.po
msgfmt -o po/ru.mo po/ru.po
msgfmt -o po/ro.mo po/ro.po
msgfmt -o po/pt.mo po/pt.po
msgfmt -o po/pt_BR.mo po/pt_BR.po
msgfmt -o po/pl.mo po/pl.po
msgfmt -o po/nn.mo po/nn.po
msgfmt -o po/nl.mo po/nl.po
msgfmt -o po/nb.mo po/nb.po
msgfmt -o po/lt.mo po/lt.po
msgfmt -o po/ko.mo po/ko.po
msgfmt -o po/jv.mo po/jv.po
msgfmt -o po/ja.mo po/ja.po
msgfmt -o po/it.mo po/it.po
msgfmt -o po/is.mo po/is.po
msgfmt -o po/id.mo po/id.po
msgfmt -o po/hu.mo po/hu.po
msgfmt -o po/hr.mo po/hr.po
msgfmt -o po/he.mo po/he.po
msgfmt -o po/gl.mo po/gl.po
msgfmt -o po/fr.mo po/fr.po
msgfmt -o po/fo.mo po/fo.po
msgfmt -o po/fi.mo po/fi.po
msgfmt -o po/eu.mo po/eu.po
msgfmt -o po/et.mo po/et.po
msgfmt -o po/es.mo po/es.po
msgfmt -o po/eo.mo po/eo.po
msgfmt -o po/en_GB.mo po/en_GB.po
msgfmt -o po/en_CA.mo po/en_CA.po
msgfmt -o po/el.mo po/el.po
msgfmt -o po/de.mo po/de.po
msgfmt -o po/da.mo po/da.po
msgfmt -o po/cs.mo po/cs.po
msgfmt -o po/ca.mo po/ca.po
msgfmt -o po/bs.mo po/bs.po
msgfmt -o po/bg.mo po/bg.po
msgfmt -o po/ar.mo po/ar.po
#man pages
for i in $(ls -1 man/C/); do case $i in *.gz|*~) continue;; *) gzip -n --best -c man/C/$i > man/C/${i}.gz;; esac; done
#config-examples
gzip -n --best -c config-example-local > config-example-local.gz
gzip -n --best -c config-example-ssh > config-example-ssh.gz
All OK. Now run:
    make
    sudo make install
#man pages
for i in $(ls -1 man/C/); do case $i in *.gz|*~) continue;; *) gzip -n --best -c man/C/$i > man/C/${i}.gz;; esac; done
==> Starting check()...
python -m unittest  -b test/test_applicationinstance.py
...................
----------------------------------------------------------------------
Ran 19 tests in 0.033s

OK
python -m unittest  -b test/test_argparser.py
.....................
----------------------------------------------------------------------
Ran 21 tests in 2.542s

OK
python -m unittest  -b test/test_backintime.py
.Fs
======================================================================
FAIL: test_local_snapshot_is_successful (test.test_backintime.TestBackInTime.test_local_snapshot_is_successful)
From BIT initialization through snapshot
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tobiasb/.cache/yay/backintime/src/backintime-dev/common/test/test_backintime.py", line 178, in test_local_snapshot_is_successful
    self.assertRegex(filtered_log_output, re.compile(r'''INFO: Lock
AssertionError: Regex didn't match: 'INFO: Lock\nINFO: Take a new snapshot. Profile: 1 Main profile\nINFO: Call rsync to take the snapshot\nINFO: Save config file\nINFO: Save permissions\nINFO: Create info file\nINFO: Unlock' not found in 'INFO: Lock\nINFO: Take a new snapshot. Profile: 1 Main profile\nINFO: Call rsync to take the snapshot\nINFO: Save config file\nINFO: Save permissions\nINFO: Create info file\nWarning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.\nINFO: Unlock'

----------------------------------------------------------------------
Ran 3 tests in 2.842s

FAILED (failures=1, skipped=1)
make: *** [Makefile:570: unittest] Error 1
==> ERROR: A failure occurred in check().
    Aborting...
 -> error making: backintime-exit status 4
 -> Failed to install the following packages. Manual intervention is required:
backintime-cli - exit status 4
backintime - exit status 4
[tobiasb@tobias-pc ~]$ echo $XDG_SESSION_TYPE
wayland
[tobiasb@tobias-pc ~]$ echo $QT_QPA_PLATFORM
wayland
[tobiasb@tobias-pc ~]$ echo $XDG_CURRENT_DESKTOP
GNOME
[tobiasb@tobias-pc ~]$ cd ~/.cache/yay/backintime/
[tobiasb@tobias-pc backintime]$ cat src/backintime-dev/CHANGES 
Back In Time

Version 1.3.4-dev (development of upcoming release)
* Project: Renamed branch "master" to "main" and started "gitflow" branching model.
* Fix bug: Add support for ChainerBackend class as keyring which iterates over all supported keyring backends (#1410)
# Fix bug: Unit test fails on some machines due to warning "Ignoring XDG_SESSION_TYPE=wayland on Gnome..." (#1429)

One of three(?) failing messages:

======================================================================
FAIL: test_local_snapshot_is_successful (test.test_backintime.TestBackInTime.test_local_snapshot_is_successful)
From BIT initialization through snapshot
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tobiasb/.cache/yay/backintime/src/backintime-dev/common/test/test_backintime.py", line 178, in test_local_snapshot_is_successful
    self.assertRegex(filtered_log_output, re.compile(r'''INFO: Lock
AssertionError: Regex didn't match: 'INFO: Lock\nINFO: Take a new snapshot. Profile: 1 Main profile\nINFO: Call rsync to take the snapshot\nINFO: Save config file\nINFO: Save permissions\nINFO: Create info file\nINFO: Unlock' not found in 'INFO: Lock\nINFO: Take a new snapshot. Profile: 1 Main profile\nINFO: Call rsync to take the snapshot\nINFO: Save config file\nINFO: Save permissions\nINFO: Create info file\nWarning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.\nINFO: Unlock'

----------------------------------------------------------------------
Ran 3 tests in 2.844s

Should that work in the way I set up everything?
Am I missing something?

@aryoda
Copy link
Contributor Author

aryoda commented Jul 22, 2023

@topas-rec THX for your details, I think I have found the problem and will fix the fix.

Edit: The reason is that the additional output of Qt5 that shall be ignored, is prefixed with Warning: and I forgot to include this in the exclusion list (which is checked via startswith, not "contains"):

\nWarning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.\n

line_beginnings_to_exclude = [
"WARNING: Failed to connect to Udev serviceHelper",
"WARNING: D-Bus message:",
"WARNING: Udev-based profiles cannot be changed or checked",
"WARNING: Inhibit Suspend failed",
"Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway"
]
line_contains_to_exclude = [
"Gtk-WARNING",
"qt.qpa.plugin: Could not find the Qt platform plugin"
]
# remove lines via startswith()
filtered_log_output = filter(
lambda line: not any([
line.startswith(ex) for ex in line_beginnings_to_exclude]),
error.decode().split('\n')
)

@topas-rec
Copy link

I was able to build 1.4.1 without problems.
Than you for fixing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Wayland Issues related to Wayland-based desktop environments
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants