Closed Bug 2047946 Opened 2 months ago Closed 1 month ago

Linux paste from other applications broken

Categories

(Core :: Widget: Gtk, defect)

defect

Tracking

()

RESOLVED DUPLICATE of bug 2046911

People

(Reporter: manuel, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

Copy & Paste within Firefox works, however pasting (ctrl+v or context menu) data from other applications copied with ctrl+c is broken. Middle click paste still works.

Potentially Linux-only issue. I'm on Gnome 50 Wayland.

I'm attaching a timestamp,sync,WidgetClipboard:5 of copy and paste the string "about:logging" within Firefox and then some other string into Firefox.

Attached image bad.png
Attached image good.png
See Also: → 2025329
Flags: needinfo?(echen)

From the log, we get empty data from system clipboard,

2026-06-16 13:30:10.130266 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard HasDataMatchingFlavors: clipboard=1
2026-06-16 13:30:10.130293 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard Asking for content clipboard=1:
2026-06-16 13:30:10.130296 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard MIME text/plain
2026-06-16 13:30:10.130297 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard MIME text/x-moz-url-data
2026-06-16 13:30:10.130300 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard nsClipboard::HasNativeClipboardDataMatchingFlavors (clipboard)
2026-06-16 13:30:10.130302 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard RetrievalContextGtk::GetTargets(clipboard)
2026-06-16 13:30:10.130304 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard getting targets from system
2026-06-16 13:30:10.130305 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard RetrievalContextGtk::GetTargetsImpl()
2026-06-16 13:30:10.130307 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard RetrievalContextGtk::WaitForClipboardData, MIME (null)
2026-06-16 13:30:10.130311 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard DataRequestGtk::DataRequestGtk() [7f4b8577cba0]
2026-06-16 13:30:10.130312 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard AsyncGtkClipboardRequest::AsyncGtkClipboardRequest [7ffc7ea46ae0] mDataRequest [7f4b8577cba0]
2026-06-16 13:30:10.130314 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard getting TARGETS
2026-06-16 13:30:10.130331 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard doing iteration 1 msec 0 ...
2026-06-16 13:30:10.130345 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard OnDataReceived(clipboard) callback
2026-06-16 13:30:10.130347 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard Request::Complete(), aData = 7ffc7ea463c0, failed = 0
2026-06-16 13:30:10.130349 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard zero dataLength, quit.
2026-06-16 13:30:10.130358 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard DataRequestGtk::~DataRequestGtk() [7f4b8577cba0]
2026-06-16 13:30:10.130360 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard AsyncClipboardRequest::~AsyncClipboardRequest [7ffc7ea46ae0] mDataRequest [0]
2026-06-16 13:30:10.130363 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard no targes at clipboard (null)
2026-06-16 13:30:10.130364 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard try text data
2026-06-16 13:30:10.130366 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard RetrievalContextGtk::GetClipboardText(), clipboard Selection
2026-06-16 13:30:10.130367 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard RetrievalContextGtk::WaitForClipboardData, MIME (null)
2026-06-16 13:30:10.130369 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard DataRequestGtk::DataRequestGtk() [7f4b8577cba0]
2026-06-16 13:30:10.130370 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard AsyncGtkClipboardRequest::AsyncGtkClipboardRequest [7ffc7ea46b20] mDataRequest [7f4b8577cba0]
2026-06-16 13:30:10.130372 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard getting TEXT
2026-06-16 13:30:10.130376 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard doing iteration 1 msec 0 ...
2026-06-16 13:30:10.130386 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard doing iteration 2 msec 0 ...
2026-06-16 13:30:10.130397 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard doing iteration 3 msec 0 ...
2026-06-16 13:30:10.130403 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard doing iteration 4 msec 0 ...
2026-06-16 13:30:10.130406 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard OnTextReceived(clipboard) callback
2026-06-16 13:30:10.130408 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard Request::Complete(), aData = 0, failed = 0
2026-06-16 13:30:10.130409 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard zero dataLength, quit.
2026-06-16 13:30:10.130411 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard DataRequestGtk::~DataRequestGtk() [7f4b8577cba0]
2026-06-16 13:30:10.130412 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard AsyncClipboardRequest::~AsyncClipboardRequest [7ffc7ea46b20] mDataRequest [0]
2026-06-16 13:30:10.130413 UTC - [Parent 7499: Main Thread]: D/WidgetClipboard no text data

I tried to reproduce the issue, but still no luck.

:manuel, if you manage to reproduce it again, could you try whether pasting works on other application? Thanks!

Flags: needinfo?(echen) → needinfo?(manuel)

I still have the Firefox window open. Yes, paste is working into other applications, but not into Firefox.

Flags: needinfo?(manuel)

I suspect there might be some issue on retrieving clipboard data from system.
I think copy & paste within Firefox works because the data is read from cache instead of the system in such case.

Could you help to try following STR?

  1. Copy something from Firefox
  2. Check if pasting works in Firefox
  3. Switch focus to other application and back
  4. Check again if pasting works in Firefox
  5. Check if pasting works on other application

Thanks!

Flags: needinfo?(manuel)

Step 2: Pasting content from step 1 works
Step 4: Pasting content from step 1 still works (after switching back and forth)
Step 5: Pasting content from step 1 into other application works

Flags: needinfo?(manuel)

Thanks for testing! The ClipboardOwnerChange event will be triggered when focus is changed, so on Step 3, the cached target list should be cleared.
And pasting in Step 4 should get the target from the system clipboard again, but it works.

:stransky, do you have any idea what could cause us to be unable to read data copied from another application via the system clipboard?

Flags: needinfo?(stransky)
Component: DOM: Copy & Paste and Drag & Drop → Widget: Gtk

Will look at it. Can you check latest nightly where we revert back to Gkt only clipboard?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Testing_Mozilla_Nightly_binaries
Thanks.

Flags: needinfo?(manuel)

I haven't been able to reproduce since then. Currently on Nightly 154.0a1 (2026-07-06) (64-Bit). Probably haven't reproduced since 2026-05-22, but don't know how certain that date is (I likely closed Nightly that Friday and updated to the newest on Monday)

Flags: needinfo?(manuel)

Should be fixed by Bug 2046911 then.

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

Attachment

General

Created:
Updated:
Size: