wouterdebie / locast2tuner

Locast to Emby/Plex/Channels server
https://wouterdebie.github.io/locast2tuner/
MIT License
52 stars 8 forks source link

Windows 10 .3.8 new version issues. #98

Closed tharris9d closed 3 years ago

tharris9d commented 3 years ago

Windows 10 Pro Tried the downloaded Locast2Tuner.exe Then download source and compiled to Locast2Tuner.exe with same error below. Paid locast account.

  1. ran this command line from a batch file which worked on previous versions before Locast login changes.
  2. c:\code\locast2tuner\locast2tuner.exe -m -U email -P password--rust_backtrace --tuner_count 3 -z 91505,85006,10009 --remap
  3. Here is the error when running
  4. Aug 26 09:48:22.100 INFO locast2tuner 0.3.8 on Windows 6.2.9200 starting.. Aug 26 09:48:22.101 INFO Consider sponsoring this project at https://github.com/sponsors/wouterdebie! thread 'Aug 26 09:48:22.651main' panicked at ' called Result::unwrap() on an Err value: reqwest::Error { kind: Decode, source: Error("EOF while parsing a value", line: 1, column: 0) }', INFOsrc\credentials.rs: 76:Login succeeded!50

stack backtrace: 0: std::panicking::begin_panic_handler at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\panicking.rs:515 1: core::panicking::panic_fmt at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\core\src\panicking.rs:92 2: core::result::unwrap_failed at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\core\src\result.rs:1355 3: <core::future::from_generator::GenFuture as core::future::future::Future>::poll 4: <core::future::from_generator::GenFuture as core::future::future::Future>::poll 5: tokio::macros::scoped_tls::ScopedKey::set 6: <core::future::from_generator::GenFuture as core::future::future::Future>::poll 7: tokio::macros::scoped_tls::ScopedKey::set 8: tokio::runtime::basic_scheduler::BasicScheduler

::block_on 9: tokio::task::local::LocalSet::block_on 10: locast2tuner::service::multiplexer::<impl locast2tuner::service::station_provider::StationProvider for alloc::sync::Arc>::geo note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace. thread 'main' panicked at 'slog-scope: No logger set. Use slog_scope::set_global_logger or slog_scope::scope.', C:\Users\Valued Customer.cargo\registry\src\github.com-1ecc6299db9ec823\slog-scope-4.4.0\lib.rs:125:13 stack backtrace: 0: 0x7ff6ba8c25df - std::backtrace_rs::backtrace::dbghelp::trace at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src....\backtrace\src\backtrace\dbghelp.rs:98 1: 0x7ff6ba8c25df - std::backtrace_rs::backtrace::trace_unsynchronized at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src....\backtrace\src\backtrace\mod.rs:66 2: 0x7ff6ba8c25df - std::sys_common::backtrace::_print_fmt at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\sys_common\backtrace.rs:67 3: 0x7ff6ba8c25df - std::sys_common::backtrace::_print::{{impl}}::fmt at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\sys_common\backtrace.rs:46 4: 0x7ff6ba8d9c1a - core::fmt::write at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\core\src\fmt\mod.rs:1110 5: 0x7ff6ba8bb2e8 - std::io::Write::write_fmt at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\io\mod.rs:1588 6: 0x7ff6ba8c51b6 - std::sys_common::backtrace::_print at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\sys_common\backtrace.rs:49 7: 0x7ff6ba8c51b6 - std::sys_common::backtrace::print at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\sys_common\backtrace.rs:36 8: 0x7ff6ba8c51b6 - std::panicking::default_hook::{{closure}} at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\panicking.rs:208 9: 0x7ff6ba8c4c99 - std::panicking::default_hook at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\panicking.rs:225 10: 0x7ff6ba8c5815 - std::panicking::rust_panic_with_hook at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\panicking.rs:622 11: 0x7ff6ba545ad4 - std::sync::once::Once::call_once::{{closure}}::hfb2a145ca6849115 12: 0x7ff6ba54595f - std::sys_common::backtrace::rust_end_short_backtrace::h61f63aa2af86ac63 13: 0x7ff6ba93639d - std::panicking::begin_panic::habf33f600e4df4c4 14: 0x7ff6ba544e8c - ::log::h12724779020a372f 15: 0x7ff6ba544941 - std::thread::local::LocalKey::with::h799b19dd578d1835 16: 0x7ff6ba5447a4 - ::log::h95e5a359a0dc2f36 17: 0x7ff6ba8b11f0 - log::private_api_log::hd1ea24df5a6d196f 18: 0x7ff6ba6613cf - tokio::io::driver::registration::Registration::deregister::hed77fb6064d381fa 19: 0x7ff6ba5e2980 - <tokio::io::poll_evented::PollEvented as core::ops::drop::Drop>::drop::had70f566e89fc21e 20: 0x7ff6ba6604eb - core::ptr::drop_in_place::h0ed6fd14051b6474 21: 0x7ff6ba660a06 - core::ptr::drop_in_place<tokio_native_tls::TlsStream>::h5f3fb364633629a2 22: 0x7ff6ba604643 - ZN4core3ptr722drop_in_place$LT$tokio..runtime..task..core..Stage$LT$futures_util..future..future..Map$LT$futures_util..future..try_future..MapErr$LT$hyper..client..conn..Connection$LT$reqwest..connect..Conn$C$reqwest..async_impl..body..ImplStream$GT$$C$hy 23: 0x7ff6ba672d76 - tokio::runtime::task::harness::Harness<T,S>::shutdown::h5a3d247011807367 24: 0x7ff6ba4950ee - tokio::macros::scoped_tls::ScopedKey::set::heeb9e59855e52446 25: 0x7ff6ba4514e7 - <tokio::runtime::basic_scheduler::BasicScheduler

