AWS CodeWhisperer error Invalid client provided

2

Hi All,

I am using the VSCode and have installed the AWS CodeWhisperer inside that. When it is authenticating after the code, I get the error Invalid client provided. Please help me to solve the issue.

Below is the reference log: 2023-08-23 09:01:17 [WARN]: AwsContext: no default region in credentials profile, falling back to us-east-1: 2023-08-23 09:01:17 [WARN]: CloudFormationTemplateRegistry: addWatchPattern(**/*.{yaml,yml}): no workspace 2023-08-23 09:06:18 [INFO]: telemetry: sent batch (size=5) 2023-08-23 09:11:19 [INFO]: telemetry: sent batch (size=5) 2023-08-23 09:16:20 [INFO]: telemetry: sent batch (size=2) 2023-08-23 09:21:20 [INFO]: telemetry: sent batch (size=11) 2023-08-23 09:30:18 [ERROR]: aws.codeWhisperer.reconnect: Error: Unable to authenticate connection -> Error: Timed-out waiting for browser login flow to complete [TimedOut] 2023-08-23 09:31:21 [INFO]: telemetry: sent batch (size=1) 2023-08-23 09:46:21 [INFO]: telemetry: sent batch (size=10) 2023-08-23 09:53:35 [ERROR]: _aws.auth.reauthenticate: Error: Unable to authenticate connection -> Error: Timed-out waiting for browser login flow to complete [TimedOut]

asked a year ago981 views
5 Answers
5
Accepted Answer

Hi there.

Please try deleting the cache at "~/.aws/sso/cache" by running the following command, and then authenticate again.

rm -rf ~/.aws/sso/cache

I hope this helps.

profile pictureAWS
EXPERT
answered 10 months ago
profile picture
EXPERT
reviewed 18 days ago
  • I am still facing the same error.

2

Try deleting the cache at ~/.aws/sso/cache by running the following command:

rm -rf ~/.aws/sso/cache

And re-authenticate to see if it resolves the issue.

AWS
answered 10 months ago
1

Same issue

2023-08-28 13:43:51 [INFO]: log level: info
2023-08-28 13:43:51 [INFO]: endpoints: retrieving AWS endpoints data
2023-08-28 13:43:51 [INFO]: OS: Windows_NT x64 10.0.22621
2023-08-28 13:43:51 [INFO]: Visual Studio Code extension host:  1.81.1
2023-08-28 13:43:51 [INFO]: AWS Toolkit:  1.86.0
2023-08-28 13:43:51 [INFO]: node: 16.17.1
2023-08-28 13:43:51 [INFO]: electron: 22.3.18
2023-08-28 13:48:52 [INFO]: telemetry: sent batch (size=10)
2023-08-28 13:53:52 [INFO]: telemetry: sent batch (size=4)
2023-08-28 13:58:12 [ERROR]: API response (oidc.us-east-1.amazonaws.com /token): {
  errno: -4039,
  code: 'ETIMEDOUT',
  syscall: 'connect',
  address: '18.208.39.217',
  port: 443,
  name: 'TimeoutError'
}
2023-08-28 13:58:13 [ERROR]: API response (oidc.us-east-1.amazonaws.com /token): {
  errno: -3008,
  code: 'ENOTFOUND',
  syscall: 'getaddrinfo',
  hostname: 'oidc.us-east-1.amazonaws.com'
}
2023-08-28 13:58:13 [ERROR]: _aws.auth.reauthenticate: Error: Unable to authenticate connection
	 -> Error: getaddrinfo ENOTFOUND oidc.us-east-1.amazonaws.com [ENOTFOUND]
2023-08-28 13:58:52 [ERROR]: Batch error: UnknownEndpoint: Inaccessible host: `client-telemetry.us-east-1.amazonaws.com' at port `undefined'. This service may not be available in the `us-east-1' region.
2023-08-28 14:03:39 [INFO]: selected AWS ID sign in
2023-08-28 14:03:53 [INFO]: telemetry: sent batch (size=18)

Enter image description here

pyc
answered a year ago
1

Any solution to this? I have the exact same issue while trying to authenticate code whisper. After entering my aws builder id/pass, it redirects to page saying the following

invalid_client Invalid client provided.

answered 10 months ago
1

Had the same problem, the proposed fix worked a charm. Remember to use "rd -r" in Powershell on Windows systems instead of rm -rf.

answered 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions