Closed Bug 1798117 Opened 2 years ago Closed 2 years ago

Images copied from Firefox fail to paste into Chromium apps.

Categories

(Core :: DOM: Copy & Paste and Drag & Drop, defect, P2)

defect

Tracking

()

VERIFIED FIXED
108 Branch
Tracking Status
firefox-esr102 --- verified
firefox106 --- wontfix
firefox107 + verified
firefox108 --- verified

People

(Reporter: caspy77, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Attached image Error shown in Signal app on Windows (deleted) —

I don't know if this is the proper component so feel free to adjust.

It's possible I hadn't updated Nightly a couple days so I don't exactly when this started but I updated to the most recent today and noticed that when I copy images they fail to paste properly into Signal (desktop app) and Edge (tested imgur.com) both give errors. They seemed to paste fine in the Paint.net app and Windows paint.

I paste images from Firefox into Signal frequently so it's something I noticed almost immediately.

Could you use the mozregression tool to find out what caused this?

Flags: needinfo?(caspy77)

This was the text in the "Build Info" box that showed in the GUI after I was done running.
Is it what you're looking for?

app_name: firefox
build_date: 2022-10-28 17:40:47.473000
build_file: C:\Users\UserName.mozilla\mozregression\persist\43b8474c2eae-shippable--autoland--target.zip
build_type: integration
build_url: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/ENAOekNrSlurxrrCi_TRcQ/runs/0/artifacts/public%2Fbuild%2Ftarget.zip
changeset: 43b8474c2eaed58db4aee03e06eb9c7300c1ff53
pushlog_url: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=43b8474c2eaed58db4aee03e06eb9c7300c1ff53&tochange=f346806c13d6600f4c62688788e783e7dd89e167
repo_name: autoland
repo_url: https://hg.mozilla.org/integration/autoland
task_id: ENAOekNrSlurxrrCi_TRcQ

Flags: needinfo?(caspy77)
Regressed by: 1774285

Set release status flags based on info from the regressing bug 1774285

:Jamie, since you are the author of the regressor, bug 1774285, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Thanks Caspy for trying that out. bug 1774285 seems like it could be the culprit. (I only tested Windows 10 and not Windows 11)

Curious, does bug 1798160 fix this? It should have...

Flags: needinfo?(caspy77)
Flags: needinfo?(emilio)

Otherwise Chromium gets confused when pasting (Signal is an Electron
application).

I need to dig a bit more, but this doesn't prevent the fix for
bug 1774285 from working, and fixes the issue here.

It's probably a Chromium bug that this doesn't work tho since,
as mentioned in comment 0, it works on other Windows applications.

Assignee: nobody → emilio
Status: NEW → ASSIGNED

Ok, I think this is a Chromium bug. Here's a test-case that demonstrates the issue.

When flushing the clipboard early, the blob URL created by Chromium doesn't load (even though the image data is there properly, and you can see it if you paste it in the contenteditable element).

When not flushing somehow the image load errors...

Flags: needinfo?(emilio)
Summary: Images copied from Firefox fail to paste into some apps. → Images copied from Firefox fail to paste into Chromium apps.

Thanks Emilio.

Flags: needinfo?(jteh)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #6)

Curious, does bug 1798160 fix this? It should have...

My Nightly says it's fully up to date and the issue is still present.

Flags: needinfo?(caspy77)

(In reply to Caspy7 from comment #11)

(In reply to Emilio Cobos Álvarez (:emilio) from comment #6)

Curious, does bug 1798160 fix this? It should have...

My Nightly says it's fully up to date and the issue is still present.

Thanks for reporting this and for helping us test, @Caspy7. We really appreciate it. The workaround to address this bug hasn't landed yet, but it's up for review. Once the patch merges to m-c, this bug will be marked resolved. The next Nightly after that happens will have this patch. Unless there's an unexpected problem, this should all happen within the next 24 hours. If you would like to continue helping us test, I'd be very grateful, and I'd be happy to needinfo you on this bug when Nightly has this fix.

Severity: -- → S2
Priority: -- → P2
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dc87087d8103 Only flush clipboard for text data. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 108 Branch

The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox107 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)

Comment on attachment 9301140 [details]
Bug 1798117 - Only flush clipboard for text data. r=smaug

Beta/Release Uplift Approval Request

  • User impact if declined: comment 0
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: comment 0
  • List of other uplifts needed: Bug 1798160
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Relatively simple fix to bug 1798160 to avoid flushing in more cases where it doesn't seem to regress bug 1774285. So, all-in-all restores pre-bug 1774285 behavior for Win11 22h2 users.

QA should be very careful ensuring that bug 1774285 isn't regressed in any unexpected case that I forgot to test, but other than that this should be pretty safe.

  • String changes made/needed: none
  • Is Android affected?: No
Flags: needinfo?(emilio)
Attachment #9301140 - Flags: approval-mozilla-beta?
Flags: qe-verify+
QA Whiteboard: [qa-triaged]

I could still reproduce the issue on both Win10 and Win11 on Firefox Nightly 108.0a1 (2022-11-03) but not with any image, the issue is reproducible while trying to paste an image on imgur.com on both Chrome and Edge. "File type invalid(1) Cancel" error received.

Image that couldn't be pasted: https://www.google.com/search?q=nba&client=firefox-b-d&source=lnms&tbm=isch&sa=X&ved=2ahUKEwiW8P2ki5L7AhXtMuwKHf6YBGgQ_AUoAXoECAIQAw&biw=1280&bih=662&dpr=2#imgrc=DBrz7KqfewQvbM
Image that could be pasted: https://www.google.com/search?q=basketball+court&client=firefox-b-d&source=lnms&tbm=isch&sa=X&ved=2ahUKEwji5tnOi5L7AhXN2qQKHYPKBmAQ_AUoAXoECAEQAw&biw=1280&bih=662&dpr=2#imgrc=pCnMyGTgZGVpZM
If I copy the same image from chrome and pasted it in imgur(edge) it works perfectly.

I couldn't reproduce the issue at all on Signal.
I didn't observe any Firefox unresponsiveness while trying copy operations on Win11.

Emilio, could you please take a look at the issues I mentioned?
Thank you.

Flags: needinfo?(emilio)

Caspy, could you please provide an example of an image the didn't work on Signal?
Thanks.

Flags: needinfo?(caspy77)

Comment on attachment 9301140 [details]
Bug 1798117 - Only flush clipboard for text data. r=smaug

Approved for 107.0b9

Attachment #9301140 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

I could still reproduce the issue on both Win10 and Win11 on Firefox Nightly 108.0a1 (2022-11-03) but not with any image, the issue is reproducible while trying to paste an image on imgur.com on both Chrome and Edge. "File type invalid(1) Cancel" error received.

That seems like a different error, which probably happens on older builds too, can you confirm? The issue here should be specific to Windows 11 22H2+.

(In reply to Hani Yacoub from comment #18)

Caspy, could you please provide an example of an image the didn't work on Signal?
Thanks.

On windows 11 22h2, no image worked without this patch.

Flags: needinfo?(emilio) → needinfo?(hani.yacoub)

(In reply to Hani Yacoub from comment #18)

Caspy, could you please provide an example of an image the didn't work on Signal?
Thanks.

As Emilio said, all of them didn't work. After the patch landed now all of them work.

I tested the webp image you provided of the basketball players and that worked too (pasting into Signal).

I can however reproduce the webp image not pasting properly into imgur on Chrome.

Flags: needinfo?(caspy77)

We've reproduced this issue on a different machine with Win 11 22H2 installed. Both problems mentioned in comment 0 and comment 1, have been reproduced on an affected build, Firefox 106.0.3.

I cannot reproduce the issues anymore on the fixed builds, latest Beta 107.0b9 and Nightly 108.0a1.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+

(In reply to Emilio Cobos Álvarez (:emilio) from comment #21)

I could still reproduce the issue on both Win10 and Win11 on Firefox Nightly 108.0a1 (2022-11-03) but not with any image, the issue is reproducible while trying to paste an image on imgur.com on both Chrome and Edge. "File type invalid(1) Cancel" error received.

That seems like a different error, which probably happens on older builds too, can you confirm? The issue here should be specific to Windows 11 22H2+.

(In reply to Hani Yacoub from comment #18)

Caspy, could you please provide an example of an image the didn't work on Signal?
Thanks.

On windows 11 22h2, no image worked without this patch.

The issue is reproducible on older builds also. Logged bug 1799147 for it.

Flags: needinfo?(hani.yacoub)

Comment on attachment 9301140 [details]
Bug 1798117 - Only flush clipboard for text data. r=smaug

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Fixes regression from bug 1774285.
  • User impact if declined: comment 0
  • Fix Landed on Version: 107
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Relatively simple change, affecting only win11 22h2, restoring to previous behavior, and which has received a fair amount of testing.
Attachment #9301140 - Flags: approval-mozilla-esr102?

Comment on attachment 9301140 [details]
Bug 1798117 - Only flush clipboard for text data. r=smaug

Approved for 102.5esr.

Attachment #9301140 - Flags: approval-mozilla-esr102? → approval-mozilla-esr102+
Flags: qe-verify+

This bug has also been verified as fixed on Esr 102.5 under Win 11 22H2.

Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: