Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download button not working in demo. #108

Open
sidntrivedi012 opened this issue Jul 19, 2019 · 8 comments
Open

Download button not working in demo. #108

sidntrivedi012 opened this issue Jul 19, 2019 · 8 comments
Labels
hacktoberfest Hacktoberfest Issues help wanted

Comments

@sidntrivedi012
Copy link
Member

No description provided.

@sidntrivedi012
Copy link
Member Author

demo-download

@jywarren
Copy link
Member

Aha! It's a security issue! I think there are ways around this. Perhaps we need to replace the button with a "generate download" button that gets replaced with a button with the dataurl as the href. That way it's not a script opening it directly which is the security issue?

Great job posting the gif. It's a super way to document the bug!

@sidntrivedi012
Copy link
Member Author

@jywarren I just opened spectralworkbench.org to check if the Download button was working fine there. But, the capture functionality is not working there for me.
wbench

@jywarren
Copy link
Member

jywarren commented Jul 19, 2019 via email

@sidntrivedi012
Copy link
Member Author

@jywarren I think the error is related to the cache file.

Application Cache Error event: Manifest fetch failed (404) https://spectralworkbench.org/not-existing.appcache

@sidntrivedi012
Copy link
Member Author

Its pointing to these lines of code in capture :

<!DOCTYPE html>
<html manifest="/not-existing.appcache">

@jywarren
Copy link
Member

I think this is the relevant error --

image

See how it says it's not allowed to open a data url? It's because we did so from javascript, not from a user interaction. I believe this is a new security restriction: https://bugs.chromium.org/p/chromium/issues/detail?id=684011&desc=2

So, try making the script add a new button next to the existing button that says Download and change the existing button to Prepare download (at least for a workaround for now). How does that sound?

@jywarren
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Hacktoberfest Issues help wanted
Projects
None yet
Development

No branches or pull requests

2 participants