as core::ops::drop::Drop>::drop::h7c568b2e0c18ba1a 26: 0x7ff6ba41629b - ZN4core3ptr418drop_in_place$LT$actix_service..boxed..FactoryWrapper$LT$actix_service..apply..ApplyFactory$LT$actix_web..resource..ResourceEndpoint$C$$LT$actix_web..resource..Resource$u20$as$u20$actix_web..service..HttpServiceFactory$GT$..register..$u7b$$u 27: 0x7ff6ba417537 - ZN4core3ptr418drop_in_place$LT$actix_service..boxed..FactoryWrapper$LT$actix_service..apply..ApplyFactory$LT$actix_web..resource..ResourceEndpoint$C$$LT$actix_web..resource..Resource$u20$as$u20$actix_web..service..HttpServiceFactory$GT$..register..$u7b$$u 28: 0x7ff6ba422a8f - locast2tuner::service::multiplexer::<impl locast2tuner::service::station_provider::StationProvider for alloc::sync::Arc>::geo::hbbe8515800297b3e 29: 0x7ffff2291030 - 30: 0x7ffff2294cb2 - is_exception_typeof 31: 0x7ffff229f0e4 - _C_specific_handler 32: 0x7ffff2293f28 - is_exception_typeof 33: 0x7ffff229fa21 - _CxxFrameHandler3 34: 0x7ff80d9121ff - _chkstk 35: 0x7ff80d8a0939 - RtlUnwindEx 36: 0x7ffff229f5ae - _C_specific_handler 37: 0x7ffff2292bf5 - is_exception_typeof 38: 0x7ffff229300d - is_exception_typeof 39: 0x7ffff2294024 - is_exception_typeof 40: 0x7ffff229fa21 - _CxxFrameHandler3 41: 0x7ff80d91217f - _chkstk 42: 0x7ff80d8c1454 - RtlRaiseException 43: 0x7ff80d8c11a5 - RtlRaiseException 44: 0x7ff80b344ed9 - RaiseException 45: 0x7ffff2296480 - CxxThrowException 46: 0x7ff6ba8cade1 - panic_unwind::real_imp::panic at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\panic_unwind\src\seh.rs:315 47: 0x7ff6ba8cad69 - panic_unwind::rust_start_panic at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\panic_unwind\src\lib.rs:106 48: 0x7ff6ba8c5beb - std::panicking::rust_panic at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\panicking.rs:670 49: 0x7ff6ba8c59a7 - std::panicking::rust_panic_with_hook at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\panicking.rs:640 50: 0x7ff6ba8c5401 - std::panicking::begin_panic_handler::{{closure}} at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\panicking.rs:519 51: 0x7ff6ba8c2f2f - std::sys_common::backtrace::rust_end_short_backtrace<closure-0,!> at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\sys_common\backtrace.rs:141 52: 0x7ff6ba8c5359 - std::panicking::begin_panic_handler at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\panicking.rs:515 53: 0x7ff6ba946e00 - core::panicking::panic_fmt at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\core\src\panicking.rs:92 54: 0x7ff6ba946f13 - core::result::unwrap_failed at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\core\src\result.rs:1355 55: 0x7ff6ba4eab6d - <core::future::from_generator::GenFuture as core::future::future::Future>::poll::h818f80e3aa71063f 56: 0x7ff6ba4f2383 - <core::future::from_generator::GenFuture as core::future::future::Future>::poll::hbb2f6caa70729ec7 57: 0x7ff6ba494e62 - tokio::macros::scoped_tls::ScopedKey::set::hed097d260228eb50 58: 0x7ff6ba4e0cd6 - <core::future::from_generator::GenFuture as core::future::future::Future>::poll::h5ca0e5eb20af750e 59: 0x7ff6ba494669 - tokio::macros::scoped_tls::ScopedKey::set::h18e530d16fe9d8de 60: 0x7ff6ba44e80a - tokio::runtime::basic_scheduler::BasicScheduler

