Bug 255645 - Web Inspector: Failed to load resource: Frame load interrupted when download canvas to image on iOS 16.2
Summary: Web Inspector: Failed to load resource: Frame load interrupted when download ...
Status: RESOLVED CONFIGURATION CHANGED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Safari 16
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-18 23:22 PDT by kiwenlau
Modified: 2023-04-23 14:42 PDT (History)
2 users (show)

See Also:


Attachments
test code (3.71 KB, application/zip)
2023-04-18 23:22 PDT, kiwenlau
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description kiwenlau 2023-04-18 23:22:33 PDT
Created attachment 465977 [details]
test code

I tried to download canvas to image:

const canvas = document.getElementById('canvas');
const ctx = canvas.getContext('2d');

ctx.fillStyle = 'green';
ctx.fillRect(10, 10, 150, 100);

canvas.toBlob(function (blob) {
  const link = document.createElement('a');
  link.download = 'example.png';
  link.href = URL.createObjectURL(blob);
  link.click();
  URL.revokeObjectURL(link.href);
}, 'image/png');

Everything is ok for following device and safari version:
- macOS Ventura 13.0.1 Safari 16.1
- iPhone 14 Plus iOS 16.3
- iPhone 14(Simulator) iOS 16.4

However, on iPhone 13(Simulator)iOS 16.2, the image can be downloaded, but the web inspector gets following error:

Failed to load resource: Frame load interrupted
Comment 1 Alexey Proskuryakov 2023-04-23 14:42:14 PDT
Please correct me if I misunderstood the report, but sounds like this is already fixed in iOS 16.3 and newer. We cannot retroactively fix this in 16.2.