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

Get this error message: Make sure your computer's time and time zone are both correct. #25751

Closed
alice-zheyan-yu opened this issue Mar 10, 2023 · 1 comment
Assignees
Labels
Account az login/account Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Milestone

Comments

@alice-zheyan-yu
Copy link

I run$ az login
Then get this error message:

A web browser has been opened at https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize. Please continue the login in the web browser. If no web browser is available or if the web browser fails to open, use device code flow with `az login --use-device-code`.
tcgetpgrp failed: Not a tty
The command failed with an unexpected error. Here is the traceback:
0. The ID token is not yet valid. Make sure your computer's time and time zone are both correct. Current epoch = 1678423593.  The id_token was: {
  "aud": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
  "iss": "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/v2.0",
  "iat": 1678472291,
  "nbf": 1678472291,
  "exp": 1678476191,
  "aio": "AXQAi/8TAAAAG65XML0ExITQDXAaTmz73ZjVI8sBHAqgOrAWwV0PRyJ6KFH++VGPjNK4+AjQHYinUjvgT7V1drWdHsGPeVDdoFUKg8FQDE+cSMu/zT/rokniD47R1ugIZHWvocXryYOemMLD18pR+/P6jFEcsIIkHA==",
  "name": "Alice Yu",
  "nonce": "31342b0793cd76fe0944d0102fcd16aed3ee6003c82389a1cb7e800779c219cb",
  "oid": "cbbbd2af-5675-4465-95e2-c2c442384d2a",
  "preferred_username": "[email protected]",
  "puid": "100320020B13ACF1",
  "rh": "0.AQEAv4j5cvGGr0GRqy180BHbR5V3sATbjRpGu-4C-eG_e0YaAN0.",
  "sub": "i8xzXuSuxY5-4Ipjpw7hIeDjYNjDbsnkSjh9RlA0cdI",
  "tid": "72f988bf-86f1-41af-91ab-2d7cd011db47",
  "uti": "FOd9uW8MbUOs2hgi0Y2TAA",
  "ver": "2.0"
}
Traceback (most recent call last):
  File "/opt/az/lib/python3.10/site-packages/knack/cli.py", line 233, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 663, in execute
    raise ex
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 726, in _run_jobs_serially
    results.append(self._run_job(expanded_arg, cmd_copy))
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 697, in _run_job
    result = cmd_copy(params)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/__init__.py", line 333, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/commands/command_operation.py", line 121, in handler
    return op(**command_args)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/command_modules/profile/custom.py", line 139, in login
    subscriptions = profile.login(
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/_profile.py", line 154, in login
    user_identity = identity.login_with_auth_code(scopes=scopes, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/azure/cli/core/auth/identity.py", line 142, in login_with_auth_code
    result = self._msal_app.acquire_token_interactive(
  File "/opt/az/lib/python3.10/site-packages/msal/application.py", line 1608, in acquire_token_interactive
    response = _clean_up(self.client.obtain_token_by_browser(
  File "/opt/az/lib/python3.10/site-packages/msal/oauth2cli/oidc.py", line 281, in obtain_token_by_browser
    return super(Client, self).obtain_token_by_browser(
  File "/opt/az/lib/python3.10/site-packages/msal/oauth2cli/oauth2.py", line 640, in obtain_token_by_browser
    return self._obtain_token_by_browser(
  File "/opt/az/lib/python3.10/site-packages/msal/oauth2cli/oauth2.py", line 678, in _obtain_token_by_browser
    return self.obtain_token_by_auth_code_flow(
  File "/opt/az/lib/python3.10/site-packages/msal/application.py", line 138, in obtain_token_by_auth_code_flow
    return super(_ClientWithCcsRoutingInfo, self).obtain_token_by_auth_code_flow(
  File "/opt/az/lib/python3.10/site-packages/msal/oauth2cli/oidc.py", line 205, in obtain_token_by_auth_code_flow
    result = super(Client, self).obtain_token_by_auth_code_flow(
  File "/opt/az/lib/python3.10/site-packages/msal/oauth2cli/oauth2.py", line 548, in obtain_token_by_auth_code_flow
    return self._obtain_token_by_authorization_code(
  File "/opt/az/lib/python3.10/site-packages/msal/oauth2cli/oauth2.py", line 732, in _obtain_token_by_authorization_code
    return self._obtain_token("authorization_code", data=data, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/msal/oauth2cli/oidc.py", line 116, in _obtain_token
    ret = super(Client, self)._obtain_token(grant_type, *args, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/msal/oauth2cli/oauth2.py", line 789, in _obtain_token
    (on_obtaining_tokens or self.on_obtaining_tokens)({
  File "/opt/az/lib/python3.10/site-packages/msal/application.py", line 599, in <lambda>
    on_obtaining_tokens=lambda event: self.token_cache.add(dict(
  File "/opt/az/lib/python3.10/site-packages/msal/token_cache.py", line 310, in add
    super(SerializableTokenCache, self).add(event, **kwargs)
  File "/opt/az/lib/python3.10/site-packages/msal/token_cache.py", line 113, in add
    return self.__add(event, now=now)
  File "/opt/az/lib/python3.10/site-packages/msal/token_cache.py", line 153, in __add
    decode_id_token(id_token, client_id=event["client_id"])
  File "/opt/az/lib/python3.10/site-packages/msal/oauth2cli/oidc.py", line 77, in decode_id_token
    raise RuntimeError("%s Current epoch = %s.  The id_token was: %s" % (
RuntimeError: 0. The ID token is not yet valid. Make sure your computer's time and time zone are both correct. Current epoch = 1678423593.  The id_token was: {
  "aud": "04b07795-8ddb-461a-bbee-02f9e1bf7b46",
  "iss": "https://login.microsoftonline.com/72f988bf-86f1-41af-91ab-2d7cd011db47/v2.0",
  "iat": 1678472291,
  "nbf": 1678472291,
  "exp": 1678476191,
  "aio": "AXQAi/8TAAAAG65XML0ExITQDXAaTmz73ZjVI8sBHAqgOrAWwV0PRyJ6KFH++VGPjNK4+AjQHYinUjvgT7V1drWdHsGPeVDdoFUKg8FQDE+cSMu/zT/rokniD47R1ugIZHWvocXryYOemMLD18pR+/P6jFEcsIIkHA==",
  "name": "Alice Yu",
  "nonce": "31342b0793cd76fe0944d0102fcd16aed3ee6003c82389a1cb7e800779c219cb",
  "oid": "cbbbd2af-5675-4465-95e2-c2c442384d2a",
  "preferred_username": "[email protected]",
  "puid": "100320020B13ACF1",
  "rh": "0.AQEAv4j5cvGGr0GRqy180BHbR5V3sATbjRpGu-4C-eG_e0YaAN0.",
  "sub": "i8xzXuSuxY5-4Ipjpw7hIeDjYNjDbsnkSjh9RlA0cdI",
  "tid": "72f988bf-86f1-41af-91ab-2d7cd011db47",
  "uti": "FOd9uW8MbUOs2hgi0Y2TAA",
  "ver": "2.0"
}
To open an issue, please run: 'az feedback'

I checked my computer's time zone. Everything seems to be correct.

@ghost ghost added customer-reported Issues that are reported by GitHub users external to the Azure organization. Auto-Assign Auto assign by bot Account az login/account labels Mar 10, 2023
@ghost ghost assigned jiasli Mar 10, 2023
@ghost ghost added this to the Backlog milestone Mar 10, 2023
@yonzhan
Copy link
Collaborator

yonzhan commented Mar 11, 2023

Duplicate of #20388

@yonzhan yonzhan marked this as a duplicate of #20388 Mar 11, 2023
@yonzhan yonzhan closed this as completed Mar 11, 2023
@yonzhan yonzhan added Azure CLI Team The command of the issue is owned by Azure CLI team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Account az login/account Auto-Assign Auto assign by bot Azure CLI Team The command of the issue is owned by Azure CLI team customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Projects
None yet
Development

No branches or pull requests

3 participants