ruffle-rs / ruffle

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

Error on http://emgame.snailgame.ru/ #2468

Open imgaylol4 opened 3 years ago

imgaylol4 commented 3 years ago

Error Info

Error name: TypeError Error message: Cannot read property 'toString' of undefined Error stack:

TypeError: Cannot read property 'toString' of undefined
    at Object.ns.IsCorsRequest (http://gc.kis.v2.scr.kaspersky-labs.com/FD126C42-EBFA-4E12-B309-BB3FDD723AC1/main.js?attr=KDF-7RtkVlw0QCIt7uJUh9kCO-5N86pdxqix3Kvuse1oam0_E0-1Hmmzwi1yrxqq:224:45)
    at window.fetch (http://gc.kis.v2.scr.kaspersky-labs.com/FD126C42-EBFA-4E12-B309-BB3FDD723AC1/main.js?attr=KDF-7RtkVlw0QCIt7uJUh9kCO-5N86pdxqix3Kvuse1oam0_E0-1Hmmzwi1yrxqq:2777:34)
    at <anonymous>:3:67417
    at Array.forEach (<anonymous>)
    at Object.yi.f.wasm (<anonymous>:3:67344)
    at <anonymous>:3:35282
    at Array.reduce (<anonymous>)
    at Function.yi.e (<anonymous>:3:35259)
    at i (<anonymous>:3:6444)
    at i.next (<anonymous>)

Player Info

Allows script access: true

Page Info

Page URL: http://emgame.snailgame.ru/

Browser Info

Useragent: Mozilla/5.0 (Windows NT 6.1) 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-13 Channel: nightly Built: 2021-01-13T01:01:47.998Z Commit: 63f2b4f02f8fa4fa69ce61a5f6710bb07fcd2f33

David-Development commented 3 years ago

In another context I experienced this exact error message. I can confirm that this is caused by the JavaScript that is injected by Kaspersky Internet Security (@KasperskyLabs). They monkey patch the window.fetch command and run some additional checks before letting requests through. However the IsCorsRequest method seems to have a few flaws which causes websites to break. (I believe @felixaime works at KasperkyLabs. Maybe he can pass that information on to the correct department?). We created a minimal reproducible example that I can share if necessary.

n0samu commented 1 year ago

Thank you and sorry for the late response @David-Development. Do you know whether this problem has been fixed yet?