amazon-q-developer-cli icon indicating copy to clipboard operation
amazon-q-developer-cli copied to clipboard

Amazon Q CLI error: ValidationException - Improperly formed request

Open sibijr opened this issue 1 year ago • 4 comments

Checks

Operating system

macOS 15.3.2 (24D81)

Expected behaviour

Amazon Q CLI should process the request and provide a response without validation errors.

Actual behaviour

Amazon Q is having trouble responding with error: 0: unhandled error (ValidationException) 1: service error 2: unhandled error (ValidationException) 3: Error { code: "ValidationException", message: "Improperly formed request.", aws_request_id: "a7eb39db-7f56-459a-a140-bed1f0fa0b02" }

Location: crates/q_cli/src/cli/chat/mod.rs:668

[chat-transcript]
> /tools

> explain this package

I'll need to examine the my package to provide you with a detailed explanation. Let me check the available files and structure first.
[Tool uses: fs_read]



Let me check the source code structure to better understand the package:
[Tool uses: fs_read]


[Tool uses: fs_read]

Amazon Q is having trouble responding right now: 
   0: unhandled error (ValidationException)
   1: service error
   2: unhandled error (ValidationException)
   3: Error { code: "ValidationException", message: "Improperly formed request.", aws_request_id: "a7eb39db-7f56-459a-a140-bed1f0fa0b02" }

Location:
   crates/q_cli/src/cli/chat/mod.rs:668

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.


> report_issue

I'll help you report an issue. To proceed with creating a GitHub issue, I need a title for the issue and optionally some details about what happened. Could you please provide:

1. A title for the GitHub issue
2. Optionally, describe the actual behavior you experienced
3. Optionally, describe the expected behavior
4. Optionally, provide steps to reproduce the issue

Once you provide this information, I can help you submit the issue report.
[Tool uses: none]

> Amazon Q is having trouble responding right now:> 
   0: unhandled error (ValidationException)> 
   1: service error> 
   2: unhandled error (ValidationException)> 
   3: Error { code: "ValidationException", message: "Improperly formed request.", aws_request_id: "a7eb39db-7f56-459a-a140-bed1f0fa0b02" }> 
> 
Location:> 
   crates/q_cli/src/cli/chat/mod.rs:668> 
> 
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.> 
Run with RUST_BACKTRACE=full to include source snippets.

I'll help you report this issue. Let me prepare the GitHub issue report for you.
[Tool uses: report_issue]

Steps to reproduce

Using q chat CLI command and attempting to explore a codebase with fs_read function calls.

Environment

<This will be visible to anyone. Do not include personal or sensitive information>

[q-details]
version = "1.7.3"
hash = "3e4ae79d371315e80ddac772b43fff2cba314104"
date = "2025-04-10T05:48:16.435186Z (12d ago)"
variant = "full"

[system-info]
os = "macOS 15.3.2 (24D81)"
chip = "Apple M1 Pro"
total-cores = 10
memory = "32.00 GB"

[environment]
cwd = "/Users/USER/workspace/Launcher/src/Launcher"
cli-path = "/Users/USER/workspace/Launcher/src/Launcher"
os = "Mac"
shell-path = "/Users/USER/.toolbox/tools/toolbox/1.1.1762.0/toolbox-exec"
shell-version = "5.9"
terminal = "iTerm 2"
install-method = "toolbox"

[env-vars]
PATH = "/Users/USER/.codeium/windsurf/bin:~/Library/Android/sdk/platform-tools:/Users/USER/.bin:/opt/homebrew/opt/node@16/bin:/Users/USER/.pyenv/shims:/Users/USER/.pyenv/bin:/opt/homebrew/opt/node@18/bin:/Users/USER/perl5/bin:/opt/homebrew/opt/node@14/bin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/Users/USER/.toolbox/bin:/Users/USER/.codeium/windsurf/bin:~/Library/Android/sdk/platform-tools:/Users/USER/.bin:/opt/homebrew/opt/node@16/bin:/Users/USER/.pyenv/bin:/Users/USER/.nvm/versions/node/v18.19.1/bin:/opt/homebrew/opt/node@18/bin:/Users/USER/miniconda3/bin:/Users/USER/miniconda3/condabin:/Users/USER/perl5/bin:/opt/homebrew/opt/node@14/bin:/opt/homebrew/opt/gnu-sed/libexec/gnubin:/Users/USER/.toolbox/bin:/Library/Frameworks/Python.framework/Versions/3.11/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Applications/iTerm.app/Contents/Resources/utilities:/Users/USER/.local/bin:/Users/USER/Library/Application Support/JetBrains/Toolbox/scripts:/Users/USER/.local/binexport:/Users/USER/workspace/SpyDevTools/src/SpyDevTools/bin:/Users/USER/Library/Android/sdk/platform-tools:/Users/USER/.local/binexport:/Users/USER/workspace/SpyDevTools/src/SpyDevTools/bin:/Users/USER/Library/Android/sdk/platform-tools:/Users/USER/.local/bin"
QTERM_SESSION_ID = "a8cca77ed1914d4fa17c6568c2b39116"
Q_SET_PARENT_CHECK = "1"
Q_TERM = "1.7.3"
SHELL = "/bin/zsh"
TERM = "xterm-256color"
__CFBundleIdentifier = "com.googlecode.iterm2"

[chat-settings]
interactive=true

[chat-trusted_tools]

[chat-failed_request_ids]
none

[chat-context]
current_profile=default
profiles=
default

global_context=
.amazonq/rules/**/*.md
README.md
AmazonQ.md

profile_context=none

files=
/Users/user/workspace/Launcher/src/Launcher/README.md, 273 B
total context size=273 B

sibijr avatar Apr 22 '25 09:04 sibijr

I'm having the same issue very often

Example errors that are happening:

Amazon Q is having trouble responding right now:
   0: unhandled error (ValidationException)
   1: service error
   2: unhandled error (ValidationException)
   3: Error { code: "ValidationException", message: "Improperly formed request.", aws_request_id: "ce322dff-50f2-4f65-8602-b405916bdd51" }

Location:
   crates/q_cli/src/cli/chat/mod.rs:668

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

chris-trag avatar Apr 22 '25 17:04 chris-trag

I'm having the same issue frequently today. Can you please help to fix it?

shashank-indukuri avatar Apr 22 '25 18:04 shashank-indukuri

The team is actively investigating.

mschrage avatar Apr 22 '25 19:04 mschrage

I'm facing with this problem, I've tried to isolate the issue and detected this can be happened with a few of mcp configurations in mcp.json. For instance, the error will be raised when I add this aws-msk-mcp-server I remove this one, the error won't be happened.

Image

ndndien avatar Aug 07 '25 04:08 ndndien