Skip to content

04. Troubleshooting

engels74 edited this page Oct 13, 2024 · 3 revisions

πŸ”§ Troubleshooting Guide

This guide aims to help you resolve common issues you might encounter while using the Custom Format Sync tool.

🚫 Sync Process Fails

Issue: Unable to Connect to Radarr/Sonarr Instance

Symptoms:

  • Error messages in the GitHub Actions log mentioning connection timeouts or inability to reach the server.

Possible Solutions:

  1. Check that the URL in your GitHub Secret is correct and includes the protocol (http:// or https://).
  2. Ensure your Radarr/Sonarr instance is accessible from the internet, or use a reverse proxy.
  3. Check your firewall settings to ensure it's not blocking incoming connections.

Issue: API Key Authentication Failure

Symptoms:

  • Error messages in the GitHub Actions log mentioning "Unauthorized" or "Invalid API Key".

Possible Solutions:

  1. Double-check that the API key in your GitHub Secret is correct and up-to-date.
  2. Regenerate the API key in Radarr/Sonarr and update the GitHub Secret.

πŸ”„ Custom Formats Not Updating

Issue: Version Not Incrementing

Symptoms:

  • Changes to custom formats are not being synced to your instances.

Possible Solutions:

  1. Ensure you've incremented the cfSync_version in your custom format JSON file.
  2. Check that you've committed and pushed the changes to the main branch.

Issue: Instance Not Targeted

Symptoms:

  • Changes are not appearing on a specific instance.

Possible Solutions:

  1. Check the cfSync_instances field in your custom format JSON to ensure the instance is included.
  2. Verify that cfSync_radarr or cfSync_sonarr is set to true if you're not using cfSync_instances.

πŸ“‹ GitHub Actions Workflow Issues

Issue: Workflow Not Triggering

Symptoms:

  • The sync process is not running automatically when you push changes.

Possible Solutions:

  1. Check that your changes are being pushed to the main branch.
  2. Ensure you're modifying files within the custom_formats/ directory.
  3. Verify that GitHub Actions is enabled for your repository.

Issue: Workflow Fails Due to Permissions

Symptoms:

  • Error messages in GitHub Actions about lacking permissions to update files.

Possible Solution:

  1. Go to your repository's Settings > Actions > General.
  2. Under "Workflow permissions", select "Read and write permissions".

πŸ–₯️ Local Development Issues

Issue: Dependencies Not Installing

Symptoms:

  • Error messages when trying to run the script locally.

Possible Solution:

  1. Ensure you've installed the required dependencies:
    pip install -r requirements.txt
    

Issue: Environment Variables Not Set

Symptoms:

  • Script fails to run locally due to missing configuration.

Possible Solution:

  1. Create a .env file in your project root with your Radarr/Sonarr URLs and API keys:
    RADARR_001_URL=https://radarr.example.com
    RADARR_001_API_KEY=your_api_key_here
    
  2. Use a package like python-dotenv to load these variables in your local environment.

πŸ†˜ Still Having Issues?

If you're still experiencing problems after trying these solutions:

  1. Check the full logs in GitHub Actions for more detailed error messages.
  2. Search for similar issues in the GitHub Issues section of the repository.
  3. If you can't find a solution, open a new issue with a detailed description of your problem, including:
    • The specific error message
    • The custom format you're trying to sync
    • Your workflow file contents (with sensitive information redacted)
    • Any relevant logs

Remember, when sharing logs or configuration, always remove sensitive information like API keys and URLs.