Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Cannot "Export for publishing" on macOS #458

Open
hongbo-miao opened this issue Jun 26, 2017 · 11 comments
Open

Cannot "Export for publishing" on macOS #458

hongbo-miao opened this issue Jun 26, 2017 · 11 comments

Comments

@hongbo-miao
Copy link

Current Behavior

When I click "Export for publishing",
image

it shows this
image

Your Environment

  • Operating System and version: macOS 10.12.5
@Zlatkovsky Zlatkovsky self-assigned this Jun 26, 2017
@Zlatkovsky Zlatkovsky added this to the V 1.1-patch milestone Jun 26, 2017
@Zlatkovsky Zlatkovsky added the bug label Jun 26, 2017
@Zlatkovsky
Copy link
Member

If you were to do the same thing from the browser (https://script-lab.azureedge.net), does the issue occur there as well? Or is it only because it's an add-in.

We use FileSaver.js for exporting. Could you also see if these demos work for you: https://eligrey.com/demos/FileSaver.js/?

Thanks!

@Zlatkovsky
Copy link
Member

@hongbo-miao , please take a look at the questions above. thanks!

@hongbo-miao
Copy link
Author

hongbo-miao commented Jun 26, 2017

Just tried, both https://script-lab.azureedge.net and https://eligrey.com/demos/FileSaver.js succeed download the file.

Tested on Safari 10.1.1 too.

@Zlatkovsky
Copy link
Member

In that case, it might be a platform bug with agaves on Mac. Could you please file a bug and follow up with Dan or Julian? Thanks!

@Zlatkovsky Zlatkovsky removed their assignment Jun 26, 2017
@codexeon codexeon self-assigned this Jun 28, 2017
@hongbo-miao
Copy link
Author

hongbo-miao commented Jun 28, 2017

@dsaunders45459 saw u self-assigned, let me know if still need notify Dan.

BTW, may be related with eligrey/FileSaver.js#129

@codexeon
Copy link
Collaborator

I thought this was an issue with Mac platform so I assigned to myself, but it seems to also repro on Safari. @hongbo-miao you can fix if you want if not a platform issue.

@hongbo-miao
Copy link
Author

@dsaunders45459 actually I am not sure what cause this since it works on my Safari. Please keep diging into it.

@codexeon
Copy link
Collaborator

codexeon commented Jul 2, 2017

I spent more time investigating this. Safari had the same bug before 10.1, the FileSaver library would not work for it. Mac Office uses the WebKit control to embed Script Lab, and it looks like it is not currently possible for the blob download approach FileSaver uses to work with this control using public WebKit API. An alternate approach could be to use window.open on a data-uri and base64 string for the contents, but FileSaver library does not do this. I have opened a bug in WebKit https://bugs.webkit.org/show_bug.cgi?id=174076 to enable blob downloads, but the fix will not be available in the foreseeable future. For now I think we should hide the button on the Mac platform, I will send out a pull request.

@Zlatkovsky
Copy link
Member

@dsaunders45459 , another customer just ran into this same issue. Is there anything we can do at the platform side to make this work, after all? https://stackoverflow.com/questions/44922159/office-add-in-javascript-filedownload-not-working-with-mac/44932466?noredirect=1#comment76856056_44932466

@WrathOfZombies
Copy link
Contributor

@Zlatkovsky last I remember it wasn't a platform specific issue but the way Safari works itself esp with the 9.1/9.2 version. @Reezaali could you assist with this given that you had built a Add-in for the same earlier using multiple techniques.

@Reezaali
Copy link

@hongbo-miao hongbo-miao removed their assignment Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants