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

Handle session expiry (oauth2) #6

Open
KoviRobi opened this issue Dec 5, 2024 · 0 comments
Open

Handle session expiry (oauth2) #6

KoviRobi opened this issue Dec 5, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@KoviRobi
Copy link
Contributor

KoviRobi commented Dec 5, 2024

Mostly just wanted to get this on the radar, this isn't a big issue for me, and I'm aware you have a lot of things going on, coming up to version 1

I have a Microsoft OAuth2 setup, using pizauth, which after about 30m hits the following issue

2024-12-05T13:45:48.398466Z DEBUG execute: email::email::envelope::watch: executing watch hooks…
2024-12-05T13:45:48.398646Z  INFO execute: email::email::envelope::watch::imap: starting new IMAP IDLE loop…
2024-12-05T13:45:48.398659Z DEBUG execute:idle{client=1}:idle: imap_client: starting the main loop
2024-12-05T13:45:48.398705Z TRACE execute:idle{client=1}:idle: imap_next::stream: wrote 20/20 bytes
2024-12-05T13:45:48.417277Z TRACE execute:idle{client=1}:idle: imap_next::stream: read 41/1024 bytes
2024-12-05T13:45:48.417330Z DEBUG execute:idle{client=1}:idle: imap_client: command sent
2024-12-05T13:45:48.417405Z DEBUG execute:idle{client=1}:idle: imap_client: command accepted, entering idle mode
2024-12-05T13:45:48.417420Z TRACE execute:idle{client=1}:idle: imap_next::stream: more input needed
2024-12-05T13:50:48.419153Z DEBUG execute:idle{client=1}:idle: imap_client: timed out, sending done command…
2024-12-05T13:50:48.419311Z TRACE execute:idle{client=1}:idle: imap_next::stream: wrote 6/6 bytes
2024-12-05T13:50:48.438125Z TRACE execute:idle{client=1}:idle: imap_next::stream: read 48/1024 bytes
2024-12-05T13:50:48.438179Z DEBUG execute:idle{client=1}:idle: imap_client: done command sent
2024-12-05T13:50:48.438206Z DEBUG execute:idle{client=1}:idle: imap_client: received unknown event, ignoring: Ok(StatusReceived { status: Bye(Bye { code: None, text: Text("Session invalidated - AccessTokenExpired") }) })
2024-12-05T13:50:48.438232Z TRACE execute:idle{client=1}:idle: imap_next::stream: more input needed
Error:
   0: cannot start IMAP IDLE mode
   1: peer closed connection without sending TLS close_notify: https://docs.rs/rustls/latest/rustls/manual/_03_howto/index.html#unexpected-eof

Location:
   /build/spa4nqqrva1rkhrx2nbsjwxb80xwy5ys-source/src/account/command/watch.rs:65

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SPANTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   0: mirador::account::command::watch::execute
      at src/account/command/watch.rs:35

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
                                ⋮ 3 frames hidden ⋮
   4: <core::future::poll_fn::PollFn<F> as core::future::future::Future>::poll::hf9b64066b5f4e771
      at <unknown source file>:<unknown line>
   5: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll::h9343510889d21915
      at <unknown source file>:<unknown line>
   6: mirador::cli::MiradorCommand::execute::{{closure}}::hbe271c269202b5cf
      at <unknown source file>:<unknown line>
   7: tokio::runtime::park::CachedParkThread::block_on::hb42582e00f8ac80e
      at <unknown source file>:<unknown line>
   8: tokio::runtime::context::runtime::enter_runtime::h2bbd0b98153e323b
      at <unknown source file>:<unknown line>
   9: tokio::runtime::runtime::Runtime::block_on::hb165295030325b9c
      at <unknown source file>:<unknown line>
  10: mirador::main::h54067a07245e7729
      at <unknown source file>:<unknown line>
  11: std::sys::backtrace::__rust_begin_short_backtrace::h1fcd75d91cd4590b
      at <unknown source file>:<unknown line>
  12: std::rt::lang_start::{{closure}}::hc3bcbc60f6497e9d
      at <unknown source file>:<unknown line>
  13: std::rt::lang_start_internal::h4d90db0530245041
      at <unknown source file>:<unknown line>
  14: main<unknown>
      at <unknown source file>:<unknown line>
  15: __libc_start_call_main<unknown>
      at <unknown source file>:<unknown line>
  16: __libc_start_main_alias_2<unknown>
      at <unknown source file>:<unknown line>
  17: _start<unknown>
      at <unknown source file>:<unknown line>

This is easy to work around (e.g. systemd user service), so not a high priority issue, though that does mean there is a small window during which a mail can be missed. Maybe neverest could have an option to call a script for new mail too?

@soywod soywod added the bug Something isn't working label Dec 5, 2024
@soywod soywod added this to Pimalaya Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

2 participants