Skip to content

v0.2.7 - Plex Connection Fix

Choose a tag to compare

@izzoa izzoa released this 07 Nov 23:42
· 82 commits to master since this release

Bug Fixes

Plex Connection Issues

Fixed 400 Bad Request errors that occurred when connecting to Plex servers. This issue commonly affected users when:

  • Plex tokens had extra whitespace (from copy-paste)
  • Server required HTTPS connections
  • Token formatting was incorrect

New Features

Connection Testing Command

  • plexmix config test - Diagnose Plex server connection problems
    • Shows server URL and token details
    • Tests connection and library access
    • Provides troubleshooting guidance

Improvements

Enhanced Error Handling

  • Auto-strip whitespace from Plex tokens
  • Specific BadRequest exception handling
  • Detailed error messages with root cause explanations
  • Show token length and server URL in diagnostics

Better User Experience

  • Improved error messages in config init with step-by-step troubleshooting
  • Clear guidance on http vs https requirements
  • Common server URL examples provided
  • Helpful tips displayed on connection failure

Commands

# Test your Plex connection
plexmix config test

# Re-run setup with improved error handling
plexmix config init

Troubleshooting 400 Bad Request Errors

If you previously encountered connection issues:

  1. Try again - Whitespace is now automatically stripped from tokens
  2. Use HTTPS - Try https:// instead of http:// for your server URL
  3. Test connection - Run plexmix config test to diagnose
  4. Verify token - Ensure no extra characters when copying from Plex
  5. Check port - Default is 32400, verify your server uses this

Documentation

  • Added troubleshooting section to README for connection issues
  • Documented common Plex server URL formats (http://localhost:32400, https://server:32400, etc.)
  • Added guidance for diagnosing connection problems

Files Changed

  • src/plexmix/plex/client.py - Enhanced connection handling and error messages
  • src/plexmix/cli/main.py - Added config test command, improved init error messages
  • README.md - Added troubleshooting guide for Plex connections

Testing

All 91 tests passing ✅