# Oops, downloading failed

**URL:** <https://talk.observablehq.com/t/oops-downloading-failed/3799>\
**Category:** Help\
**Created:** [August 28, 2020, 4:32pm UTC](https://talk.observablehq.com/t/oops-downloading-failed/3799 "2020-08-28T16:32:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kpm-at-hfi](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/kpm-at-hfi/32/4155_2.png) [@kpm-at-hfi](https://talk.observablehq.com/u/kpm-at-hfi)\
**Post date:** [August 28, 2020, 4:32pm UTC](https://talk.observablehq.com/t/oops-downloading-failed/3799/1 "2020-08-28T16:32:03Z")

</div>

I’m attempting to “Download PNG” for a chart I’ve made via Vega-Lite-API, but I’m getting a little red error on top: “Oops, downloading failed.”

“Download SVG” works.

No errors in console. Running Safari on Mac. I’ve been able to do this in the past.

Any ideas?

---

<div class="post-metadata">

**Author:** ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)\
**Post date:** [August 28, 2020, 4:46pm UTC](https://talk.observablehq.com/t/oops-downloading-failed/3799/2 "2020-08-28T16:46:17Z")

</div>

Perhaps a CORS issue. Can you share the link to your notebook, or alternatively provide a reduced example in which the problem can be reproduced?

---

<div class="post-metadata">

**Author:** ![kpm-at-hfi](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/kpm-at-hfi/32/4155_2.png) [@kpm-at-hfi](https://talk.observablehq.com/u/kpm-at-hfi)\
**Post date:** [August 28, 2020, 4:56pm UTC](https://talk.observablehq.com/t/oops-downloading-failed/3799/3 "2020-08-28T16:56:43Z")

</div>

I will try to make a reduced example.

Really weirdly, though, in Safari I selected “Disable Cross-Origin Restrictions” and then I was logged out of [Observablehq.com](http://Observablehq.com) and could not log back in. Deselecting returned things to normal.

---

<div class="post-metadata">

**Author:** ![kpm-at-hfi](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/kpm-at-hfi/32/4155_2.png) [@kpm-at-hfi](https://talk.observablehq.com/u/kpm-at-hfi)\
**Post date:** [August 28, 2020, 5:06pm UTC](https://talk.observablehq.com/t/oops-downloading-failed/3799/4 "2020-08-28T17:06:38Z")

</div>

Perhaps related?

```auto
[Error] Error while parsing the 'sandbox' attribute: 'allow-downloads' is an invalid sandbox flag.
	Mt (index-6c673751.js:7:20381)
	lu (index-6c673751.js:7:90434)
	Ec (index-6c673751.js:7:110536)
	Cc (index-6c673751.js:7:110425)
	bc (index-6c673751.js:7:110278)
	sc (index-6c673751.js:7:107354)
	sc
	(anonymous function) (index-6c673751.js:7:58949)
	(anonymous function) (index-6c673751.js:7:11615)
	ra (index-6c673751.js:7:58895)
	na (index-6c673751.js:7:58830)
	ic (index-6c673751.js:7:104137)
	enqueueSetState (index-6c673751.js:7:62618)
	(anonymous function) (index-6c673751.js:7:2336)
	(anonymous function) (notebook-97fb35b4.js:2:564887)
	asyncFunctionResume
	(anonymous function)
	promiseReactionJobWithoutPromise
	promiseReactionJob

```

The cell render is SVG, so presumably that’s why SVG works and PNG (which perhaps needs to actually be downloaded) doesn’t?

---

<div class="post-metadata">

**Author:** ![mootari](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mootari/32/581_2.png) [@mootari](https://talk.observablehq.com/u/mootari)\
**Post date:** [August 28, 2020, 5:31pm UTC](https://talk.observablehq.com/t/oops-downloading-failed/3799/5 "2020-08-28T17:31:21Z")

</div>

That shouldn’t matter, because the worker iframe doesn’t initiate a download. Instead, the parent frame (i.e., the editor UI) requests a rendered PNG blob of the cell contents from the worker via `postMessage` (you can search for `request_download` to find both the initiator and handler).
