Session timeout (?) leads to a dead end and "An unexpected error occurred, please retry"
Before opening, please confirm:
- [x] I have searched for duplicate or closed issues
Operating System
linux
Kiro Version
0.10.32
Bug Description
It appears my session has timed out. I've tried closing open chats and opening a new one, but when I type 'do I need to login?', I keep getting "An unexpected error occurred, please retry".
Retrying isn't working, so this needs a better error message, and preferably, the ability to recognize when a session is expired and walk the user through refreshing/re-authenticating.
Steps to Reproduce
- Use Kiro successfully for multiple projects
- Be away from the session for several hours
- Come back to Kiro IDE and try to resume working in an existing or new chat session.
- Get chat error "An unexpected error occurred, please retry"
Expected Behavior
- Come back to Kiro IDE and try to resume working in an existing or new chat session.
- If my authentication session has timed out, the message I see should specify that, instead of providing a generic message with instructions (to "retry"), that do Not help.
- If my authentication session has timed out, I should be prompted to re-authenticate. I should Not feel stuck, and like my only option is to close the IDE and re-open it.
Conversation ID
88beca44-9942-4776-9dfe-c266f1930526 88beca44-9942-4776-9dfe-c266f1930526 88beca44-9942-4776-9dfe-c266f1930526 83350f48-9af8-4975-bfe1-68e7de7d77c7 1533fc31-67db-45cd-b155-2a9167019eb6
Additional Context
The error message is the same as #6114, but the steps to get to the error message are distinct. The error message is the same as #5369, but the cause and fix are different.
🤖 Potential Duplicate Detected
This issue appears to be similar to:
- #5810: Streamline re-authentication flow when login tokens expire for Enterprise IAM Identity Center customers. (85% similar)
- #5369: An unexpected error occurred (85% similar)
- #4865: Can't Chat With Kiro - the chat session area goes grey every 5 mins (85% similar)
- #4681: can't login kiro (85% similar)
What happens next?
- ⏰ This issue will be automatically closed in 3 days
- 🏷️ If this is not a duplicate, you can prevent automatic closure by adding a comment or reacting with 👎 to this message.
- 💬 Comment on the original issue if you have additional information
Why is this marked as duplicate? Both issues deal with authentication/login token expiration problems and the need for better re-authentication flows, though #5810 is specifically about Enterprise IAM Identity Center while the new issue is more general
I just tried the Developer: Reload option from the Command Palette, and it brought me back to the KIRO splash screen with the "Sign in" button. This seems to confirm the earlier suspicion that the error messages are due to session timeout.
Thank you for your feedback! 🙏
The duplicate label has been removed and this issue has been sent back for maintainer review.
A maintainer will review this issue shortly.
I have encountered this same problem.
Bug
System becomes unusable with obtuse errors when SSO session expires. Long task sets will never complete without intervention, all tasks in flight ceasse, and all future attempts to continue or start conversations end with An unexpected error occurred, please retry.
Steps to repdroduce
- Log in to Kiro through an organisation's start page that uses SSO (We are using KeyCloak)
- Use the IDE until SSO session expires
- Note that all agents in flight stop, and any attempt to start or continue conversations end with an obtuse and unhelpful error.
Expected behaviour
The ideal behaviour would be that the IDE's validity isn't bound up with the SSO token length. If not possible, the system should advise that token has expired and take back to AWS start page to log in again.
Additional context
This same error occurs with SSO sessions on the CLI, except the error is slightly more informative, but harder to work around as you need to kill off the whole session to log in again.
Kiro is having trouble responding right now:
0: Failed to send the request: An unknown error occurred: dispatch failure
1: An unknown error occurred: dispatch failure
2: dispatch failure (other): No token
3: dispatch failure
4: other
5: No token
Location:
crates/chat-cli/src/cli/chat/mod.rs:1522
Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
I can confirm, I am facing same error, workaround of shutting down and starting again prompts for login.
Too much hassle for simple stuff
Thank you for your feedback! 🙏
The duplicate label has been removed and this issue has been sent back for maintainer review.
A maintainer will review this issue shortly.
It appears this issue is still "pending-maintainer-response" since "3 weeks ago". @AnilMaktala You appear to be the most recently active contributor/maintainer. Is there someone you could ping to look at this and the linked, related issues, to determine what the best way to improve the session expiration experience?
Who is looking into this ?
Hey @bcdady, Thank you for reporting this. We were unable to replicate this issue on our end. Could you please provide the Kiro logs when this occurs? This will help us investigate further. If you are no longer experiencing this issue on the latest version (0.11.133), please let us know and we can close this.
This issue has been automatically closed due to inactivity. It has been 7 days since we requested additional information.
If you still need help with this issue, please feel free to reopen it or create a new issue with the requested details.