Authentication Issues
No Twitter cookies found
No Twitter cookies found
Cookie expired or invalid (HTTP 401/403)
Cookie expired or invalid (HTTP 401/403)
browser-cookie3 not installed
browser-cookie3 not installed
API Errors
Twitter API error 404
Twitter API error 404
Error message:Cause:
- Twitter/X has rotated their GraphQL query IDs (this happens periodically)
- The hardcoded fallback query IDs in the CLI are outdated
- Fetching live query IDs from Twitter’s JavaScript bundles
- Falling back to community-maintained query IDs from GitHub
- Simply retry the command — the CLI will use the refreshed query ID
- The fix is automatic; no manual intervention needed
- Check if Twitter/X is experiencing an outage
- Update to the latest version:
uv tool install --upgrade twitter-cli
twitter_cli/client.py:629-646Rate limited (HTTP 429)
Rate limited (HTTP 429)
Error message:orCause:
- Twitter has rate-limited your IP or account
- Too many requests in a short time period
- Write operations (like, retweet, bookmark) have daily/hourly limits
- Wait: The CLI automatically retries with exponential backoff
- For write operations: Wait at least 15-30 minutes before retrying
- Reduce request volume:
- Increase delays in config.yaml:
- Use a proxy to distribute requests:
twitter_cli/client.py:747-826Twitter API returned invalid JSON
Twitter API returned invalid JSON
Error message:Cause:
- Twitter returned an error page or non-JSON response
- Network interruption or proxy interference
- Check your internet connection
- If using a proxy, verify it’s working correctly
- Retry the command
- Check Twitter/X status at https://status.twitterstat.us/
twitter_cli/client.py:786-789Data Issues
Invalid tweet JSON file
Invalid tweet JSON file
Error message:Cause:
- The JSON file passed to
--inputis corrupted or in the wrong format - File was manually edited incorrectly
- Regenerate the JSON file:
- Verify JSON syntax:
- Don’t manually edit exported JSON files unless you’re familiar with the schema
twitter_cli/cli.py:65-77User not found
User not found
Error message:Cause:
- The username doesn’t exist
- The account has been suspended or deleted
- The account is private and you don’t have access
- Verify the username spelling
- Check if the account exists by visiting
https://x.com/username - For private accounts, ensure you follow them from your logged-in account
twitter_cli/client.py:339-380Configuration Issues
--max must be greater than 0
--max must be greater than 0
Error message:Cause:
You passed Reference:
--max 0 or a negative numberSolution:twitter_cli/cli.py:93-100Config file not loading
Config file not loading
Symptom:
Your
config.yaml settings are being ignoredSolution:-
Verify file location — the CLI looks for:
./config.yaml(current directory)<project-root>/config.yaml
-
Check YAML syntax:
-
Example valid config:
twitter_cli/config.py:41-67Connection Issues
Proxy not working
Proxy not working
Symptom:
Requests timeout or fail when
TWITTER_PROXY is setSolution:-
Verify proxy URL format:
-
Test proxy connectivity:
- Verify proxy supports HTTPS
twitter_cli/client.py:122-138SSL/TLS errors
SSL/TLS errors
Error:
SSL certificate verification fails or TLS handshake errorsCause:
- Corporate proxy with SSL inspection
- Outdated system certificates
- Antivirus/firewall interference
-
If behind a corporate proxy, configure it properly:
-
Update system certificates (Linux):
-
Update curl_cffi:
twitter_cli/client.py:122-148Performance Issues
Slow startup time
Slow startup time
Symptom:
CLI takes 5-10 seconds to start before showing resultsCause:
The CLI initializes by:
- Fetching x.com homepage to extract anti-detection headers
- Scanning JavaScript bundles for live query IDs
- Extracting browser cookies
- Don’t run the CLI too frequently (cookies are cached for 24h)
- Use
--inputto reprocess previously fetched JSON instead of re-fetching
twitter_cli/client.py:648-681Best Practices to Avoid Issues
-
Use a proxy to avoid IP-based rate limiting:
-
Keep request volumes low:
- Don’t run too frequently — each run fetches x.com to initialize headers
- Use browser cookie extraction for full browser fingerprint instead of manual tokens
- Avoid datacenter IPs — residential proxies are much safer
-
Update regularly:
Getting Help
If you encounter an issue not covered here:-
Enable debug logging:
- Check the logs in the error output for specific file/line references
- Report issues at: https://github.com/jackwener/twitter-cli/issues
- The full error message
- Command you ran
- OS and Python version
- Whether you’re using a proxy
