Closed Bug 1913643 Opened 6 months ago Closed 3 months ago

[X11] Drag & drop a file from desktop to Firefox for Linux is broken

Categories

(Core :: Widget: Gtk, defect, P2)

Firefox 129
Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
135 Branch
Tracking Status
firefox-esr128 --- fixed
firefox133 --- wontfix
firefox134 --- fixed
firefox135 --- fixed

People

(Reporter: mike, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(6 files, 1 obsolete file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:129.0) Gecko/20100101 Firefox/129.0

Steps to reproduce:

There is a bug in Firefox for Linux v129.0.1 running on the LXQt desktop when dragging & dropping a file from the desktop to the browser.

Steps to reproduce the error:

I spun up a new VM and installed a clean Debian 12 Bookworm + MATE desktop. This includes Firefox v115.14.0esr.
Tested drag & drop and it works fine.

Removed the firefox-esr package using apt. Also deleted the /home/user/.mozilla directory.
Installed the Firefox .DEB Package for Debian per the instructions at Mozilla Support.
This installs Firefox v129.0.1
Tested drag & drop and it works fine with the MATE desktop.

Install LXQt with LightDM as the default display manager (this is the MATE default display manager).
Tested drag & drop - broken using LXQt desktop.
Changed the window manager from the LXQt default of xfwm4 to openbox.
No change, still broken so the bug is with Firefox v129.0.1 running on LXQt.

Actual results:

Drag & drop is broken. File is not copied from the desktop or file manager to the web app in Firefox when dragging & dropping.

Expected results:

File should be copied to browser.

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

So it affects LXQt / xfwm4 /openbox only, right?
Thanks.

Flags: needinfo?(mike)

I only tested with two desktop environments - LXQt, which I use daily, and MATE. I did not try any other desktops.

Flags: needinfo?(mike)
Blocks: linuxdad
OS: Unspecified → Linux
Hardware: Unspecified → Desktop

I'm using KDE 5 (X11) and it's broken there, too. So it looks like there might be an issue with Qt-based desktops?

I have similar experience with the file manager of LXQt - pcmanfm-qt rather than the desktop of LXQt which is also managed by the file manager AFAIK about LXQt so I think they are the same issue. I have recently tested other file managers - caja, dolphin, nautilus, pcmanfm(gtk3), dolphin, krusader, and they all worked, dolphin and krusader are also Qt based but do not have the same issue. lxqt-archiver in the same project binding to libfm-qt also has the same issue. This likely only manifest between FIrefox and libfm-qt.

Versions Affected: Firefox >=128.0 (last working version: 127.0.2) in Flatpak and Artix repo
DIsplay Protocol: X11 (Wayland works fine)
Desktop Environment: XMonad

Additionally the desktop environment should not be bearing except the use of pcmanfm-qt in the desktop. I cannot explain the issue on KDE5, it is possible dolphin and krusader has some specific workaround so the problem never manifested, I haven't checked it yet.

The version range is from Librewolf on Artix Linux but I have checked against FIrefox 128.0 back then so I am sure the issue is on Firefox. Also tested on sway and found no such issue.

There is also a thread from Ubuntu forum describing the exact problem of the reporter, having issue with Lubuntu 20.04.
I am also linking the thread from the reporter on the mozilla support forum here.

I am currently testing with the latest commit of libfm-qt, pcmanfm-qt, and lxqt-archiver. I also don't see any ticket regarding this on their issue tracker, I may send one their way if I can find where might be the issue.

Hi,
I think it may come from type application/x-qabstractitemmodeldatalist, which is unknown by Firefox, which stops at the first unknown type.

Here is a dropsite with dolphin (drag and drop working):
https://i.imgur.com/C2Dbfm6.png
And now with pcmanfm-qt (drag and drop not working):
https://i.imgur.com/Hd23PXe.png

What change caused this ? It worked fine for me a few months ago now it's making my app stopped working in lxqt environment.

Please run Firefox on terminal with MOZ_LOG="WidgetDrag:5" env variable, reproduce the issue and attach the log here. Run for instance:

MOZ_LOG="WidgetDrag:5" firefox > log.txt 2>&1

and attach log.txt file.
Thanks.

Flags: needinfo?(mike)
Priority: -- → P2
See Also: → 1914742
Summary: Drag & drop a file from desktop to Firefox for Linux is broken → [X11] Drag & drop a file from desktop to Firefox for Linux is broken
Attached file log_bpa.st.txt

Log for dragging a text file into the browser while visiting https://bpa.st

Attached file log_imgur.com.txt

Log for dragging a jpg file into the browser while visiting https://imgur.com

I can't reproduce it with Fedora 41 / KDE / X11 session.

Can you please re-test with latest nightly?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_Nightly_binaries
Thanks.

I am on stock Lubuntu 24.04 (pcmanfm-qt 1.4.1).

Looks like we failed to import x-moz-url

[Parent 57886: Main Thread]: D/WidgetDrag [D 2]     nsDragService::TargetDataReceived(78132819af20) MIME text/x-moz-url mWaitingForDragDataRequests 0
[Parent 57886: Main Thread]: D/WidgetDrag [D 2]       TargetDataReceived(): plain data, MIME text/x-moz-url len = 78
[Parent 57886: Main Thread]: D/WidgetDrag DragData() MIME text/x-moz-url is missing data
[Parent 57886: Main Thread]: D/WidgetDrag [D 1]   text/x-moz-url received
[Parent 57886: Main Thread]: D/WidgetDrag DragData::GetURIsNum() 0

John, which desktop is that?
Thanks.

Flags: needinfo?(6a224f5ada1867c791)

Ah, I see it's Lubuntu.

Flags: needinfo?(6a224f5ada1867c791)

John, is that X11 or Wayland?

Flags: needinfo?(6a224f5ada1867c791)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #20)

John, is that X11 or Wayland?

echo $XDG_SESSION_TYPE
x11
Flags: needinfo?(6a224f5ada1867c791)
Assignee: nobody → stransky
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #9442126 - Attachment is obsolete: true
Pushed by stransky@redhat.com: https://hg.mozilla.org/integration/autoland/rev/f78431f1b071 [Linux] Drag&Drop check received data r=emilio
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 135 Branch

Please test latest nightly if it works for you.
Thanks.

Flags: needinfo?(6a224f5ada1867c791)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #26)

Please test latest nightly if it works for you.
Thanks.

It works! My life just became much easier. Thank you so much!

Flags: needinfo?(6a224f5ada1867c791)

Martin, please be aware of the following crash report regarding Thunderbird under Debian/XFCE:

https://crash-stats.mozilla.org/report/index/be3c9233-2a82-43ae-903e-0aca90241207

STR:

  1. Open Thunderbird.
  2. Open www.google.com in Firefox
  3. Drag the "Google" image anywhere over Thunderbird.

I can also reproduce the TB crash on ubuntu24.04 GNOME,WebRender(Software).
https://crash-stats.mozilla.org/report/index/91504813-c775-4446-bab8-ff8bf0241207

(In reply to Hartmut Welpmann [:welpy-cw] from comment #28)

Martin, please be aware of the following crash report regarding Thunderbird under Debian/XFCE:

https://crash-stats.mozilla.org/report/index/be3c9233-2a82-43ae-903e-0aca90241207

STR:

  1. Open Thunderbird.
  2. Open www.google.com in Firefox
  3. Drag the "Google" image anywhere over Thunderbird.

Is that Thunderbird Nightly based on latest nightly? If so please file a new bug for it. Will look at it.
Thanks.

Flags: needinfo?(h.w.forms)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #30)

(In reply to Hartmut Welpmann [:welpy-cw] from comment #28)

Martin, please be aware of the following crash report regarding Thunderbird under Debian/XFCE:

https://crash-stats.mozilla.org/report/index/be3c9233-2a82-43ae-903e-0aca90241207

STR:

  1. Open Thunderbird.
  2. Open www.google.com in Firefox
  3. Drag the "Google" image anywhere over Thunderbird.

Is that Thunderbird Nightly based on latest nightly?

Yes.

If so please file a new bug for it. Will look at it.
Thanks.

Just noticed there is already one, see bug 1935861.

Flags: needinfo?(h.w.forms) → needinfo?(stransky)
Attachment #9442387 - Flags: approval-mozilla-beta?
See Also: → 1935861
Regressions: 1935861
See Also: 1935861

Comment on attachment 9442387 [details]
Bug 1913643 [Linux] Drag&Drop check received data for 134.0 r?emilio

Beta/Release Uplift Approval Request

  • User impact if declined/Reason for urgency: On some systems we may receive empty D&D data. We need to throw them away and try another MIME type.
    Without the patch D&D is broken on X11/KDE.
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): We only check if we have valid data and try another one.
    The recent regression (Bug 1935861) is caused by forced MIME type check and it's not included in backported patch to beta.
  • String changes made/needed:
  • Is Android affected?: Yes
Flags: needinfo?(stransky)
Attachment #9442387 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Duplicate of this bug: 1914625

Do we want this on ESR128 also?

Flags: needinfo?(stransky)

(In reply to Ryan VanderMeulen [:RyanVM] from comment #36)

Do we want this on ESR128 also?

Yes, I think so.

Flags: needinfo?(stransky)
Flags: needinfo?(mike)

Please create an uplift request for this and bug 1914742 in that case :-)

Flags: needinfo?(stransky)

Comment on attachment 9442387 [details]
Bug 1913643 [Linux] Drag&Drop check received data for 134.0 r?emilio

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: On some systems we may receive empty D&D data. We need to throw them away and try another MIME type.
    Without the patch D&D is broken on X11/KDE.
  • User impact if declined:
  • Fix Landed on Version: 134, 135
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): We only check if we have valid data and try another one.
    The recent regression (Bug 1935861) is caused by forced MIME type check and it's not included in backported patch to beta.
Flags: needinfo?(stransky)
Attachment #9442387 - Flags: approval-mozilla-esr128?

Comment on attachment 9442387 [details]
Bug 1913643 [Linux] Drag&Drop check received data for 134.0 r?emilio

Approved for 128.6esr.

Attachment #9442387 - Flags: approval-mozilla-esr128? → approval-mozilla-esr128+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: