tutao / tutanota

Tuta is an email service with a strong focus on security and privacy that lets you encrypt emails, contacts and calendar entries on all your devices.
https://tuta.com
GNU General Public License v3.0
5.97k stars 513 forks source link

Wayland support broken: xdg_surface has never been configured #4513

Closed rhubinak closed 1 year ago

rhubinak commented 2 years ago

Describe the bug Native Wayland support for the desktop client on Linux seems broken in the latest version 3.98.20. Log:

./tutanota-desktop-linux.AppImage --ozone-platform=wayland --enable-features=UseOzonePlatform,WaylandWindowDecorations,WebRTCPipeWireCapturer
the monkey has been patched
(node:82703) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `tutanota-desktop --trace-deprecation ...` to show where the warning was created)
[82749:0817/223920.968951:ERROR:gpu_init.cc(481)] Passthrough is not supported, GL is egl, ANGLE is
version:   3.98.20
[82703:0817/223921.138760:ERROR:browser_main_loop.cc(271)] Gtk: gtk_widget_get_scale_factor: assertion 'GTK_IS_WIDGET (widget)' failed
resolving key... tutanota-vault
config up to date
[ApplicationWindow] webAssetsPath:  /tmp/.mount_tutanoJbAUcz/resources/app.asar
[ApplicationWindow] getting dictionaries from: https://mail.tutanota.com/desktop/dictionaries/
default mailto handler: false
Webapp ready
autoUpdater info:
 Checking for update
autoUpdater info:
 checking-for-update
[ApplicationWindow] spellcheck-dictionary-initialized en-US
scheduling to check sse in 1 seconds
desktop file exists, checking version...
autoUpdater info:
 Update for version 3.98.20 is not available (latest version: 3.98.20, downgrade is disallowed).
autoUpdater info:
 update not available: {
  version: '3.98.20',
  files: [
    {
      url: 'tutanota-desktop-linux.AppImage',
      sha512: 'A96+Uu34dCB3iZVgU3fkAfHjHz879jtKkiQwXjKeP4DDwDTzFWJ+xXPMy+lrzhv8DJEZ+1CvSDDslnxA2OAtvA==',
      size: 98920754,
      blockMapSize: 104774
    }
  ],
  path: 'tutanota-desktop-linux.AppImage',
  sha512: 'A96+Uu34dCB3iZVgU3fkAfHjHz879jtKkiQwXjKeP4DDwDTzFWJ+xXPMy+lrzhv8DJEZ+1CvSDDslnxA2OAtvA==',
  releaseDate: '2022-08-04T11:40:12.932Z',
  signature: 'TyPujVnpHTQjFiBmDROyeafQXUXkmzr5VEFvAqoClmb+wPzpV7/gS/GMxD7SQh2RRUvNiL1YonFBSPOmL3WFZbN8bIuWisj/oQ3U5zWllqNgqwABxibgCavczMKXA3+yNUdm9En2LQPWxgeqW0CeElasNLbCfZfxIyRjKaWhF3rq/h/LelBOGqdAy5MeMu6aJRE2xlCIPSkLHoRkZJHohGvTr8kjakNHF8p/PPj5X2THkG3erP8liF1p4kkVady7ejuPkwPGZRCTEgbJDFV512nwKVHjIlWLi9BJdhHwclrbBfOE3IsziZSUl2wFAbkNmnWalDCt3V7oXWKMl5+iXQ=='
}
[82703:0817/223922.037108:ERROR:wayland_event_watcher.cc(36)] libwayland: xdg_surface@46: error 3: xdg_surface has never been configured

[1]    82703 trace trap (core dumped)  ./tutanota-desktop-linux.AppImage --ozone-platform=wayland

To Reproduce Steps to reproduce the behavior:

  1. Make the official AppImage executable: chmod +x tutanota-desktop-linux.AppImage
  2. Execute with the wayland flags (you can leave out the --enable-features, result is the same): ./tutanota-desktop-linux.AppImage --ozone-platform=wayland --enable-features=UseOzonePlatform,WaylandWindowDecorations,WebRTCPipeWireCapturer

Expected behavior As an electron app working on a pretty up-to-date version of electron, the app should work under Wayland natively.

Desktop (please complete the following information):

ganthern commented 2 years ago

as a data point, I can't reproduce it on Ubuntu 22.04.1 LTS with Gnome 42.2. I don't have window decorations, but that's not a large concern with sway I guess. I'm pretty sure it's running under wayland, xlsclients doesn't show it.

fraschm1998 commented 1 year ago

I'm getting the same error

the monkey has been patched
(node:1634) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `tutanota-desktop --trace-deprecation ...` to show where the warning was created)
[2436:0928/104105.550945:ERROR:gpu_init.cc(481)] Passthrough is not supported, GL is egl, ANGLE is
version:   3.100.2
resolving key... tutanota-vault
config up to date
sseInfo corrupted or not present, making sure pushEncSessionKeys and scheduled alarms are cleared
Resetting stored state
[ApplicationWindow] webAssetsPath:  /tmp/.mount_tutanoCaMP9v/resources/app.asar
[ApplicationWindow] getting dictionaries from: https://mail.tutanota.com/desktop/dictionaries/
default mailto handler: false
Webapp ready
autoUpdater info:
 Checking for update
