ruffle-rs / ruffle

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

Doesn't work on Chrome in macOS 10.15+ #671

Open zohebnsr opened 4 years ago

zohebnsr commented 4 years ago

The web version works fine on Windows 10, but when I try within Chrome on Mac, it shows the Play button, and then all goes black. Game/Animation never loads.

Dinnerbone commented 4 years ago

What version of Chrome are you using? Are you testing with the same swf? I'm using Chrome Version 83.0.4103.61 (Official Build) (64-bit) on MacOS 10.15.4 and I've loaded up the latest nightly just fine, and I can load Flash files just fine (tried with a few newgrounds games + https://homestarrunner.com)

Is there any feedback in the console? You can pull it up with option + command + i on the page you're testing on.

Edit: Actually, is this the extension or selfhosted? I assumed extension but just realized you didn't specify. http://ruffle-rs.s3-website-us-west-1.amazonaws.com/builds/web-demo/ (example of selfhosted) does appear to work for me too.

zohebnsr commented 4 years ago

Any of the sample from this page: http://ruffle-rs.s3-website-us-west-1.amazonaws.com/builds/web-demo/ doesn't work on Mac OS Version: 10.15.5 (19F96... My Chrome version is Chrome Version: Version 83.0.4103.61 (Official Build) (64-bit) Mac. I also tried the web version of Nightly Build on my website and it actually loads compatible games on my Windows but doesn't load on Mac. I have attached the console errors (various errors) that I get on Mac. Note: I can hear the sound no graphic, though. Screen Shot 2020-05-31 at 8 03 51 PM

Screen Shot 2020-05-31 at 8 22 12 PM Screen Shot 2020-05-31 at 8 21 46 PM

zohebnsr commented 4 years ago

Update: Doesn't work on Opera as well. But, just tested and works fine on Safari and Mozilla Firefox

Dinnerbone commented 4 years ago

Hmm, interesting. Possibly a rendering issue, if you can hear sounds?

Does this page work okay for you on your mac in Chrome? https://get.webgl.org/

zohebnsr commented 4 years ago

Yes, I see a moving cube. Should I reinstall Chrome and test again?

zohebnsr commented 4 years ago

Closing this bug as my Chrome was the one causing the issue and the ruffle. Reinstalling Chrome fixed the bug. Sorry for the trouble and I appreciate you guys trying to make it work with AS3.

Dinnerbone commented 4 years ago

If you encounter the issue again please let us know, I'd love to know what about your chrome installation made it break - in case anyone in the future runs into the same issue

andrewvarga commented 3 years ago

I have something very similar. Black screen, sometimes I get sound, sometimes not. Platform: 2015 Macbook Pro 15", WebGL graphics driver: Intel Iris Pro OpenGL Engine.

Quite often I see this error on the console:

798.index.js:1 Uncaught Error: closure invoked recursively or destroyed already
    at Object.Or (798.index.js:1)
    at __wbindgen_throw (index.js:1)
    at /demo/184ce67da0c38ffac000.module.wasm:wasm-function[4444]:0x2f0e5f
    at _dyn_core__ops__function__FnMut__A____Output___R_as_wasm_bindgen__closure__WasmClosure___describe__invoke__h143d6ac21b30e90e (/demo/184ce67da0c38ffac000.module.wasm:wasm-function[4137]:0x2ef5ac)
    at P (798.index.js:1)
    at f (798.index.js:1)

Everything works fine in Firefox, Safari. I tried reinstalling Chrome, still doesn't work.

Let me know if I can provide any more info.

Toad06 commented 3 years ago

@andrewvarga, I think the issue may have been fixed by #1767. Could you please give it another try using the web demo? Thanks in advance!

andrewvarga commented 3 years ago

@Toad06 unfortunately I get the same black screen, sometimes with sound. The error I pasted on the console is quite rare actually, may be unrelated to the issue.

Nicnl commented 3 years ago

Same issue here, doesn't work on Chrome with macOS Big Sur
There's no console errors: screenshot attached

image

It works flawlessly in Safari though


Versions:
macOS: 11.1 Big Sur
Chrome: 87.0.4280.88

jmetaxas commented 3 years ago

I had the same issue: the game displayed a black screen, but I could hear the sound. Everything worked perfectly on Safari and Firefox, but not on Chrome, Brave or Opera (all Chromium-based browsers). To fix this problem, it turned out that I had to disable hardware acceleration in the browser settings.

I have reactivated hardware acceleration since then (and of course it doesn't work anymore), but I hope it will be useful to the development team or someone else.

Url Tested: https://ruffle.rs/demo/ (Alien Hominid) System: MacBook Pro Retina 13, Late 2013, Big Sur 11.1, Intel Iris Pro 1536 MB

Herschel commented 3 years ago

Thanks for the report. By disabling hardware acceleration, this forces Ruffle to switch to the Canvas backend as opposed to WebGL. So the question remains why WebGL fails to work in this case. (TODO: We should provide explicit options somewhere to allow the user to toggle between the rendering backends).

zohebnsr commented 3 years ago

When I reported this at the start, I was working fine on my Wife's Laptop that is also a Mac and using the same version of macOS. Just to get a clear picture that time I disconnected my Google Account and Cleared all cache and then reinstalled Chrome. It worked. Then I logged-in with my Google account that synced my data and then it stopped again. It's weird, isn't it?

So as it was suggested here, I disabled hardware acceleration, but no luck for me. Still the same!

Does it work on Safari and Mozilla Firefox?: Yes, it does. No issue there. It's just Chrome.

So is Ruffle making an issue?

Just to test, I tried playing other WebGL games. Take an example of this one: https://games.doomsplay.com/storm-city-mafia/ Well, none of them loaded on my Chrome. And those WebGL games still works in safari and Firefox.

So it could be just Chrome or something in my Google account that syncs and make webgl buggy. just guessing, i could be wrong, though.

Herschel commented 3 years ago

Interesting that it's related to Google account settings; possibly there is some other feature flag enabled that is preventing canvas or WebGL access. Unfortunately I am not able to repro this on my own Macbook Air with Big Sur, so it is difficult for me to diagnose the issue -- help wanted if there's someone who can repro and debug this.

zohebnsr commented 3 years ago

Not sure if this is what you want. It is from console (attached the screenshot + console error text):

first second third

index.css:1 Failed to load resource: the server responded with a status of 404 () ruffle_web_bg.js:1292 Creating WebGL renderer... ruffle_web_bg.js:1292 Creating WebGL2 context. ruffle_web_bg.js:1292 WebGL graphics driver: Intel Iris Pro OpenGL Engine ruffle_web_bg.js:679 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu (anonymous) @ ruffle_web_bg.js:679 ruffle_web_bg.js:1292 Minimum audio buffer sample rate: 5512 ruffle-player.js:203 New Ruffle instance created. /favicon.ico:1 Failed to load resource: the server responded with a status of 404 () ruffle-player.js:287 Loading SWF file swfs/wasted_sky.swf ruffle_web_bg.js:1292 Loaded SWF version 6, with a resolution of 550x400 ruffle-player.js:176 Ruffle instance destroyed. ruffle_web_bg.js:1292 Creating WebGL renderer... ruffle_web_bg.js:1292 Creating WebGL2 context. ruffle_web_bg.js:1292 WebGL graphics driver: Intel Iris Pro OpenGL Engine ruffle_web_bg.js:1292 Minimum audio buffer sample rate: 5512 ruffle-player.js:203 New Ruffle instance created. ruffle_web_bg.js:1292 PLAY! ruffle-player.js:298 Loading SWF data ruffle_web_bg.js:1292 Loaded SWF version 6, with a resolution of 550x400 ruffle_web_bg.js:1717 Uncaught Error: closure invoked recursively or destroyed already at Object.Xr (ruffle_web_bg.js:1717) at __wbindgen_throw (wasm chunk loading:1384) at wasm_bindgen::throw_str::h56d7dab09aa7f05e (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[5161]:0x37350b) at <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h606fab07d3b5f6e6 (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[4838]:0x371b5c) at P (ruffle_web_bg.js:232) at f (ruffle_web_bg.js:205) ruffle_web_bg.js:1717 Uncaught Error: closure invoked recursively or destroyed already at Object.Xr (ruffle_web_bg.js:1717) at __wbindgen_throw (wasm chunk loading:1384) at wasm_bindgen::throw_str::h56d7dab09aa7f05e (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[5161]:0x37350b) at <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h606fab07d3b5f6e6 (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[4838]:0x371b5c) at P (ruffle_web_bg.js:232) at HTMLElement.f (ruffle_web_bg.js:205) ruffle_web_bg.js:1717 Uncaught Error: closure invoked recursively or destroyed already at Object.Xr (ruffle_web_bg.js:1717) at __wbindgen_throw (wasm chunk loading:1384) at wasm_bindgen::throw_str::h56d7dab09aa7f05e (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[5161]:0x37350b) at <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h606fab07d3b5f6e6 (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[4838]:0x371b5c) at P (ruffle_web_bg.js:232) at f (ruffle_web_bg.js:205) ruffle_web_bg.js:1717 Uncaught Error: closure invoked recursively or destroyed already at Object.Xr (ruffle_web_bg.js:1717) at __wbindgen_throw (wasm chunk loading:1384) at wasm_bindgen::throw_str::h56d7dab09aa7f05e (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[5161]:0x37350b) at <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h606fab07d3b5f6e6 (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[4838]:0x371b5c) at P (ruffle_web_bg.js:232) at HTMLElement.f (ruffle_web_bg.js:205) ruffle_web_bg.js:1717 Uncaught Error: closure invoked recursively or destroyed already at Object.Xr (ruffle_web_bg.js:1717) at __wbindgen_throw (wasm chunk loading:1384) at wasm_bindgen::throw_str::h56d7dab09aa7f05e (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[5161]:0x37350b) at <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h606fab07d3b5f6e6 (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[4838]:0x371b5c) at P (ruffle_web_bg.js:232) at f (ruffle_web_bg.js:205) ruffle_web_bg.js:1717 Uncaught Error: closure invoked recursively or destroyed already at Object.Xr (ruffle_web_bg.js:1717) at __wbindgen_throw (wasm chunk loading:1384) at wasm_bindgen::throw_str::h56d7dab09aa7f05e (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[5161]:0x37350b) at <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h606fab07d3b5f6e6 (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[4838]:0x371b5c) at P (ruffle_web_bg.js:232) at HTMLElement.f (ruffle_web_bg.js:205) ruffle_web_bg.js:1717 Uncaught Error: closure invoked recursively or destroyed already at Object.Xr (ruffle_web_bg.js:1717) at __wbindgen_throw (wasm chunk loading:1384) at wasm_bindgen::throw_str::h56d7dab09aa7f05e (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[5161]:0x37350b) at <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h606fab07d3b5f6e6 (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[4838]:0x371b5c) at P (ruffle_web_bg.js:232) at f (ruffle_web_bg.js:205) ruffle_web_bg.js:1717 Uncaught Error: closure invoked recursively or destroyed already at Object.Xr (ruffle_web_bg.js:1717) at __wbindgen_throw (wasm chunk loading:1384) at wasm_bindgen::throw_str::h56d7dab09aa7f05e (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[5161]:0x37350b) at <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h606fab07d3b5f6e6 (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[4838]:0x371b5c) at P (ruffle_web_bg.js:232) at HTMLElement.f (ruffle_web_bg.js:205) ruffle_web_bg.js:1717 Uncaught Error: closure invoked recursively or destroyed already at Object.Xr (ruffle_web_bg.js:1717) at __wbindgen_throw (wasm chunk loading:1384) at wasm_bindgen::throw_str::h56d7dab09aa7f05e (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[5161]:0x37350b) at <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h606fab07d3b5f6e6 (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[4838]:0x371b5c) at P (ruffle_web_bg.js:232) at f (ruffle_web_bg.js:205) ruffle_web_bg.js:1717 Uncaught Error: closure invoked recursively or destroyed already at Object.Xr (ruffle_web_bg.js:1717) at __wbindgen_throw (wasm chunk loading:1384) at wasm_bindgen::throw_str::h56d7dab09aa7f05e (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[5161]:0x37350b) at <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h606fab07d3b5f6e6 (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[4838]:0x371b5c) at P (ruffle_web_bg.js:232) at HTMLElement.f (ruffle_web_bg.js:205) ruffle_web_bg.js:1717 Uncaught Error: closure invoked recursively or destroyed already at Object.Xr (ruffle_web_bg.js:1717) at __wbindgen_throw (wasm chunk loading:1384) at wasm_bindgen::throw_str::h56d7dab09aa7f05e (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[5161]:0x37350b) at <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h606fab07d3b5f6e6 (/demo/9787cfba420e7deb83df.module.wasm:wasm-function[4838]:0x371b5c) at P (ruffle_web_bg.js:232) at f (ruffle_web_bg.js:205) index.css:1 Failed to load resource: the server responded with a status of 404 ()

zohebnsr commented 3 years ago

Something just happened I wanted to share: As discussed in this thread. Ruffle not working on Chrome. I open your website upload the file and I see nothing but hear the sound. However, My Mac still seems to have Adobe's Flash Player Installed (it's not the web version but the one that plays offline). So I was testing a file within that player and was also using Chrome. All of a sudden Ruffle started to work on Chrome. I closed that Flash player, then it stopped working again. I opened that player and it worked again on Chrome.

Sounds very weird, but I can record a video if you guys want me to show it.

What do you think? Is Adobe freaking my Google Chrome browser on Mac? Hahaha

Herschel commented 3 years ago

Could those experiencing this issue go to chrome://gpu/, and paste the report? Thank you!

zohebnsr commented 3 years ago

Could those experiencing this issue go to chrome://gpu/, and paste the report? Thank you!

When you asked this, first thing came to my mind is Dual-Graphic Card and that's what is happening. You got it right. I disabled Auto Graphic switching and mac Started Using Dedicated Graphic Card and Ruffle works fine. So this is what happened when I played Flash Games with Flash Player. It enabled my Dedicated Graphic card because of graphic usage and Ruffle worked.

In short: Chrome is failing to Ruffle work with integrated graphic, need to enable Dedicated Graphic if using a dual graphic card.

And the link u gave me to check, it shows this that makes sense now:

Migrating OpenGL contexts between low- and high-power GPUs is unreliable on Mac NVIDIA laptops: 681341

Herschel commented 3 years ago

Thanks for testing!

The linked Chrome issue: https://bugs.chromium.org/p/chromium/issues/detail?id=681341

I wonder if it helps if we set powerPreference when we crate the WebGL context.

sffc commented 3 years ago

Another report: black screen on all Ruffle apps, but sound works. System info:

Works fine in Firefox. :)

