Very rare unwrap panic at util.rs line 517 "abrupt end"
Hello, i'm making a private app which depends on your project, and it works pretty well!
but sometimes, when downloading videos, at line 517 of util.rs, there is a panic on the unwrap
Knowing that in Rust there are no exceptions, this unwrap, when it panics, ends up crashing my entire program, and i can't do a thing about it (that i know of).
I don't know if it would be a large endeavor, but if you judge it's not, i'd kindly ask for you to remote the unwrap at that line, so that if any errors occour, i'm able to handle them from my side.
@luis10barbo thanks for the feedback. Is it happening on specific videos? If yes can you provide video IDs
The same error occurs for me on Mac with every video, every time up to this point. I haven't encountered this error on Windows yet.
Experienced the same issue, but so far unable to reproduce from my side. If I can reproduce and get some more logging information I'll let you know.
thread 'tokio-runtime-worker' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rusty_ytdl-0.7.3/src/utils.rs:517:50:
called Result::unwrap() on an Err value: JsError { inner: Native(JsNativeError { kind: Syntax, message: "abrupt end", cause: None, .. }) }
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: core::result::unwrap_failed
3: rusty_ytdl::utils::ncode
4: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &mut F>::call_once
5: rusty_ytdl::utils::parse_video_formats
6: rusty_ytdl::info::Video::get_info::{{closure}}
7: tgbot_app::download::y_ytdl::down_mp3::{{closure}}
8: tgbot_app::handler::handler::{{closure}}
9: <ferrisgram::ext::handlers::message_handler::MessageHandler<F> as ferrisgram::ext::handler::Handler>::handle_update::{{closure}}
10: tokio::runtime::task::core::Core<T,S>::poll
11: tokio::runtime::task::raw::poll
12: tokio::runtime::scheduler::multi_thread::worker::Context::run_task
13: tokio::runtime::task::raw::poll
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
Aborted
thread 'tokio-runtime-worker' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rusty_ytdl-0.7.3/src/utils.rs:517:50: called
Result::unwrap()on anErrvalue: JsError { inner: Native(JsNativeError { kind: Syntax, message: "abrupt end", cause: None, .. }) } stack backtrace: 0: rust_begin_unwind 1: core::panicking::panic_fmt 2: core::result::unwrap_failed 3: rusty_ytdl::utils::ncode 4: core::ops::function::impls::<impl core::ops::function::FnOnce for &mut F>::call_once 5: rusty_ytdl::utils::parse_video_formats 6: rusty_ytdl::info::Video::get_info::{{closure}} 7: tgbot_app::download::y_ytdl::down_mp3::{{closure}} 8: tgbot_app::handler::handler::{{closure}} 9: <ferrisgram::ext::handlers::message_handler::MessageHandler as ferrisgram::ext::handler::Handler>::handle_update::{{closure}} 10: tokio::runtime::task::core::Core<T,S>::poll 11: tokio::runtime::task::raw::poll 12: tokio::runtime::scheduler::multi_thread::worker::Context::run_task 13: tokio::runtime::task::raw::poll note: Some details are omitted, run withRUST_BACKTRACE=fullfor a verbose backtrace. Aborted
I'm getting the same error too.
same here. every video I try. probably some yt api crap.
@luis10barbo thanks for the feedback. Is it happening on specific videos? If yes can you provide video IDs
When i was having this issue, it seemed like it could happen with any videos randomly. Next time i run into the issue, ill send more info here
rusty_ytdl uses boa_engine v0.19.0 and its seems fixed the issue. If the issue is still there feel free to re-open the issue