Skip to content

[Bug]: File upload with drag & drop not working (randomly) on GNOME with Wayland #3268

@leoniscsem

Description

@leoniscsem

Checks before filing an issue

Mattermost Desktop Version

5.10.2 commit de876ca (snap installation)
5.12.1 commit aa47784

Operating System

Ubuntu 22.04 LTS x64, GNOME 42.9 with Wayland &
ZorinOS 17.3 (Ubuntu 22.04 LTS), GNOME 43.9 with Wayland 43.8-0+deb12u1+zorin3
(both with DEB installation from stable PPA)

Mattermost Server Version

10.3.1 (DEB installation)
11.0.4 (DEB installation)

Steps to reproduce

  1. have a GNOME session with Wayland window manager
  2. go to any channel
  3. drag and drop a file from file manager

Expected behavior

After dragging a file to the main window of Mattermost, the background should go black and show the "drop file here to upload" dialogue. After releasing the file, it should be uploaded.

Observed behavior

The behaviour is not consistent. Sometimes it works on the first try. The second try then usually does not work, no dark background / upload message.
Sometimes wiggling the file while hovering over the main channel triggers the dark upload background, sometimes not.
Sometimes it results to an error message "file cannot be uploaded".
Not dropping the file when no upload dialogue appears and re-grabbing it, then trying to drop it again sometimes yields results.

Log Output

no relevant output from main.log, only this (log level debug)

[2024-12-23 16:58:24.307] [debug] [MainWindow] saving window state {
  x: 1920,
  y: 0,
  width: 1920,
  height: 1080,
  maximized: true,
  fullscreen: false
}
[2024-12-23 16:58:36.897] [debug] [ViewManager] handleSetCurrentViewBounds { x: 1920, y: 0, width: 1920, height: 1080 }
[2024-12-23 16:58:36.899] [debug] [ModalManager] handleResizeModal {
  bounds: { x: 1920, y: 0, width: 1920, height: 1080 },
  modalQueueLength: 0
}
[2024-12-23 16:58:36.902] [debug] [ViewManager] focusCurrentView
[2024-12-23 16:58:40.262] [debug] [ViewManager] handleSetCurrentViewBounds { x: 1920, y: 0, width: 1920, height: 1080 }
[2024-12-23 16:58:40.264] [debug] [ModalManager] handleResizeModal {
  bounds: { x: 1920, y: 0, width: 1920, height: 1080 },
  modalQueueLength: 0
}
[2024-12-23 16:58:40.265] [debug] [MainWindow] saving window state {
  x: 1920,
  y: 0,
  width: 1920,
  height: 1080,
  maximized: true,
  fullscreen: false
}

Additional Information

The upload dialogue seems to be triggered randomly. I have tested the file upload functionality on Firefox 133.0.3 (deb) and Chomium 131.0.6778.139 (snap). My assumption is the issue is related to either the xwayland package (2:22.1.1-1ubuntu0.14), or Google's Wayland interpreter for Electron apps.

I do not face this issue when loading an X-server session for GNOME.

Edit: updated desktop application and server version

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions