Closed Bug 1914625 Opened 6 months ago Closed 3 months ago

[X11][KDE] Drag and drop from Dolphin does not contain files, only url (file://...)

Categories

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

Firefox 129
Desktop
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1913643

People

(Reporter: zelina.pe, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

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

Steps to reproduce:

Drag and drop something from Dolphin (KDE file explorer) into a web page that accepts files. (e.g. https://www.dropzone.dev/ or https://imgur.com/upload or new email in gmail)

I am using, X11, Plasma 6.1.4, Arch Linux, linux 6.10.6
This happens on both X11 and Wayland.

Actual results:

  • in case of https://www.dropzone.dev/ it opens the dragged file in Firefox (file://...)
  • in case of https://imgur.com/upload nothing happens
  • in case of gmail, the file url is pasted as text into the email
  • when I tried to debug this in javascript, I noticed that event.dataTransfer.files is empty (files[0] is undefined). The items field contains two entries (text/x-moz-url and text/plain). In google-chrome, files[0] is the correct file.

I noticed some errors in the Firefox log when I something dragged from Dolphin enters the Firefox window (repeated 3-times):
GLib-CRITICAL **: 14:25:29.948: g_strv_length: assertion 'str_array != NULL' failed

It works when I drag and drop from dolphin to google-chrome.
It works when I drag and drop from other apps (e.g. FileZilla) to Firefox.

Expected results:

The file should have been uploaded.

Summary: Drag and drop from Dolphin does not contain files, only url file:// → Drag and drop from Dolphin does not contain files, only url (file://...)

Ad errors in Firefox log: it is repeated 4-times, exact text:

[Parent 8491, Main Thread] WARNING: g_strv_length: assertion 'str_array != NULL' failed: 'glib warning', file /usr/src/debug/firefox/firefox-129.0.2/toolkit/xre/nsSigHandlers.cpp:187

(firefox:8491): GLib-CRITICAL **: 16:15:20.704: g_strv_length: assertion 'str_array != NULL' failed
[Parent 8491, Main Thread] WARNING: g_strv_length: assertion 'str_array != NULL' failed: 'glib warning', file /usr/src/debug/firefox/firefox-129.0.2/toolkit/xre/nsSigHandlers.cpp:187

(firefox:8491): GLib-CRITICAL **: 16:15:20.705: g_strv_length: assertion 'str_array != NULL' failed
[Parent 8491, Main Thread] WARNING: g_strv_length: assertion 'str_array != NULL' failed: 'glib warning', file /usr/src/debug/firefox/firefox-129.0.2/toolkit/xre/nsSigHandlers.cpp:187

(firefox:8491): GLib-CRITICAL **: 16:15:20.705: g_strv_length: assertion 'str_array != NULL' failed
[Parent 8491, Main Thread] WARNING: g_strv_length: assertion 'str_array != NULL' failed: 'glib warning', file /usr/src/debug/firefox/firefox-129.0.2/toolkit/xre/nsSigHandlers.cpp:187

(firefox:8491): GLib-CRITICAL **: 16:15:20.706: g_strv_length: assertion 'str_array != NULL' failed

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

Component: Untriaged → Layout
Product: Firefox → Core
Component: Layout → DOM: Copy & Paste and Drag & Drop
OS: Unspecified → Linux
Hardware: Unspecified → Desktop
See Also: → 1908196

Dolphin version 24.05.2.
The Firefox errors do not appear in the log when dragging files from FileZilla.

Blocks: linuxdad
Component: DOM: Copy & Paste and Drag & Drop → Widget: Gtk
Flags: needinfo?(stransky)
Summary: Drag and drop from Dolphin does not contain files, only url (file://...) → [X11][KDE] Drag and drop from Dolphin does not contain files, only url (file://...)

Just tested latest nightly on Fedora 41 / KDE / X11 session and I can't reproduce. Can you please re-test it? Only bug I see that if I D&D more than one file, only first file is transferred.
Thanks.

Flags: needinfo?(stransky) → needinfo?(zelina.pe)
Priority: -- → P3

I still experience the same behavior.
firefox 133.0 (64-bit)
linux 6.12.1
KDE Plasma 6.2.4
KDE Framework 6.8.0
Dolphin 24.08.3

Flags: needinfo?(zelina.pe)

(In reply to Petr Zelina from comment #5)

I still experience the same behavior.
firefox 133.0 (64-bit)
linux 6.12.1
KDE Plasma 6.2.4
KDE Framework 6.8.0
Dolphin 24.08.3

Is that X11 or Wayland?

Okay, please try latest nightly with clean profile:
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_Nightly_binaries

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?(zelina.pe)

Logs from dragging a text file to https://www.dropzone.dev/
firefox nightly 135.0a1 (2024-12-04) with MOZ_LOG="WidgetDrag:5"
X11

Flags: needinfo?(zelina.pe)

Logs from dragging a text file to https://www.dropzone.dev/
firefox nightly 135.0a1 (2024-12-04) with MOZ_LOG="WidgetDrag:5"
Wayland

[Parent 27372: Main Thread]: D/WidgetDrag nsWindow::OnDragDataReceived
[Parent 27372: Main Thread]: D/WidgetDrag [D 2]     nsDragService::TargetDataReceived(7e6abc45c200) MIME text/uri-list mWaitingForDragDataRequests 0
[Parent 27372: Main Thread]: D/WidgetDrag [D 2]       TargetDataReceived(): URI data, MIME text/uri-list
[Parent 27372: Main Thread]: D/WidgetDrag DragData() URI MIME text/uri-list
[Parent 27372: Main Thread]: D/WidgetDrag 0 URI file:///home/peta/pes.txt
[Parent 27372: Main Thread]: D/WidgetDrag [D 1]   text/uri-list received
[Parent 27372: Main Thread]: D/WidgetDrag DragData::GetURIsNum() 1
...
[Parent 27372: Main Thread]: D/WidgetDrag nsWindow::OnDragDataReceived
[Parent 27372: Main Thread]: D/WidgetDrag [D 2]     nsDragService::TargetDataReceived(7e6abc45c200) MIME application/vnd.portal.filetransfer mWaitingForDragDataRequests 0
[Parent 27372: Main Thread]: D/WidgetDrag [D 2]       TargetDataReceived(): plain data, MIME application/vnd.portal.filetransfer len = 20
[Parent 27372: Main Thread]: D/WidgetDrag [D 1]   application/vnd.portal.filetransfer received
[Parent 27372: Main Thread]: D/WidgetDrag DragData::Export() MIME application/vnd.portal.filetransfer index 0
[Parent 27372, Main Thread] WARNING: g_strv_length: assertion 'str_array != NULL' failed: 'glib warning', file /builds/worker/checkouts/gecko/toolkit/xre/nsSigHandlers.cpp:201

(firefox-nightly:27372): GLib-CRITICAL **: 22:05:28.633: g_strv_length: assertion 'str_array != NULL' failed

That section confuses me. We correctly get text/uri-list correctly but then we fail to get/export application/vnd.portal.filetransfer.
I can't reproduce it but I'll try to add more logging to cover that.

Flags: needinfo?(stransky)

May be dupe of Bug 1913643. Let's check nightly when it lands.

I just tested it on the newest nightly (135.0a1 (2024-12-07)) and everything seems to work now!
I will attach the new logs just in case.

nightly 135.0a1 (2024-12-07)
drag and drop seems to work correctly now, both dropzone and imgur accept the file.
X11

Thanks for the info.

Status: UNCONFIRMED → RESOLVED
Closed: 3 months ago
Duplicate of bug: 1913643
Flags: needinfo?(stransky)
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: