So I tried making a rest api to serve SWFs using ruffle, but direct links don't work for some reason.
Describe the bug
https://swfloader.hellscaped.repl.co/?swfUrl=https://uploadhost.hellscaped.repl.co/uploads/solitaire.swf&height=720&width=1080 My site, contains the error(s) in question.
Source code: https://replit.com/@Hellscaped/swfloader
No, its definitely not an issue on my part. I tried serving it from my static directory and it worked fine. this bug only occurs on direct links.
Expected behavior
The swf is supposed to load fine.
Affected platform
Self-hosted version
Operating system
ChromeOS
Browser
Latest Chrome Version
Additional information
Error Info
Error name: Error Error message: Failed to fetch: https://uploadhost.hellscaped.repl.co/uploads/solitaire.swf Error stack:
Error: Failed to fetch: https://uploadhost.hellscaped.repl.co/uploads/solitaire.swf
at N.displayRootMovieDownloadFailedMessage (https://unpkg.com/@ruffle-rs/ruffle:1:42418)
at W.n.wbg.__wbg_displayRootMovieDownloadFailedMessage_1a5c34096259685a (https://unpkg.com/@ruffle-rs/ruffle/core.ruffle.a6b690038fe4b073bb1a.js:1:6799)
at <ruffle_web::ui::WebUiBackend as ruffle_core::backend::ui::UiBackend>::display_root_movie_download_failed_message::h649a3e77f0611ec7 (wasm://wasm/016cf74a:wasm-function[5865]:0x464e21)
at <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::hfac90df4b3084da9 (wasm://wasm/016cf74a:wasm-function[488]:0x17a1c8)
at <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll::h963cca25f878bf44 (wasm://wasm/016cf74a:wasm-function[1062]:0x290b62)
at wasm_bindgen_futures::queue::Queue::new::{{closure}}::hef1bdbb71c73a68d (wasm://wasm/016cf74a:wasm-function[2159]:0x38b63f)
at <dyn core::ops::function::FnMut<(A,)>+Output = R as wasm_bindgen::closure::WasmClosure>::describe::invoke::h714f8411bae5f857 (wasm://wasm/016cf74a:wasm-function[5346]:0x454406)
at closure2829 externref shim (wasm://wasm/016cf74a:wasm-function[5474]:0x456ba6)
at S (https://unpkg.com/@ruffle-rs/ruffle/core.ruffle.a6b690038fe4b073bb1a.js:1:2706)
at c (https://unpkg.com/@ruffle-rs/ruffle/core.ruffle.a6b690038fe4b073bb1a.js:1:2231)
Player Info
Allows script access: false
Page Info
Page URL: https://swfloader.hellscaped.repl.co/?swfUrl=https://uploadhost.hellscaped.repl.co/uploads/solitaire.swf&height=720&width=1080 SWF URL: https://uploadhost.hellscaped.repl.co/uploads/solitaire.swf
Browser Info
User Agent: Mozilla/5.0 (X11; CrOS x86_64 14909.124.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36 Platform: Linux x86_64 Has touch support: false
Ruffle Info
Version: 0.1.0 Name: nightly 2022-09-05 Channel: nightly Built: 2022-09-05T00:15:05.630Z Commit: acdb7678621c1f5fd5f13d5fc5a82d870f9720c0 Is extension: false
Metadata
fixed it by making it save the swf, took me 20 minutes.