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

Main Thread Panics at rchore tasks list #15

Open
pspiagicw opened this issue Aug 24, 2021 · 5 comments
Open

Main Thread Panics at rchore tasks list #15

pspiagicw opened this issue Aug 24, 2021 · 5 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@pspiagicw
Copy link

Platform: ArchLinux x86_64

Steps to reproduce -->

  1. Download latest release
  2. Make it executable and login using 'rchore google login'
  3. Run 'rchore tasks list'
    Expected Behaviour -->
    App retrieves and shows my tasks.
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/service/google_tasks.rs:44:36
stack backtrace:
   0:     0x562029b46a60 - std::backtrace_rs::backtrace::libunwind::trace::ha5edb8ba5c6b7a6c
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x562029b46a60 - std::backtrace_rs::backtrace::trace_unsynchronized::h0de86d320a827db2
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x562029b46a60 - std::sys_common::backtrace::_print_fmt::h97b9ad6f0a1380ff
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x562029b46a60 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h14be7eb08f97fe80
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x562029b6abcf - core::fmt::write::h2ca8877d3e0e52de
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/fmt/mod.rs:1094:17
   5:     0x562029b40235 - std::io::Write::write_fmt::h64f5987220b618f4
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/io/mod.rs:1584:15
   6:     0x562029b48efb - std::sys_common::backtrace::_print::h7f1a4097308f2e0a
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x562029b48efb - std::sys_common::backtrace::print::h1f799fc2ca7f5035
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x562029b48efb - std::panicking::default_hook::{{closure}}::hf38436e8a3ce1071
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:208:50
   9:     0x562029b489cd - std::panicking::default_hook::he2f8f3fae11ed1dd
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:225:9
  10:     0x562029b4950d - std::panicking::rust_panic_with_hook::h79a18548bd90c7d4
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:591:17
  11:     0x562029b49077 - std::panicking::begin_panic_handler::{{closure}}::h212a72cc08e25126
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:495:13
  12:     0x562029b46efc - std::sys_common::backtrace::__rust_end_short_backtrace::hbd6897dd42bc0fcd
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/sys_common/backtrace.rs:141:18
  13:     0x562029b49009 - rust_begin_unwind
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:493:5
  14:     0x5620297b1191 - core::panicking::panic_fmt::h77ecd04e9b1dd84d
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/panicking.rs:92:14
  15:     0x5620297b10dd - core::panicking::panic::h60569d8a39169222
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/panicking.rs:50:5
  16:     0x562029805672 - <rchore::service::google_api::GoogleApiClient as rchore::service::google_tasks::ApiTasks>::fetch_all_tasks::h9444ba239020bcb6
  17:     0x5620297fd55d - rchore::handlers::task_handler::TaskManager::list_tasks::h8617fc28a90a2e22
  18:     0x5620297f6a81 - rchore::main::hafafb010e2863520
  19:     0x5620297d8993 - std::sys_common::backtrace::__rust_begin_short_backtrace::h17da107c06e2973d
  20:     0x5620297d89ad - std::rt::lang_start::{{closure}}::h61e1bdee41c6de17
  21:     0x562029b49a0a - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hc4354216bf39217c
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/core/src/ops/function.rs:259:13
  22:     0x562029b49a0a - std::panicking::try::do_call::hb68eb312780385cf
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:379:40
  23:     0x562029b49a0a - std::panicking::try::h22b8e08595060b8b
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panicking.rs:343:19
  24:     0x562029b49a0a - std::panic::catch_unwind::hc64f1a6a0e71b1fc
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/panic.rs:431:14
  25:     0x562029b49a0a - std::rt::lang_start_internal::h4461fc58637f04f8
                               at /rustc/53cb7b09b00cbea8754ffb78e7e3cb521cb8af4b/library/std/src/rt.rs:34:21
  26:     0x5620297f88e2 - main
  27:     0x7f4557c94b25 - __libc_start_main
  28:     0x5620297b190e - _start
  29:                0x0 - <unknown>
@DarthBenro008
Copy link
Owner

The issue occurs because there has been some failure in setting your default task list, hence it is unable to get your tasks. It ideally should work out-of-the-box, but it seems the request to fetch your task list has failed due to some reason?
But ideally, it should fetch for the task-list once again if the default task-list is not set which is clearly not happening.

Could you please log out using rchore google logout and retry once more? This would clear the db.

@DarthBenro008 DarthBenro008 added the bug Something isn't working label Aug 24, 2021
@DarthBenro008 DarthBenro008 added the help wanted Extra attention is needed label Aug 24, 2021
@pspiagicw
Copy link
Author

Thanks! That Fixed It! But I had to manually tick the option to give permission to Google Tasks.

@DarthBenro008
Copy link
Owner

Makes sense that it was an oauth issue, this can be handled using scope checks with the result from the oauth token itself.

Also, Could you please let me know where you had tick things manually?

@pspiagicw
Copy link
Author

First and formost , we have to remove this warning --> It can make user's skeptical about the app.
Screenshot-1629855117

The screen where I had to manually tick for giving permission for Google Tasks.
Screenshot-1629855135

@DarthBenro008
Copy link
Owner

First and formost , we have to remove this warning --> It can make user's skeptical about the app.

Unfortunately, I cannot remove the screen because the Create and edit scope of Google Tasks is considered a "sensitive scope" by Google and the app will have to go through manual verification by Google Team which may incur a cost. I might send the app for verification after the "Google Calendar" feature is implemented in rChore that is set for its v1.0.0 release.

The screen where I had to manually tick for giving permission for Google Tasks.

Thanks for sharing! There is no way to bypass this due to Google's strict OAuth norms to protect user privacy and data. However, I think there might be a query param that we can send so that the checkbox is selected by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants