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

Twitter Authentication Fails on AWS EC2 Instance (Error 399) #2372

Closed
jeongtai opened this issue Jan 16, 2025 · 4 comments
Closed

Twitter Authentication Fails on AWS EC2 Instance (Error 399) #2372

jeongtai opened this issue Jan 16, 2025 · 4 comments

Comments

@jeongtai
Copy link

'm experiencing an issue with Twitter authentication when running Eliza OS on an AWS EC2 instance. While the application works fine locally, it fails to authenticate on EC2 with the following errors:

["◎ Waiting for Twitter login"]
["⛔ Login attempt failed: {"errors":[{"code":399,"message":"Incorrect. Please try again. g;173702389163775059:-1737023891718:RCxMpaDzkjFs0VKtNQFAmmAH:8"}]}"]
["⛔ Failed to login to Twitter. Retrying... (4 attempts left)"]
["⛔ Login attempt failed: Authentication error: DenyLoginSubtask"]
["⛔ Failed to login to Twitter. Retrying... (3 attempts left)"]
["⛔ Login attempt failed: Authentication error: DenyLoginSubtask"]
["⛔ Failed to login to Twitter. Retrying... (2 attempts left)"]

The application keeps retrying but fails each time with either Error 399 or DenyLoginSubtask.

Steps to reproduce:
Deploy Eliza OS on an AWS EC2 instance
Attempt to log in to Twitter through the application

Expected behavior:
Successful Twitter authentication and login
Actual behavior:
Repeated authentication failures with Error 399 and DenyLoginSubtask errors

Additional context:
The application works correctly on my local machine
This issue seems specific to the AWS EC2 environment
Any assistance in resolving this authentication problem would be greatly appreciated.

@jeongtai jeongtai added the bug Something isn't working label Jan 16, 2025
Copy link
Contributor

Hello @jeongtai! Welcome to the elizaOS community. Thank you for opening your first issue; we appreciate your contribution. You are now an elizaOS contributor!

@JoeyKhd
Copy link
Member

JoeyKhd commented Jan 16, 2025

@jeongtai

refer to: #2225

@AIFlowML
Copy link
Collaborator

Hello @jeongtai I copy a solution for you.

what u need to do is:
1/ go to the agent's twitter -> settings -> security and account access -> security -> two-factor authentication
2/ enable Authentication App
3/ click the button under the QR code to view it as string (it's 16 uppercase letters and numbers) - this is your 2FA SECRET
4/ complete the 2fa setup with an app like google authenticator
5/ add the 2fa secret to your .env file like this:
TWITTER_2FA_SECRET="YOUR_SECRET_CODE"

but you should also try to manual login from the server to point your location there for the TOS.

@AIFlowML AIFlowML added Need Feedback and removed bug Something isn't working labels Jan 16, 2025
@jeongtai
Copy link
Author

@AIFlowML Thanks to you. I resolved the issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants