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

Ruffle Error on Tor Browsers #1992

Closed
VasilisThePikachu opened this issue Dec 16, 2020 · 8 comments
Closed

Ruffle Error on Tor Browsers #1992

VasilisThePikachu opened this issue Dec 16, 2020 · 8 comments
Labels
A-web Area: Web & Extensions

Comments

@VasilisThePikachu
Copy link

This error appears when you try to load anything when on the tor browser with the extension or not
Tor browsers security level was set the standard and NoScript was turned off

While this may be useless as most people won't view flash on tor browser it will be nice to have

Reproduction:
1: Start Tor browser
2: Set security level to Standard
3: Visit https://ruffle.rs/demo/

Reproduced on:
Windows 10 Tor browser 10.0.5 (based on Mozilla Firefox 78.5.0esr)
Tails OS 4.14 Tor browser 10.0.7 (based on Mozilla Firefox 78.6.0esr)

If more info is needed tell me in comments

On demo (without the extension installed):

Error Info

Error name: ReferenceError
Error message: webkitAudioContext is not defined
Error stack:

624@https://ruffle.rs/demo/662.index.js:1:15436
bi@https://ruffle.rs/demo/index.js:1:34398
662@https://ruffle.rs/demo/662.index.js:1:12310
bi@https://ruffle.rs/demo/index.js:1:34398

Player Info

Allows script access: false

Page Info

Page URL: https://ruffle.rs/demo/

Browser Info

Useragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0
OS: Win32

Ruffle Info

Version: 0.1.0
Name: nightly 2020-12-15
Channel: nightly
Built: 2020-12-15T00:33:46.121Z
Commit: 709561a

@ghost
Copy link

ghost commented Dec 16, 2020

Is web assembly allowed in the Tor browser? I would think not. based on an unrelated project here PrivateBin/PrivateBin#454 at least in 2019 Tor didn't have webasm.

@rdrpenguin04
Copy link
Contributor

This doesn't look like a WASM-related issue. Tor disabled AudioContext for security reasons, as the Web Audio API is now available.

@rdrpenguin04
Copy link
Contributor

@VasilisThePikachu
Copy link
Author

Seems like that was the case as enabling dom.webaudio.enabled in about:config fixes it
is there anything that can be done about this?

also, while it now can do playback it seems like you can't interact with it at all

@Herschel
Copy link
Member

Tor can disable many features for security reasons, so I don't think Ruffle will be officially supported on Tor. But we should try to fail more gracefully in these cases (for example, in the audio context case, we could play without audio if web audio isn't available).

@Herschel Herschel added the A-web Area: Web & Extensions label Dec 18, 2020
@LiEnby
Copy link

LiEnby commented Dec 21, 2020

TOR disables alot of stuff to try prevent fingerprinting and stuff.

@Herschel
Copy link
Member

Looked into this a bit more; the issue is that wasm-bindgen generates JS with this line:

const lAudioContext = (typeof AudioContext !== 'undefined' ? AudioContext : webkitAudioContext);

which causes an error because AudioContext/webkitAudioContext are undefined in Tor. This will take a change to wasm-bindgen to fix. Then we can catch the error normally and disable audio.

Opened rustwasm/wasm-bindgen#2437 on wasm-bindgen.

@Herschel
Copy link
Member

Herschel commented Apr 18, 2021

I've bumped to the latest wasm-bindgen, and Ruffle will now run without audio when the audio context can't be created. So Ruffle will now at least run in Tor with default settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-web Area: Web & Extensions
Projects
None yet
Development

No branches or pull requests

4 participants