::block_on::h469144048bfbed59 61: 0x7ff6ba43f19d - tokio::task::local::LocalSet::block_on::h8f6e26f9ff7c3a9a 62: 0x7ff6ba422a49 - locast2tuner::service::multiplexer::<impl locast2tuner::service::station_provider::StationProvider for alloc::sync::Arc>::geo::hbbe8515800297b3e 63: 0x7ff6ba43798a - std::sys_common::backtrace::rust_begin_short_backtrace::h3eb4f006fb536843 64: 0x7ff6ba45e064 - std::rt::lang_start::{{closure}}::h99fa217f092b1277 65: 0x7ff6ba8c5d6a - core::ops::function::impls::{{impl}}::call_once at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\library\core\src\ops\function.rs:280 66: 0x7ff6ba8c5d6a - std::panicking::try::do_call at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\panicking.rs:401 67: 0x7ff6ba8c5d6a - std::panicking::try at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\panicking.rs:365 68: 0x7ff6ba8c5d6a - std::panic::catch_unwind at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\panic.rs:434 69: 0x7ff6ba8c5d6a - std::rt::lang_start_internal at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633\/library\std\src\rt.rs:34 70: 0x7ff6ba422ac7 - main 71: 0x7ff6ba9307cc - invoke_main at d:\agent_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78 72: 0x7ff6ba9307cc - scrt_common_main_seh at d:\agent_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288 73: 0x7ff80ba77034 - BaseThreadInitThunk 74: 0x7ff80d8c2651 - RtlUserThreadStart thread panicked while panicking. aborting.

Croq360 commented 3 years ago

I haven't tried the command line options, but putting everything into a config file is working for me.

wouterdebie commented 3 years ago

Interesting error. It seems to happen when parsing the result of the login and reading the token. The login request succeeds, but what is returned isn't valid json that can be parsed. I know you're on windows, but would you be able to install curl and run the following after replacing USERNAME and PASSWORD?

curl -X POST -d '{"username": "USERNAME", "password":"PASSWORD"}' -H 'Content-Type: application/json' 'https://api.locastnet.org/api/user/login?client_id=i7XBbuDLYwN%2Bd%2Bcf84YQCYK-NyR8QjBGyFV-g5zCRFY%3D'

See if the output is {"token": "...."}.

wouterdebie commented 3 years ago

Also, are you behind a proxy?

wouterdebie commented 3 years ago

And.. right now the code checks if the initial request is success, which means that the HTTP status code has to be between 200 and 299. However, sometimes a 204 - No content is returned. Technically the request was successful, but without any data coming back. Obviously locast2tuner should error in this case as well. I'll make a bug fix for that. That will not fix your issue however.

wouterdebie commented 3 years ago

v0.3.9 is now building and should not let you login. That doesn't fix your issue, but is proper.

tharris9d commented 3 years ago

I updated to v0.3.9 and everything is working now. Thanks for the quick response! I appreciate it.

wouterdebie commented 3 years ago

Wow, interesting :) The error might have been transient.. Anyway, great to hear it works!