aws / aws/amazon-q-developer-cli
[BUG] q login fails for Pro Users as soon as subscription is disabled
- Dominant language
- Rust
- Stars
- 2k
- Forks
- 439
- PR merge metrics
- No merged PRs in 30d
Description
### Checks
- [x] I have searched [github.com/aws/amazon-q-developer-cli/issues](https://github.com/aws/amazon-q-developer-cli/issues?q=) and there are no duplicates of my issue
- [x] I have run `q doctor` in the affected terminal session
- [x] I have run `q restart` and replicated the issue again
### Operating system
Linux 6.9.3-76060903-generic - Pop!_OS 22.04 LTS
### Expected behaviour
After unsubscribing an organization user from Q developer, the license supposedly stays active until the end of the subscription period (according to what the console says).
### Actual behaviour
As soon as the user is unsubscribed from the organization subscription, `q login` stops working.
### Steps to reproduce
- Unsubscribe the user
- Run `q login` and select the pro option
- Then authenticate with the org account
```
18:19:52+0900 ❯ RUST_BACKTRACE=1 q login --verbose
✔ Select login method · Use with Pro license
Logging in...error:
0: service error
1: AccessDeniedException
2: AccessDeniedException
Location:
crates/q_cli/src/cli/user.rs:245
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⋮ 5 frames hidden ⋮
6: as core::ops::try_trait::FromResidual>>::from_residual::h4b6a8c062da08d13
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/result.rs:2009
7: q_cli::cli::user::login_interactive::{{closure}}::hf0ea5a6b6faa7349
at /codebuild/output/src317271833/src/crates/q_cli/src/cli/user.rs:245
8: q_cli::cli::user::RootUserSubcommand::execute::{{closure}}::h533d1275ddf7b3dd
at /codebuild/output/src317271833/src/crates/q_cli/src/cli/user.rs:114
9: q_cli::cli::Cli::execute::{{closure}}::h75870b435ea7dd02
at /codebuild/output/src317271833/src/crates/q_cli/src/cli/mod.rs:329
10: q_cli::main::{{closure}}::h49ffa149b4637d65
at /codebuild/output/src317271833/src/crates/q_cli/src/main.rs:70
11: as core::future::future::Future>::poll::h30804402f421e69a
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/future/future.rs:124
12: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::{{closure}}::hbc737639fe50bbed
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/scheduler/current_thread/mod.rs:733
13: tokio::task::coop::with_budget::h5af1a1cb69a8fa15
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/task/coop/mod.rs:167
14: tokio::task::coop::budget::hd6b5a66da3c280bc
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/task/coop/mod.rs:133
15: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::{{closure}}::he46f1318ee3892bc
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/scheduler/current_thread/mod.rs:733
16: tokio::runtime::scheduler::current_thread::Context::enter::h61c14a2b36bca5d8
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/scheduler/current_thread/mod.rs:432
17: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::{{closure}}::h68008ac34bccbe69
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/scheduler/current_thread/mod.rs:732
18: tokio::runtime::scheduler::current_thread::CoreGuard::enter::{{closure}}::h11886b3f45c14d40
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/scheduler/current_thread/mod.rs:820
19: tokio::runtime::context::scoped::Scoped::set::hf79ec1ebc1af1a80
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/context/scoped.rs:40
20: tokio::runtime::context::set_scheduler::{{closure}}::hb48f9ec1ebaa3a51
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/context.rs:180
21: std::thread::local::LocalKey::try_with::h0492467f064ee26d
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/thread/local.rs:283
22: std::thread::local::LocalKey::with::h20cdfbb2c4f9fee7
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/thread/local.rs:260
23: tokio::runtime::context::set_scheduler::h519b476d23dff0af
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/context.rs:180
24: tokio::runtime::scheduler::current_thread::CoreGuard::enter::hfd4291c97d3e0e3c
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/scheduler/current_thread/mod.rs:820
25: tokio::runtime::scheduler::current_thread::CoreGuard::block_on::hc3c98f29369c1b28
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/scheduler/current_thread/mod.rs:720
26: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::{{closure}}::h00c2bddf3732b508
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/scheduler/current_thread/mod.rs:200
27: tokio::runtime::context::runtime::enter_runtime::h04b783fdd17a71c5
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/context/runtime.rs:65
28: tokio::runtime::scheduler::current_thread::CurrentThread::block_on::h51128a9c5a3168af
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/scheduler/current_thread/mod.rs:188
29: tokio::runtime::runtime::Runtime::block_on_inner::h1deb652ff155327d
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/runtime.rs:368
30: tokio::runtime::runtime::Runtime::block_on::hd8bdc8d4f5b0032d
at /home/codebuild-user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.44.2/src/runtime/runtime.rs:342
31: q_cli::main::h992f39342f688624
at /codebuild/output/src317271833/src/crates/q_cli/src/main.rs:69
32: core::ops::function::FnOnce::call_once::h0644ad41b159982b
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/core/src/ops/function.rs:250
33: std::sys::backtrace::__rust_begin_short_backtrace::hab1d7cb15c6f1bc2
at /rustc/9fc6b43126469e3858e2fe86cafb4f0fd5068869/library/std/src/sys/backtrace.rs:154
⋮ 13 frames hidden ⋮
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
```
### Environment
```yaml
18:22:53+0900 ❯ q diagnostic
[q-details]
version = "1.7.3"
hash = "3e4ae79d371315e80ddac772b43fff2cba314104"
date = "2025-04-10T05:51:23.996702Z (9d ago)"
variant = "full"
[system-info]
chip = "Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz"
total-cores = 6
memory = "30.99 GB"
[system-info.os.linux]
kernel_version = "6.9.3-76060903-generic"
id = "pop"
name = "Pop!_OS"
pretty_name = "Pop!_OS 22.04 LTS"
version_id = "22.04"
version = "22.04 LTS"
[environment]
cwd = "/home/USER"
cli-path = "/home/USER"
os = "Linux"
shell-path = "/usr/bin/bash"
shell-version = "5.1.16"
terminal = "Kitty"
install-method = "unknown"
[env-vars]
DISPLAY = ":1"
GTK_IM_MODULE = "ibus"
PATH = "/opt/homebrew/bin:/usr/local/sbin:/home/USER/.local/bin:/usr/local/go/bin:/home/USER/go/bin:/home/USER/.local/share/pnpm:/home/USER/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/USER/.local/bin:/home/USER/.fzf/bin"
QTERM_SESSION_ID = "d00b3bcb18f74a3ab05c3af8578ac989"
QT_IM_MODULE = "ibus"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.7.2"
SHELL = "/bin/bash"
TERM = "xterm-kitty"
XDG_CURRENT_DESKTOP = "pop:GNOME"
XDG_SESSION_DESKTOP = "pop"
XDG_SESSION_TYPE = "x11"
XMODIFIERS = "@im=ibus"
```
Contributor guide
Assessment
This issue has not been assessed yet.