Closed Bug 1756254 Opened 2 years ago Closed 11 months ago

Firefox re-downloads image when pasting into another program because of network partition

Categories

(Core :: Privacy: Anti-Tracking, defect, P2)

78 Branch
Unspecified
Windows
defect

Tracking

()

RESOLVED DUPLICATE of bug 1808146
Tracking Status
firefox-esr91 --- wontfix
firefox97 --- wontfix
firefox98 --- wontfix
firefox99 --- wontfix
firefox100 --- wontfix
firefox101 --- wontfix

People

(Reporter: remtanmajitenshi, Assigned: hsohaney)

References

(Regression)

Details

(Keywords: regression)

STR:

  1. Open https://www.pixiv.net/en/artworks/87654287
  2. Copy image to clipboard
  3. In another browser (Chromium-based) open https://yandex.com/images/
  4. Press Ctrl+V
  5. Flip privacy.partition.network_state to false and reload pixiv tab
  6. Repeat steps 2-4

Expected result:
Image should be pasted normally into another program.

Actual result:
Firefox re-downloads image when user is pasting clipboard into another programs if privacy.partition.network_state is set to true. And in case with pixiv it results in broken image (server returns 403 Forbidden) and error from yandex tab in Chromium-based browser. In case with some other sites it results in a time lag because of re-downloading. If privacy.partition.network_state is set to false, everything works normally.

Step 3 can be a win32/Qt application like Telegram Desktop instead of Chromium-based browser with yandex tab. Also Telegram Desktop freezes temporarily while waiting for Firefox to re-download image. Issues:
https://github.com/telegramdesktop/tdesktop/issues/10564
https://bugs.telegram.org/c/6765

Problem is specific to Firefox on Windows. Linux and macOS are not affected.
For reasons I don't understand bug doesn't reproduce between two instances of Firefox (e.g. release and Nightly).

Mozregression pointed me to this pushlog https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=6c10970490f3cc19e644964f583be1a047c08b2c&tochange=92c11f0bf14b71b70bec5351212ae237707f4a62 and it seems to be regressed by Bug 1639807
But taking into account that it's only reproducible on Windows, is there a bug in platform-specific code?

Has Regression Range: --- → yes
Keywords: regression
Regressed by: 1639807

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

I can reproduce this on Firefox 97.0.1 release Windows 10 64bit. Can't reproduce on Ubuntu 21.10.
The 403 error seems to be specific to pixiv, however I can see Firefox downloading the image again from other sites too.

Tim, could you take a look when you're back?

Severity: -- → S3
Flags: needinfo?(tihuang)
Status: UNCONFIRMED → NEW
Ever confirmed: true

I think it's because the implementations of copy and paste between platforms are different, which leads to this issue. I will take a look. Thanks.

Assignee: nobody → tihuang
Flags: needinfo?(tihuang)
Priority: -- → P2
Assignee: tihuang → hsohaney

Notes:

  1. The 403 error was fixed with this patch bug 1808146
  2. Flipping privacy.partition.network_state makes no difference now because the above linked patched solved that issue
  3. The copied image will paste now, without a 403 error on yandex.com/images
  4. The partition key is set correctly for the host and the extra network request is coming from the cache

Persisting Issues:

  1. An extra GET request is made upon pasting everytime a copy is done
  • Steps:
    1. Load page on Ff (GET) --> Copy Img --> Paste into chromium (GET, cached) --> Paste into another browser (no GET request now)
    2. Load page on Ff (GET) --> Copy Img --> Paste into word (GET, cached) --> Copy img --> Paste into word (GET, cached)
    3. Load page on Ff (GET) --> Copy Img --> clear cache --> Paste into word (GET, not cached)
  1. Edge case with an error:
    Load Page on Ff (GET) --> Copy Img -> Clear Cache on Ff --> Turn off internet --> Paste into word --> ERROR, can't paste --> Paste again, pastes without GET request

Conclusion: This isn't causing any user breakage anymore, the edge case is a highly unlikely possibility. Hence a new bug is being opened to track the extra GET request and this one is being marked as closed.

Status: NEW → RESOLVED
Closed: 11 months ago
Resolution: --- → MOVED
Duplicate of bug: 1808146
Resolution: MOVED → DUPLICATE
You need to log in before you can comment on or make changes to this bug.