Error: Failed to verify Twitter login status
Solution:
- Verify credentials in
.env
- Check for rate limiting (wait 15 minutes)
- Clear cookies and retry:
rm -rf .cache/twitter-cookies
Twitter anti-automation check triggered (ACID challenge)
Important Note: The ACID challenge (Error Code 399) is part of Twitter's normal authentication flow and does not indicate a failure. This is expected behavior when using the agent-twitter-client implementation.
Solution:
-
No immediate action required - the system handles this automatically:
- Implements exponential backoff retry strategy
- Default 3 retry attempts with increasing delays
- Automatic session recovery after successful challenge
-
If persisting beyond 30 minutes:
# Check authentication logs tail -f logs/social.log | grep "ACID" # Verify retry configuration grep TWITTER_MAX_RETRIES .env
-
Adjust retry settings if needed:
TWITTER_MAX_RETRIES=5 # Increase retry attempts TWITTER_RETRY_DELAY=10000 # Increase delay between retries
Received "Suspicious login attempt detected" from Twitter
Important Note: This is normal and expected behavior when using the agent-twitter-client implementation. A successful login may trigger Twitter's suspicious login notification system.
Solution:
-
No action required - this indicates successful authentication
-
System will proceed with normal operation
-
Monitor logs for actual authentication status:
tail -f logs/social.log | grep "authentication"
-
If concerned, verify session status:
pnpm run check:twitter-session
Error: Too many requests
Solution:
- Check current limits:
grep "rate limit" logs/social.log
- Wait 15 minutes before retrying
- Adjust intervals in
.env
:CONTENT_GENERATION_INTERVAL=300000 MARKET_MONITORING_INTERVAL=60000
Enable mock mode for development and testing:
TWITTER_MOCK_MODE=true # Enable Twitter mock mode
MOCK_MARKET_DATA=true # Enable market data mocking
Use Cases:
- Development without Twitter credentials
- Testing content generation
- CI/CD environments
- Rate limit avoidance during testing
Verification:
-
Check mock mode status:
grep "Running in mock mode" logs/social.log
-
Verify mock tweets:
tail -f logs/mock_tweets.log
-
Test content generation:
pnpm test src/services/social/__tests__/
Important Notes:
- Mock mode simulates all Twitter operations
- Tweets are logged but not posted
- Rate limits are not enforced
- Perfect for development and testing
Error: NOAUTH Authentication required
Solution:
- Verify Redis is running:
sudo systemctl status redis-server
- Check Redis credentials in
.env
:REDIS_HOST=127.0.0.1 REDIS_PORT=6379 REDIS_PASSWORD=your_password
- Test connection:
redis-cli -a your_password ping
Error: connect ECONNREFUSED 127.0.0.1:5432
Solution:
- Check PostgreSQL service:
sudo systemctl status postgresql
- Verify database exists:
sudo -u postgres psql -c '\l' | grep meme_agent_db
- Test connection:
psql -h localhost -U meme_agent_user -d meme_agent_db -c '\conninfo'
# Check service status
sudo systemctl status redis-server postgresql
# View logs
tail -f logs/social.log
tail -f logs/app.log
# Test database connections
redis-cli -a $REDIS_PASSWORD ping
psql -h localhost -U $POSTGRES_USER -d $POSTGRES_DB -c '\conninfo'
# Run specific tests
pnpm test src/services/social/auth/__tests__/twitterAuth.test.ts