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

Embed projects don't work #1661

Closed
Kenny2github opened this issue Nov 8, 2017 · 24 comments
Closed

Embed projects don't work #1661

Kenny2github opened this issue Nov 8, 2017 · 24 comments
Labels
Milestone

Comments

@Kenny2github
Copy link
Contributor

Kenny2github commented Nov 8, 2017

Expected behavior

Embedding projects (<iframe allowtransparency="true" width="485" height="402" src="https://scratch.mit.edu/projects/embed/178433850/?autostart=false" frameborder="0" allowfullscreen></iframe>) should work

Actual behavior

It says "oh no, you don't have flash":
image

Steps to reproduce

  1. Create a random HTML file with the content
<iframe allowtransparency="true" width="485" height="402" src="https://scratch.mit.edu/projects/embed/178433850/?autostart=false" frameborder="0" allowfullscreen></iframe>
  1. Open it with your browser.
  2. See the iframe say "oh no, we're having trouble displaying this scratch project"

Operating System and Browser

Windows 10, on Chrome and Firefox - I think it's not an OS issue though.

@colbygk
Copy link
Contributor

colbygk commented Nov 8, 2017

My suspicion is that this is related to Chrome and Firefox tightening their security model. I have reproduced this locally with Chrome 62.0.3202.89 (Official Build) (64-bit) on macOS 10.12.6.

When looking at the Security pane from the dev tools for Chrome, I see:

screen shot 2017-11-08 at 10 48 52 am

Normally all secure content must be loaded from a secure document. However Chrome does not print any console messages related to the attempted load of flash content. Adding https://scratch.mit.edu:443 to the allow list under Content Settings→Flash→Allow makes no difference.

@thisandagain thisandagain added this to the Backlog milestone Nov 16, 2017
@kyleplo
Copy link
Contributor

kyleplo commented Dec 29, 2017

Well, we won't have to worry about this in Scratch 3.0.

@AmazingMech2418
Copy link

The strange thing is that it works on the embed website, but not in the iframe. It seems like the iframe is blocking the allowing of flash.

@AmazingMech2418
Copy link

@Kenny2github I think the problem is that maybe, the files needed to load shockwave don't load correctly. Can you please give me the code for embedding projects so I could help?

@AmazingMech2418
Copy link

The meta tag blocks iframe embeds. f569d02 is the commit. @Kenny2github

@AmazingMech2418
Copy link

#862 says that was fixed.

@AmazingMech2418
Copy link

<script src="/js/<%= htmlWebpackPlugin.options.route.name %>.intl.js"></script> may have something to do with it since the /js directory doesn't exist based on this repo.

@AmazingMech2418
Copy link

@colbygk Why would a source have a file protocol? It may have something to do with the code I found.

@AmazingMech2418
Copy link

Wait. Never mind. The protocol was what was used to run the iframe. It used to work on everything though.

@apple502j
Copy link
Contributor

I'm going to use it for MediaWiki, so I can't neither change one's browser settings nor load another JS

@Sheshank-s
Copy link
Contributor

@Kenny2github So here's what I have found. It doesn't work when you load it (got the same error), but when you click on "Site settings" and click "Allow Flash" then it works for me.

@Kenny2github
Copy link
Contributor Author

@greenbayrules this would look like a browser issue then - it doesn't show anything about the plugin being blocked, and it doesn't "ask" (which is my default). @colbygk opinions?

@Sheshank-s
Copy link
Contributor

Sheshank-s commented Jan 27, 2018

You have to click on the i button.... here let me show you a gif @Kenny2github

kenny

Sorry for the messed up colors, I use ubuntu, and for some reason all the colors are tinted purple

@AmazingMech2418
Copy link

Wow! That solution was way simpler than I thought...

@SheepTester
Copy link

On Chrome, clicking on "this page" or the "get Adobe Flash player" button will make the browser prompt if you want to use Flash.

Whether or not Flash is enabled depends on the parent (so even if you have Flash enabled on Scratch, it won't run when embedded in a different domain with Flash disabled)

@AmazingMech2418
Copy link

I made a Scratch extension that can allow Scratch web creators. I just created a website to embed one of my projects with it. Since it has a Scratch domain, the embedding works automatically.
<!DOCTYPE html><html><head><title>Embed</title></head><body> <iframe allowtransparency="true" width="485" height="402" src="//scratch.mit.edu/projects/embed/199839521/?autostart=false" frameborder="0" allowfullscreen></iframe></body></html> was the code for the website.

@colbygk
Copy link
Contributor

colbygk commented Jan 29, 2018

@amazinigmech2418 An extension for chrome?

@colbygk
Copy link
Contributor

colbygk commented Jan 29, 2018

@amazinigmech2418 Also, please provide the full version string of chrome that you are using.

@AmazingMech2418
Copy link

@colbygk It's a Scratch extension that is run with a bookmarklet. It's also on ScratchX when you use the link in the ScratchX repo for it.

@AmazingMech2418
Copy link

@colbygk What do you mean full string? If you mean the version of Chrome, how do you get it?

@colbygk
Copy link
Contributor

colbygk commented Jan 30, 2018

Type about: and enter for the url.

@AmazingMech2418
Copy link

So would it be 63.0.3239.132? @colbygk

@kyleplo
Copy link
Contributor

kyleplo commented Jan 31, 2018

@amazinigmech2418 I think this involves the different permissions the browser has.

@thisandagain
Copy link
Contributor

I think it's been established that this is due to the security model updates in Firefox and Chrome. Closing.

@scratchfoundation scratchfoundation locked as resolved and limited conversation to collaborators Jan 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

8 participants