ruffle-rs / ruffle

A Flash Player emulator written in Rust
https://ruffle.rs
Other
15.58k stars 809 forks source link

Error on http://www.gizdic.com/freegames/gamespages3/bubbleshooter.htm #2597

Closed gnet-lara closed 3 years ago

gnet-lara commented 3 years ago

Error Info

Error name: TypeError Error message: Failed to fetch Error stack:

TypeError: Failed to fetch

Player Info

Allows script access: true

Page Info

Page URL: http://www.gizdic.com/freegames/gamespages3/bubbleshooter.htm

Browser Info

Useragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36 OS: Win32

Ruffle Info

Version: 0.1.0 Name: nightly 2021-01-17 Channel: nightly Built: 2021-01-17T01:05:59.152Z Commit: c2b768c453f281a988c71a829e7a71bb106302fa

Toad06 commented 3 years ago

This doesn't work because of CORS issues. However, this URL works: http://gizdic.com/freegames/gamespages3/bubbleshooter.htm

You probably should replace: <script src="http://gizdic.com/ruffle/ruffle.js"></script>

to:

<script type="text/javascript">
(function() {
   var script = document.createElement("script");
   script.setAttribute("type", "text/javascript");
   script.setAttribute("src", location.origin + "/ruffle/ruffle.js");
   document.head.appendChild(script);
})();
</script>

Also, I've found two script tags loading Ruffle in your page, there should only be one.