Troubleshooting Guide
Common Issues
1. "Login timeout" or QR Code not appearing
- Cause: Network issues or Douyin's anti-bot protection blocking the login page.
- Solution:
- Ensure the server IP is not blacklisted.
- Try logging in manually via CLI with
HEADLESS=falseto see what's happening. - Check if
playwright-stealthis active.
2. "Selector not found" errors
- Cause: Douyin updated their DOM structure.
- Solution:
- Check
platforms/douyin/selectors.pyand update the CSS/XPath selectors. - Use Playwright's Inspector (
PWDEBUG=1) to debug the page structure.
- Check
3. Video Upload Fails
- Cause: File format issues, network timeout, or element interaction failure.
- Solution:
- Verify the video file exists and is a supported format (MP4).
- Increase the timeout settings in
publisher.py. - Check logs for "File chooser triggered" messages.
4. "Browser closed unexpectedly"
- Cause: Resource exhaustion (RAM/CPU) or browser crash.
- Solution:
- Ensure the Docker container has enough memory (at least 2GB recommended).
- Use
--shm-size=1gbor more when running Docker.
Debugging
Enable Headed Mode
To see the browser interaction in real-time (on a local machine):
bash
export HEADLESS=false
./start.sh cli ...Check Logs
Logs are output to stdout/stderr and captured by the logger.
- Social Publisher Logs: Check the console output or
logs/directory if configured. - Playwright Traces: Can be enabled in code to record execution traces for playback.