ruffle
ruffle copied to clipboard
Ruffle Error on http://challenges.ellieharrison.com/
Error Info
Error name: TypeError Error message: NetworkError when attempting to fetch resource.
Player Info
Allows script access: false
Page Info
Page URL: http://challenges.ellieharrison.com/
Browser Info
Useragent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:84.0) Gecko/20100101 Firefox/84.0 OS: Win32
Ruffle Info
Version: 0.1.0 Name: nightly 2020-12-27 Channel: nightly Built: 2020-12-27T00:42:03.499Z Commit: c3811b30f5bf27e1c33939e76f0c4b01ff93c1ef
in console:

Hello, thanks for replying to me! Can you tell me where I need to go to set this to 'no-cors' ? I am quite a novice. Many thanks, Ellie
Sorry, I don't know either. :(
As I understand it, CORS policies are what makes the modern web secure. You want to allow it so that your site can access your SWF by adding it to the HTTP header. Or something like that. 😅
There are a few CORS issues in this repo like #21.
This might help: https://enable-cors.org/ it's just a link I copied from Google though :P and these might help too: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin https://web.dev/cross-origin-resource-sharing/
Hello, thanks so much for that! I have written to Tsohost (my web server) to see if it's something they need to help with. I'll update here when I hear back from them. Many thanks, Ellie
I think your other issues are also because your SWF URLs lack CORS headers.
Hi @eharrison79, Unfortunately Ruffle is subject to the restrictions of modern web browsers (unlike the official Flash Player), and by default, scripts and files must obey CORS rules, which prevents accessing data outside the website's domain.
The easiest way to fix this is to serve both Ruffle and your SWF files from the same domain as your HTML file. For this case, that would mean hosting the Ruffle script files on http://challenges.ellieharrison.com instead of http://www.ellieharrison.com
Alternatively, you can enable CORS settings to allow access to www.ellieharrison.com. This will require some configuration on your web server (see https://enable-cors.org/ for more info).
Hope this is helpful. It's still a TODO for us to provide better error messages/documentation/guidance for this.
Hello @Herschel, thanks so much for getting back to me! I have now uploaded the ruffle folder/files to each subdomain and changed the script to point to the ruffle.js file locally. It now seems to be working on one of my three trial pages: http://v1.ellieharrison.com/01.htm
On the other two trial pages however, I am now getting a different error: http://henweekend.ellieharrison.com/jeanie/diann.html http://challenges.ellieharrison.com/index.html
This web server is either not serving ".wasm" files with the correct MIME type, or the file cannot be found.
My friend suggested I added this line to the top of each .htaccess file on each subdomain, which I have done:
AddType application/wasm .wasm
Any suggestions on what else I could try?
I also have one other question - I have 13 subdomains running Flash movies. I will soon have the ruffle folders/files duplicated on each of them. How often would you suggest I need to update them with the latest build? Many thanks!
Hello @Herschel, just to say I have it all working now! For the FLV files I uploaded to vimeo/youtube and re-embedded the movies so now all sorted.
How often would you recommend I update the Ruffle folder/files on my server? I have 11 copies for each of the different subdomains.
I am making you a donation on Open Collective. Best wishes, Ellie
@eharrison79 Hey Ellie. Did you figure out how often you should update Ruffle? If not, you could probably go with monthly I guess.
And I feel like 11 copies is pretty inefficient as opposed to configuring the CORS headers. Is that still the case?
Hi @Poopooracoocoo, thanks for responding to the thread! I have not updated the Ruffle files since 1/1/21 but I will do again soon.
I still have 11 copies of the Ruffle files for each subdomain though. If you have and advice on configuring the CORS headers I will gladly give that a go. I received the response below from the Support at my web server (Tsohost) and have not replied yet - as I'm not sure what to ask them. Many thanks!
Simeon Levchenko 28/12/2020 @ 10:28:34 AM Hi Ellie,
Thanks for reaching us.
What I can suggest is to check this with a web developer and get back to us if any changes are needed from our end. Please keep in mind that the Pro Hosting plan that you have linked to the ticket is located on a shared hosting environment and there is almost no room for changes on it.
We will be expecting your reply.
Kind regards,
Simeon
Works as of version 0.1.0.544