Fix: Jellyfin API Issue On Unraid - Can't Add Media
Are you experiencing issues with the Jellyfin API on your Unraid server, specifically the frustrating problem of not being able to populate your media list? You're not alone! This article dives into a bug report detailing this very issue and provides a comprehensive overview, potential causes, and troubleshooting steps. If you're struggling to add media to your Jellyfin server on Unraid, keep reading to understand the problem and explore possible solutions.
Understanding the Issue: The Bug Report
This article is based on a bug report submitted by a user experiencing difficulties with the Jellyfin API on Unraid. The user, like many others, found that after adding their Jellyfin server, the "Add Media" function failed to populate, leaving them unable to add their desired content. Let's break down the key aspects of the bug report to gain a clearer understanding of the problem.
Key Details from the Bug Report
- Problem: Unable to populate the media list after adding a Jellyfin server in Tunarr.
- Environment:
- Jellyfin Server version 10.11.2
- Tunarr version 0.22.15
- Unraid server
- Observed Behavior: The window does not populate with the list from Jellyfin.
- Expected Behavior: The window should display a list of shows and media from the Jellyfin server.
- Error Logs: The logs indicate a potential issue with API client response, schema parsing, and user library retrieval. We'll delve deeper into these errors later in the article.
The Significance of the Bug Report
Bug reports like these are crucial for the continuous improvement of software like Jellyfin and Tunarr. They provide developers with valuable insights into the issues users are facing, allowing them to identify and address problems effectively. By understanding the details of this bug report, we can better grasp the scope of the issue and explore potential solutions.
Deep Dive into the Error Logs
To effectively troubleshoot this Jellyfin API issue, it's essential to analyze the error logs provided in the bug report. These logs act like breadcrumbs, leading us to the root cause of the problem. Let's dissect the relevant log snippets and understand what they're telling us.
API Client Response Error
2025-11-18T14:50:13.970Z [warn]: API client response error: path: '/Users/Me', status 400, params: {"userId":null}, data: {"type":"https://tools.ietf.org/html/rfc9110#section-15.5.1","title":"Bad Request","status":400,"traceId":"00-91eed9efb9adcc7452997a158a826b0f-42c568d5858bcd05-00"}, headers: {"content-type":"application/json; charset=utf-8","date":"Tue, 18 Nov 2025 20:50:13 GMT","server":"Kestrel","transfer-encoding":"chunked","vary":"Accept-Encoding","x-response-time-ms":"1.6538"} {"serverName":"unknown"}
This log entry indicates an issue with the API client's response. Specifically, it highlights a "Bad Request" error (status 400) when accessing the path '/Users/Me'. The userId parameter is null, which could be a contributing factor. This suggests a potential problem with user authentication or authorization within the Jellyfin API.
Schema Parsing Error
2025-11-18T14:50:35.038Z [error]: Unable to parse schema from response. Path: /Library/VirtualFolders
✖ Invalid input: expected string, received undefined
→ at [5].ItemId
✖ Invalid input: expected object, received undefined
→ at [5].LibraryOptions {"serverName":"unknown"}
This error message points to a failure in parsing the schema from the API response when accessing '/Library/VirtualFolders'. The error indicates that the system expected a string for ItemId and an object for LibraryOptions but received undefined values instead. This suggests a mismatch between the expected data structure and the actual data being returned by the Jellyfin API.
User Libraries Error
2025-11-18T14:50:35.039Z [error]: /api/jellyfin/:mediaSourceId/user_libraries
err: {
"type": "Error",
"message": "",
"stack":
Error
at /snapshot/dist/bundle.cjs:1279:54799
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
}
This error log indicates a general error when trying to access the user libraries via the API endpoint /api/jellyfin/:mediaSourceId/user_libraries. The message is empty, but the stack trace suggests an issue during the process of retrieving user libraries. This could be related to the previous schema parsing error or a separate problem altogether.
Connecting the Dots
By examining these error logs, we can start to form a hypothesis about the root cause of the issue. The API client error, the schema parsing error, and the user libraries error all seem interconnected. It's possible that an authentication issue (indicated by the null userId) is preventing the API from correctly accessing user data, leading to the schema parsing failure and the inability to retrieve user libraries. Understanding these errors is the first step towards finding a solution.
Potential Causes and Troubleshooting Steps
Now that we've analyzed the error logs and have a better understanding of the problem, let's explore some potential causes and corresponding troubleshooting steps. Addressing this Jellyfin API issue on Unraid requires a systematic approach, so we'll break down the process into manageable steps.
1. Authentication and User Permissions
As the error logs suggest a potential issue with the userId being null, the first area to investigate is authentication and user permissions within Jellyfin.
- Verify User Credentials: Double-check that the credentials you're using to connect Tunarr to Jellyfin are correct. Ensure the username and password are accurate.
- Check User Permissions: Confirm that the user account you're using has the necessary permissions to access the Jellyfin libraries. The user should have read access to the libraries you want to add to Tunarr.
- API Key (if applicable): If you're using an API key for authentication, ensure the key is valid and has the appropriate permissions.
2. Network Connectivity
Network connectivity issues can also prevent Tunarr from accessing the Jellyfin API. Ensure that your Unraid server and the device running Tunarr can communicate with each other.
- Firewall: Check your firewall settings on both the Unraid server and the device running Tunarr to ensure that there are no rules blocking communication between them. Make sure the necessary ports for Jellyfin are open.
- DNS Resolution: Verify that your Unraid server can resolve the hostname or IP address of your Jellyfin server. If you're using a custom DNS server, ensure it's configured correctly.
- Internal Network: Confirm that both your Unraid server and the Tunarr device are on the same network or that there is proper routing configured between them.
3. Jellyfin Server Configuration
Incorrect Jellyfin server configuration can also lead to API access problems. Here are some key settings to check:
- API Endpoints: Ensure that the API endpoints configured in Tunarr are correct and match the Jellyfin server's settings. Double-check the URL and port number.
- Base URL: Verify that the base URL for your Jellyfin server is set correctly. This is the URL that Tunarr uses to access the Jellyfin API.
- Reverse Proxy (if applicable): If you're using a reverse proxy in front of Jellyfin, ensure it's configured correctly to forward requests to the Jellyfin server.
4. Tunarr Configuration
Issues within Tunarr's configuration itself can also cause problems with API access.
- Jellyfin Server Settings: Review the Jellyfin server settings within Tunarr. Make sure the correct server URL, API key (if used), and user credentials are entered.
- Media Library Paths: Verify that the media library paths configured in Tunarr match the actual paths in your Jellyfin server. Any discrepancies can prevent Tunarr from correctly accessing your media.
5. Software Updates
Using outdated versions of Jellyfin or Tunarr can sometimes lead to compatibility issues and bugs. Ensure that you're running the latest versions of both software.
- Jellyfin Server: Check for updates to your Jellyfin server and install them if available.
- Tunarr: Update Tunarr to the latest version. The bug report mentions Tunarr version 0.22.15, so updating to a newer version might resolve the issue if it's a known bug that has been fixed.
6. Check Jellyfin Server Logs
In addition to the logs provided in the bug report, examining the Jellyfin server logs directly can provide more detailed information about any errors or issues. Look for any error messages or warnings related to API access or authentication.
7. Reinstall Jellyfin or Tunarr
In some cases, a fresh installation of either Jellyfin or Tunarr can resolve underlying issues. This should be considered as a last resort if other troubleshooting steps have not been successful.
8. ZodError and Schema Validation
The error logs mention a ZodError, which is related to schema validation. This suggests that the data being returned by the Jellyfin API doesn't match the schema that Tunarr expects. This can be caused by a bug in either Jellyfin or Tunarr, or by a misconfiguration. If you encounter this error, try the following:
- Review Jellyfin API documentation: Check the Jellyfin API documentation to ensure that the data being returned for
/Library/VirtualFoldersmatches the expected schema. - Report the issue: If you suspect a bug in either Jellyfin or Tunarr, report the issue to the respective developers, providing detailed information about the error and your setup.
By systematically working through these troubleshooting steps, you can identify the root cause of the Jellyfin API issue on your Unraid server and hopefully restore the functionality of adding media to Tunarr.
Further Assistance and Resources
Troubleshooting complex issues like this can sometimes be challenging. If you've exhausted the troubleshooting steps outlined above and are still facing problems, don't hesitate to seek further assistance.
Community Forums and Support Channels
- Jellyfin Forums: The official Jellyfin forums are an excellent resource for finding help and connecting with other users. You can post your issue, share your error logs, and get advice from experienced users and developers.
- Tunarr Discord: The Tunarr Discord server is a great place to get real-time support from the Tunarr community and developers. You can ask questions, share your configuration, and get help with troubleshooting.
- Unraid Forums: The Unraid forums are another valuable resource, especially if you suspect the issue might be related to your Unraid setup. You can find discussions about Jellyfin and Tunarr on Unraid and get help from other Unraid users.
Providing Detailed Information
When seeking assistance, it's crucial to provide as much detailed information as possible. This will help others understand your problem and provide more targeted solutions. Be sure to include:
- Software Versions: Specify the versions of Jellyfin, Tunarr, and Unraid you're using.
- Error Logs: Share the relevant error logs, as these provide valuable clues about the cause of the issue.
- Configuration Details: Describe your Jellyfin and Tunarr configurations, including any custom settings or reverse proxy setups.
- Troubleshooting Steps Taken: Outline the troubleshooting steps you've already tried, so others can avoid suggesting the same solutions.
By providing clear and comprehensive information, you'll increase your chances of getting the help you need to resolve the Jellyfin API issue and get your media server up and running smoothly.
Conclusion
The Jellyfin API issue on Unraid, where users are unable to populate their media list, can be a frustrating problem. However, by understanding the bug report, analyzing error logs, and systematically working through troubleshooting steps, you can often identify and resolve the issue. Remember to check authentication, network connectivity, Jellyfin and Tunarr configurations, and software updates. If you're still facing problems, don't hesitate to seek assistance from the Jellyfin and Tunarr communities. By working together, we can ensure a smooth and enjoyable media server experience.
For further information on Jellyfin and its capabilities, you can visit the Jellyfin official website.