Drag and drop does not work

Bug #1970921 reported by Sami Pietila
68
This bug affects 13 people
Affects Status Importance Assigned to Milestone
Nautilus
Fix Released
Unknown
nautilus (Ubuntu)
Triaged
Low
Unassigned

Bug Description

After upgrading Ubuntu to 22.04 drag and dropping files from nautilus to web browser (chromium, google chrome / apps like seafile, etc.) do not work. Also drag & drop from nautilus to slack desktop app does not work. If making several attempts, it might suddenly work with nth attempt.

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: nautilus 1:42.0-1ubuntu2
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
Uname: Linux 5.15.0-27-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Fri Apr 29 13:32:48 2022
InstallationDate: Installed on 2016-11-22 (1983 days ago)
InstallationMedia: Ubuntu 16.10 "Yakkety Yak" - Release amd64 (20161012.2)
SourcePackage: nautilus
UpgradeStatus: Upgraded to jammy on 2022-04-29 (0 days ago)
usr_lib_nautilus:
 evince 42.1-3
 file-roller 3.42.0-1
 nautilus-extension-gnome-terminal 3.44.0-1ubuntu1
 nautilus-share 0.7.3-2ubuntu6

Revision history for this message
Sami Pietila (sampie) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in nautilus (Ubuntu):
status: New → Confirmed
Revision history for this message
Eugene (sakralbar) wrote :

In wayland session also don't work drag and drop files from file-roller to nautilus. It work only on xorg session.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report. Do you use gpaste? The description is a bit similar to https://gitlab.gnome.org/GNOME/nautilus/-/issues/1832

Changed in nautilus (Ubuntu):
importance: Undecided → Low
status: Confirmed → Incomplete
Revision history for this message
Scott F (turkyplurky) wrote :

I am observing the same issue on 22.04. I cannot drag and drop from nautilus into chrome or slack.

If I switch to an xorg session I can drag and drop.

Revision history for this message
Sami Pietila (sampie) wrote :

> Do you use gpaste?

I don't have gpaste package(s) installed.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Could you report it upstream on https://gitlab.gnome.org/GNOME/nautilus/-/issues ?

Revision history for this message
Sami Pietila (sampie) wrote :

This issue has now been reported to upstream:

https://gitlab.gnome.org/GNOME/nautilus/-/issues/2277

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks!

Changed in nautilus (Ubuntu):
status: Incomplete → Triaged
Changed in nautilus:
status: Unknown → New
Changed in nautilus:
status: New → Fix Released
Revision history for this message
Alejandro (alejandrosilvestri) wrote :

I have the same problem, drag and drop fails in many forms on Wayland (not on X11).
If you repeatedly drag and drop from Nautilus to Chrome (for example), it works like 10% of the time.

- sometimes it works
- sometimes it pastes a text path instead of the file
- sometimes it does nothing

When opening a Chrome tab by dropping a file, often I see a wrong path like this:

file:///home/thisuser/Downloads/some_document.docx-34:-56:63:64

It seems like the random addendum -34:-56:63:64 is causing the fail.

I'm using up to date Ubuntu 22.04, Gnome 42.4 on Wayland. Drag and drop is failing for me since Ubuntu 22.04 release, when I switched to Wayland.

Revision history for this message
Sami Pietila (sampie) wrote :

This still seems to be broken in Ubuntu 22.10.

Revision history for this message
Michał Fita (michal.fita) wrote :

In my case I can't drag and drop from Archive to Nautilus - serious impediment on my work TBH.

Revision history for this message
Felix Moreno (info-justdust) wrote :

on ubuntu 23.04 draga drop for example from a zip file is not working anymore....

Revision history for this message
xChris (cs-.) wrote (last edit ):

Gnome devs are an effin joke

Revision history for this message
Nope (darthruler) wrote :

As no fix has been released yet... Echoing Alejandro's #10 comment, when attempting to drag and drop images from "Files" to Google Chrome or Slack, the following (seemingly random) garbage text is appended / suffixed to the file extension:
<filename>.jpg0:~28:478:44
<filename>.png0:~22:478:44
<filename>.png0:~7:460:44

As a result of the appended text, the destination app returns an error indicating the file path/type is invalid:
Google Chrome:
Your file couldn't be accessed
It may have been moved, edited, or deleted.
ERR_FILE_NOT_FOUND

Slack:
File unsupported
Sorry, <Screenshot_Filename> is a type of file not supported by Slack
Try uploading a .zip version of this file instead.
[OK]

In the case of Google Chrome, where the file path can be edited in the address bar, removing the characters improperly suffixed onto the file extension and attempting the navigation again by hitting Enter, the file renders as expected.

A fresh installation of Ubuntu on a beefy Dell Precision 5680 laptop:
OS Name: Ubuntu 22.04.3 LTS
OS Type: 64-bit
GNOME Version: 42.9
Windows System: Wayland

Standard app installs, two different methods:
Google Chrome:
$ sudo apt install ./google-chrome-stable_current_amd64.deb
Google Chrome Version 117.0.5938.88 (Official Build) (64-bit)

Slack:
$ sudo snap install slack
Snap 4.34.115 64-bit

StackExchange got me over to this bug filing:
https://unix.stackexchange.com/questions/714305/unable-to-drag-and-drop-files-into-other-applications-on-ubuntu-22-04

And as "0xheartcode" posted there, it does seem to be a permissions issue:
"It is a permission issue/feature with Ubuntu 22.04.
Opening folders with sudo nautilus /home/user/ or sudo xdg-open /home/user/ fixes this."

When executing "$ sudo nautilus /home/<username>" from Terminal, supplying my password, and using the newly launched "Files" window to perform drag and drop into Slack, I can no longer reproduce the issue. With standard permissions, I encounter the improperly suffixed characters and upload error within one to three drag and drop attempts. As root, I can drag and drop upload 25+ images to Slack (10 at a time, per Slack's file upload limitations) without encountering the bug/permissions issue once.

Revision history for this message
Nope (darthruler) wrote :

Second post, as I can only upload one file per comment. A quick screen recording to further demonstrate the reproducible issues. Worth noting that beyond the appended/suffixed text issue, drag and drop seems to struggle with location context too. Drag and drop fails multiple times through standard user permissions, but succeeds 100% of the time through root permissions.

Revision history for this message
Sami Pietila (sampie) wrote :

I just upgraded to Ubuntu 23.10. Still, Drag & Drop does not work. What is going on?

Revision history for this message
Peter Freeth (peterfreeth) wrote :

23.10, yes the problem is still there. I had switched to X11 to solve this, but Wacom tablet is now broken under X11 so I have moved back to Wayland. Drag and drop to Chrome to upload a file to a website doesn't work, the web page responds as if it knows a file is being dropped onto it, but the upload doesn't happen.

Oddly, if I select the file manually (which doesn't work for the multiple files that I usually upload) then that works, and after that, drag and drop then works again.

Revision history for this message
Raphael Reumayr (develissimo) wrote (last edit ):

ugly workarround: change file-permission to 777 (chmod 777 filename.xyz) + drag extremly slow (do move mouse very slow while dragging, seems to loose focus if dragged to fast). This solves dragndrop for me. but again ux is a pain.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.