autoUpdater info:
 checking-for-update
key tutanota-vault not found, generating a new one
[ApplicationWindow] spellcheck-dictionary-download-begin en-US
desktop file exists, checking version...
version mismatch, reintegrating...
[DesktopWindowManager] invalidating alarms for all windows
[DesktopWindowManager] invalidating alarms for window 1
[ApplicationWindow] spellcheck-dictionary-download-failure en-US
[1634:0928/104106.351969:ERROR:wayland_event_watcher.cc(36)] libwayland: xdg_surface@45: error 3: xdg_surface has never been configured

/usr/local/bin/tutanota: line 2:  1634 Trace/breakpoint trap   /home/massimo/Downloads/tutanota-desktop-linux.AppImage --enable-features=UseOzonePlatform --ozone-platform=wayland "$@"
werdahias commented 1 year ago

+1

Slackadays commented 1 year ago

This exact issue was fixed in https://github.com/Slackadays/Clipboard/issues/68 by sending ack_configure before committing wl-surface, in case that helps here.

rhubinak commented 1 year ago

Seems fixed with the latest appimage:

./tutanota-desktop-linux.AppImage --ozone-platform=wayland --enable-features=UseOzonePlatform
the monkey has been patched
(node:136673) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `tutanota-desktop --trace-deprecation ...` to show where the warning was created)
[136717:0209/114513.231412:ERROR:gpu_init.cc(523)] Passthrough is not supported, GL is egl, ANGLE is
version:   3.108.12
resolving key... tutanota-vault
config up to date
[ApplicationWindow] webAssetsPath:  /tmp/.mount_tutanoGhtAxK/resources/app.asar
[ApplicationWindow] getting dictionaries from: https://mail.tutanota.com/desktop/dictionaries/
default mailto handler: false
Webapp ready
[2023-02-09T10:45:13.604Z] [ElectronUpdater] INFO: Checking for update
[2023-02-09T10:45:13.606Z] [ElectronUpdater] INFO: checking-for-update
[ApplicationWindow] spellcheck-dictionary-initialized en-US
scheduling to check sse in 1 seconds
desktop file exists, checking version...
version mismatch, reintegrating...
[2023-02-09T10:45:14.053Z] [ElectronUpdater] INFO: Update for version 3.108.12 is not available (latest version: 3.108.12, downgrade is disallowed).
[2023-02-09T10:45:14.053Z] [ElectronUpdater] INFO: update not available: {
  version: '3.108.12',
  files: [
    {
      url: 'tutanota-desktop-linux.AppImage',
      sha512: '+B1MLIUXuc2r8+7ma9HHq6OZddCYsreXx3fHKpzKQs/qeEk7xk2DbdLgresvpBxP6/yKBL7v6v1DiV4SWVXXOQ==',
      size: 111098657,
      blockMapSize: 117557
    }
  ],
  path: 'tutanota-desktop-linux.AppImage',
  sha512: '+B1MLIUXuc2r8+7ma9HHq6OZddCYsreXx3fHKpzKQs/qeEk7xk2DbdLgresvpBxP6/yKBL7v6v1DiV4SWVXXOQ==',
  releaseDate: '2023-02-02T16:38:30.434Z',
  signature: 'c4gqi2uhBhALMyPyxPdVpq08WPXWR66QzmfX3REy5+S+bR2Eh+9d/AcG8bc30L8LeR1HctAOhf3IVBqpvcSibQ6SlTUQSkqQ9XyM+P9Smc86QfK6Ix9ZCFRR3+E6Nvyqw1euL/F3upZzdFNQcvuHiymzpWxImV+ITRl8tjaUfPZS1ihqKeGnsOMKI00QySHnXGjKPvg2NdacZePvDl3XdlvYtl+ISn/n7ik93BUfFVxZsoUWYUJOIJDEPTC3h7/FRerdaBWUM9AO6Gt4PjjzPYP/1Ho5UsvdoyuSNy378FJHp2wh1mwg1/AFS2QTHlkuxb6qAPwPNYpdtd3aQchXYA=='
}
resolving key... tutanota-credentials
last missed notification check: { lastMissedNotificationCheckTime: 1660199392409 }
invalidating alarms on connect
Resetting stored state
[DesktopWindowManager] invalidating alarms for window 1
[DesktopWindowManager] invalidating alarms for all windows
[DesktopWindowManager] invalidating alarms for window 1
storing push identifier

Flatpak is still borked:

flatpak run com.tutanota.Tutanota --ozone-platform=wayland --enable-features=UseOzonePlatform
the monkey has been patched
(node:2) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
(Use `tutanota-desktop --trace-deprecation ...` to show where the warning was created)
[2:0209/114943.545680:ERROR:wayland_connection.cc(224)] Failed to connect to Wayland display: No such file or directory (2)
[2:0209/114943.545738:ERROR:ozone_platform_wayland.cc(223)] Failed to initialize Wayland platform
[2:0209/114943.545745:ERROR:env.cc(255)] The platform failed to initialize.  Exiting.
werdahias commented 1 year ago

Can confirm, latest appimage on Debian Sid with wayfire 0.7.4 works.