zohebnsr commented 3 years ago

Another report: black screen on all Ruffle apps, but sound works. System info:

  • Chrome 88
  • macOS 10.14.6 (18G4032)
  • MacBook Pro (Retina, 15-inch, Mid 2015)
  • Integrated Graphics: Intel Iris Pro 1536 MB
  • Discrete Graphics: AMD Radeon R9 M370X

Works fine in Firefox. :)

It's probably the same issue that I reported earlier. Use the dedicated graphic card and test it should work. (System Prefrences--> Power (Battery) Settings --> Disable Automatic Graphic Card Switch. Test on Chrome.

sffc commented 3 years ago

^ Confirmed that the discrete graphics toggle switch in System Preferences fixes the Chrome rendering.

darriuk commented 3 years ago

Same issue here. Unticking the 'Automatic graphic switching' checkbox in System Preferences > Energy Saver solved it.

m0n1rr commented 3 years ago

I have the same issues but i only have one gpu. MacBook Air (13-inch, Early 2014) gpu: Intel HD Graphics 5000 1536 MB chrome: Version 90.0.4430.93 (Official Build) (x86_64) macOS: 10.15.5 (19F96)

works fine on safari and turning off hardware acceleration only works partially. It does not show the background for some reason.

Screenshot 2021-05-05 at 18 26 20 Screenshot 2021-05-05 at 18 26 43

guitarcalin commented 3 years ago

I have the same issues but i only have one gpu. MacBook Air (13-inch, Early 2014) gpu: Intel HD Graphics 5000 1536 MB chrome: Version 90.0.4430.93 (Official Build) (x86_64) macOS: 10.15.5 (19F96)

works fine on safari and turning off hardware acceleration only works partially. It does not show the background for some reason.

Screenshot 2021-05-05 at 18 26 20 Screenshot 2021-05-05 at 18 26 43

hello, you said it works fine on safari, could you please tell me how you installed the extension on safari? i have no idea how to do it and the website doesn't really explain it well enough for me.

relrelb commented 2 years ago

This might be the same case as #6365, where gl.MAX_TEXTURE_SIZE is too small to render the large 5120x720 background image.