Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue]: Live TV Recordings No Longer Scheduled #11579

Closed
1 task done
michaelcresswell opened this issue May 12, 2024 · 23 comments
Closed
1 task done

[Issue]: Live TV Recordings No Longer Scheduled #11579

michaelcresswell opened this issue May 12, 2024 · 23 comments
Labels
bug Something isn't working confirmed This issue has been reviewed and confirmed

Comments

@michaelcresswell
Copy link

michaelcresswell commented May 12, 2024

Please describe your bug

Live TV episodes are no longer scheduled for recording. Scheduling a recording for either a single episode or a series results in a loading spinner, an error in the server log, and no recording being created.

This has been seen on an instance migrated from 10.8.13 and a fresh 10.9.0 instance with only the HDHomeRun and XMLTV guide data file setup.

I tried giving the directory mentioned in the error log and its underlying files 777 as well as not mounting a directory so the files would be used directly from the jellyfin image.

This worked in 10.8.13.

Reproduction Steps

With an HDHomeRun setup and XMLTV data imported,

  1. Navigate to the Live TV Guide
  2. Choose an episode and select Record

Jellyfin Version

10.9.0
10.9.1

if other:

No response

Environment

- OS: Arch
- Linux Kernel: 6.8.9-arch1-2
- Virtualization: Docker
- Clients: Web, Expo
- Browser: Firefox
- FFmpeg Version: 6.0.1-Jellyfin
- Playback Method: N/A
- Hardware Acceleration: QuickSync normally, tried with None as well
- GPU Model: Intel UHD Graphics
- Plugins: None / Defaults Only
- Reverse Proxy: Traefik
- Base URL: /jellyfin/ normally, tried None as well
- Networking: Bridge
- Storage: Local

Jellyfin logs

[2024-05-12 19:27:54.997 +00:00] [ERR] [58] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "POST" "/LiveTv/SeriesTimers/20c71047f7bf2178ddb423513b34f653".
System.UnauthorizedAccessException: Access to the path '/config/data/livetv' is denied.
 ---> System.IO.IOException: Permission denied
   --- End of inner exception stack trace ---
   at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
   at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.File.WriteToFile(String path, FileMode mode, String contents, Encoding encoding)
   at Jellyfin.LiveTv.Timers.ItemDataProvider`1.SaveList()
   at Jellyfin.LiveTv.Timers.ItemDataProvider`1.Update(T item)
   at Jellyfin.LiveTv.Timers.TimerManager.Update(TimerInfo item)
   at Jellyfin.LiveTv.DefaultLiveTvService.UpdateTimersForSeriesTimer(SeriesTimerInfo seriesTimer, Boolean updateTimerSettings, Boolean deleteInvalidTimers)
   at Jellyfin.LiveTv.DefaultLiveTvService.UpdateSeriesTimerAsync(SeriesTimerInfo info, CancellationToken cancellationToken)
   at Jellyfin.LiveTv.LiveTvManager.UpdateSeriesTimer(SeriesTimerInfoDto timer, CancellationToken cancellationToken)
   at Jellyfin.Api.Controllers.LiveTvController.UpdateSeriesTimer(String timerId, SeriesTimerInfoDto seriesTimerInfo)
   at lambda_method1835(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|20_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)

FFmpeg logs

N/A

Please attach any browser or client logs here

N/A

Please attach any screenshots here

IMG_0513
Spinner seen after attempting to schedule a recording.

IMG_0516
All options that could prevent recording are as permissive as possible.

IMG_0514
One episode claims to be recording and another scheduled. Neither were actually recorded.

Code of Conduct

  • I agree to follow this project's Code of Conduct
@michaelcresswell michaelcresswell added the bug Something isn't working label May 12, 2024
@jellyfin-bot
Copy link
Contributor

Hi, it seems like your issue report has the following item(s) that need to be addressed:

  • You have not provided the ffmpeg log unaltered from the server. Please provide a valid ffmpeg log.

This is an automated message, currently under testing. Please file an issue here if you encounter any problems.

@michaelcresswell
Copy link
Author

Hi, it seems like your issue report has the following item(s) that need to be addressed:

  • You have not provided the ffmpeg log unaltered from the server. Please provide a valid ffmpeg log.

This is an automated message, currently under testing. Please file an issue here if you encounter any problems.

There is no transcoding or playback of any kind involved in this issue.

@anthonylavado anthonylavado added the confirmed This issue has been reviewed and confirmed label May 13, 2024
@p37307
Copy link

p37307 commented May 13, 2024

I get the same error. No FFMPEG log, also. LiveTV was working prior to upgrade to 10.9.0.

I swapped logs from informational to debug and clicked record and this is the output:

[2024-05-13 02:23:23.396 -04:00] [ERR] [14] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "POST" "/LiveTv/Timers".
System.UnauthorizedAccessException: Access to the path 'C:\Users\REDACTED\AppData\Local\Jellyfin\data\livetv' is denied.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.File.WriteToFile(String path, FileMode mode, String contents, Encoding encoding)
   at Jellyfin.LiveTv.Timers.ItemDataProvider`1.SaveList()
   at Jellyfin.LiveTv.Timers.ItemDataProvider`1.Add(T item)
   at Jellyfin.LiveTv.Timers.TimerManager.Add(TimerInfo item)
   at Jellyfin.LiveTv.DefaultLiveTvService.CreateTimer(TimerInfo info, CancellationToken cancellationToken)
   at Jellyfin.LiveTv.LiveTvManager.CreateTimer(TimerInfoDto timer, CancellationToken cancellationToken)
   at Jellyfin.Api.Controllers.LiveTvController.CreateTimer(TimerInfoDto timerInfo)
   at lambda_method1703(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)

Edit to add Computer OS

Edition Windows 10 Pro
Version 22H2
OS build 19045.4291
Experience Windows Feature Experience Pack 1000.19056.1000.0

@jurgenhaas
Copy link

Not only is there no recording, I can't even play live TV any longer.

@p37307
Copy link

p37307 commented May 13, 2024

Not only is there no recording, I can't even play live TV any longer.

I can play just can't record.

@p37307
Copy link

p37307 commented May 13, 2024

@anthonylavado I'm getting the same permission error doing a guide update from the scheduled task under 10.9.1 (now.)

System.InvalidOperationException: Unable to convert any images to local

  at Emby.Server.Implementations.Library.LibraryManager.ConvertImageToLocal(BaseItem item, ItemImageInfo image, Int32 imageIndex, Boolean removeOnFailure)

  at Jellyfin.LiveTv.Guide.GuideManager.<>c__DisplayClass21_0.<<PrecacheImages>b__2>d.MoveNext()

[2024-05-13 08:26:09.080 -04:00] [ERR] [31] Emby.Server.Implementations.ScheduledTasks.TaskManager: Error executing Scheduled Task

System.UnauthorizedAccessException: Access to the path 'C:\Users\redacted\AppData\Local\Jellyfin\data\livetv' is denied.

@michaelcresswell
Copy link
Author

@anthonylavado I'm getting the same permission error doing a guide update from the scheduled task under 10.9.1 (now.)

System.InvalidOperationException: Unable to convert any images to local

  at Emby.Server.Implementations.Library.LibraryManager.ConvertImageToLocal(BaseItem item, ItemImageInfo image, Int32 imageIndex, Boolean removeOnFailure)

  at Jellyfin.LiveTv.Guide.GuideManager.<>c__DisplayClass21_0.<<PrecacheImages>b__2>d.MoveNext()

[2024-05-13 08:26:09.080 -04:00] [ERR] [31] Emby.Server.Implementations.ScheduledTasks.TaskManager: Error executing Scheduled Task

System.UnauthorizedAccessException: Access to the path 'C:\Users\redacted\AppData\Local\Jellyfin\data\livetv' is denied.

I see instances of this in my log as well but the scheduled task succeeded when I re-ran it manually, this time at least

@michaelcresswell
Copy link
Author

Not only is there no recording, I can't even play live TV any longer.

I can play just can't record.

Seems client-dependent to me, Web doesn't play Live TV but iOS Expo does.

Playback problems are likely a separate issue though.

@jurgenhaas
Copy link

Playback problems are likely a separate issue though.

The browser console showed many javascript errors, most of which because they received 500 errors from the server. But that was yesterday, looks like the update to 10.9.1 fixed those.

@ch6574
Copy link

ch6574 commented May 13, 2024

I experience the same on 10.9.1 under Debian 12, plus I have also noticed that refreshing the TV guide data throws the below errors:

May 13 13:33:19 jellyfin jellyfin[805]: [13:33:19] [INF] Channel Station ID is: 26182                                                                                                                                                              
May 13 13:33:20 jellyfin jellyfin[805]: [13:33:20] [WRN] Unable to precache https://json.schedulesdirect.org/20141201/image/95b737420ad06c867c665a10a46280dfd7b1285f4a69e996bd7e74a4b2117a1f.jpg?token=c430a5c739177510d1d175e060aa5f42            
May 13 13:33:20 jellyfin jellyfin[805]: System.InvalidOperationException: Unable to convert any images to local                                                                                                                                    
May 13 13:33:20 jellyfin jellyfin[805]:    at Emby.Server.Implementations.Library.LibraryManager.ConvertImageToLocal(BaseItem item, ItemImageInfo image, Int32 imageIndex, Boolean removeOnFailure)                                                
May 13 13:33:20 jellyfin jellyfin[805]:    at Jellyfin.LiveTv.Guide.GuideManager.<>c__DisplayClass21_0.<<PrecacheImages>b__2>d.MoveNext()                                                                                                          

This repeats thousands of times (I assume one for each program), then finally:

May 13 13:35:59 jellyfin jellyfin[805]: [13:35:59] [ERR] Error executing Scheduled Task
May 13 13:35:59 jellyfin jellyfin[805]: System.UnauthorizedAccessException: Access to the path '/var/lib/jellyfin/data/livetv' is denied.
May 13 13:35:59 jellyfin jellyfin[805]:  ---> System.IO.IOException: Permission denied
May 13 13:35:59 jellyfin jellyfin[805]:    --- End of inner exception stack trace ---
May 13 13:35:59 jellyfin jellyfin[805]:    at Interop.ThrowExceptionForIoErrno(ErrorInfo errorInfo, String path, Boolean isDirError)
May 13 13:35:59 jellyfin jellyfin[805]:    at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, UnixFileMode openPermissions, Int64& fileLength, UnixFileMode& filePermissions, Boolean failForSymlink, Boolean& wasSymlink, Func`4 createOpenException)
May 13 13:35:59 jellyfin jellyfin[805]:    at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
May 13 13:35:59 jellyfin jellyfin[805]:    at System.IO.File.WriteToFile(String path, FileMode mode, String contents, Encoding encoding)
May 13 13:35:59 jellyfin jellyfin[805]:    at Jellyfin.LiveTv.Timers.ItemDataProvider`1.SaveList()
May 13 13:35:59 jellyfin jellyfin[805]:    at Jellyfin.LiveTv.Timers.ItemDataProvider`1.Add(T item)
May 13 13:35:59 jellyfin jellyfin[805]:    at Jellyfin.LiveTv.Timers.TimerManager.Add(TimerInfo item)
May 13 13:35:59 jellyfin jellyfin[805]:    at Jellyfin.LiveTv.DefaultLiveTvService.UpdateTimersForSeriesTimer(SeriesTimerInfo seriesTimer, Boolean updateTimerSettings, Boolean deleteInvalidTimers)
May 13 13:35:59 jellyfin jellyfin[805]:    at Jellyfin.LiveTv.DefaultLiveTvService.RefreshSeriesTimers(CancellationToken cancellationToken)
May 13 13:35:59 jellyfin jellyfin[805]:    at Jellyfin.LiveTv.Guide.GuideManager.RefreshGuide(IProgress`1 progress, CancellationToken cancellationToken)
May 13 13:35:59 jellyfin jellyfin[805]:    at Emby.Server.Implementations.ScheduledTasks.ScheduledTaskWorker.ExecuteInternal(TaskOptions options)
May 13 13:35:59 jellyfin jellyfin[805]: [13:35:59] [INF] Refresh Guide Failed after 4 minute(s) and 12 seconds

Directory permissions:

jellyfin@jellyfin:~$ ls -ld /var/lib/jellyfin/data/livetv 
drwxr-xr-x 2 jellyfin jellyfin 4 Sep  4  2023 /var/lib/jellyfin/data/livetv
jellyfin@jellyfin:~$ ls -l /var/lib/jellyfin/data/livetv
total 73
-rw-r--r-- 1 jellyfin jellyfin   6264 May 11 23:01 seriestimers.json
-rw-r--r-- 1 jellyfin jellyfin 245483 May 12 23:00 timers.json

@p37307
Copy link

p37307 commented May 13, 2024

I confirmed the permissions were the same on the folder as were before the 10.9.* upgrades.

I renamed the jellyfin/data/livetv folder to livetv_old, hoping it would recreate it.

I chose a random show, Father Knows Best, and tried to live record it. It started recording.
Instead of a jellyfin/data/livetv folder with Json files in it, it created a single text file with no extension called 'livetv'  with this in it:

[
    {
        "ProviderIds": {
            "SeriesZap2It": "EP00001581",
            "ProgramEtag": "9x22VgCnxfO65WTGjDyptw"
        },
        "SeriesProviderIds": {
            "Zap2It": "EP00001581"
        },
        "Tags": [
            "Repeat",
            "Series"
        ],
        "Id": "689daab6f3f741608c9cc7d7877a9355",
        "ChannelId": "hdhr_996",
        "ProgramId": "EP000015810123T638512038000000000C69299_hdhr_996",
        "Name": "Father Knows Best",
        "Overview": "Jim decides that Bud can\u0027t play in the church baseball game because he hasn\u0027t done his chores.",
        "SeriesId": "EP00001581",
        "StartDate": "2024-05-13T13:30:00.0000000Z",
        "EndDate": "2024-05-13T14:00:00.0000000Z",
        "Status": "InProgress",
        "PrePaddingSeconds": 60,
        "PostPaddingSeconds": 120,
        "IsPrePaddingRequired": false,
        "IsPostPaddingRequired": false,
        "IsManual": true,
        "Priority": 0,
        "RetryCount": 0,
        "SeasonNumber": 1,
        "EpisodeNumber": 26,
        "IsMovie": false,
        "IsKids": false,
        "IsSports": false,
        "IsNews": false,
        "IsSeries": true,
        "ProductionYear": 1955,
        "EpisodeTitle": "Close Decision",
        "OriginalAirDate": "1955-03-27T00:00:00.0000000Z",
        "IsProgramSeries": true,
        "IsRepeat": true,
        "OfficialRating": "TV-G",
        "Genres": [],
        "KeepUntil": "UntilDeleted"
    }
]

I then ran the guide update, which ran successfully. It had been failing. See my above reply.

I looked at the livetv file, and it remained the same. Nothing from my guide that should have been scheduled, was scheduled. and all of my previous series and schedules are gone when I looked on the web.

EDIT to add:
I tried to setup a new series recording, and got this in my log:

[2024-05-13 10:08:04.980 -04:00] [ERR] [15] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request: "Cannot create 'C:\Users\USERNAME\AppData\Local\Jellyfin\data\livetv' because a file or directory with the same name already exists". URL "POST" "/LiveTv/SeriesTimers".

I hope this makes sense to anyone.

@ch6574
Copy link

ch6574 commented May 13, 2024

Speculating here, but it seems the filename is being lost on the path, and Jellyfin is trying to perform file operations on a directory (hence the "System.UnauthorizedAccessException" errors).

@p37307
Copy link

p37307 commented May 13, 2024

I renamed the jellyfin/data/livetv folder to livetv_old, hoping it would recreate it.

I chose a random show, Father Knows Best, and tried to live record it. It started recording. Instead of a jellyfin/data/livetv folder with Json files in it, it created a single text file with no extension called 'livetv'  with this in it:

I deleted the text file livetv and tried to setup a new series. It created a livetv folder with a file called seriestimers.json but then died out with the same Access to the path 'C:\Users\USER\AppData\Local\Jellyfin\data\livetv' is denied error above

[2024-05-13 10:35:43.129 -04:00] [DBG] [29] Jellyfin.Api.Auth.CustomAuthenticationHandler: AuthenticationScheme: "CustomAuthentication" was successfully authenticated.
[2024-05-13 10:35:43.144 -04:00] [DBG] [29] Emby.Server.Implementations.Data.SqliteItemRepository: "GetItemList" query time (slow): 10.0969ms. Query: "select type,data,StartDate,EndDate,ChannelId,IsMovie,IsSeries,EpisodeTitle,IsRepeat,CommunityRating,CustomRating,IndexNumber,IsLocked,PreferredMetadataLanguage,PreferredMetadataCountryCode,Width,Height,DateLastRefreshed,Name,Path,PremiereDate,Overview,ParentIndexNumber,ProductionYear,OfficialRating,ForcedSortName,RunTimeTicks,Size,DateCreated,DateModified,guid,Genres,ParentId,Audio,IsInMixedFolder,DateLastSaved,LockedFields,Studios,Tags,OriginalTitle,PrimaryVersionId,DateLastMediaAdded,Album,LUFS,NormalizationGain,CriticRating,IsVirtualItem,SeriesName,PresentationUniqueKey,InheritedParentalRatingValue,ExternalSeriesId,Tagline,ProviderIds,ProductionLocations,ExtraIds,TotalBitrate,ExtraType,ExternalId,SeriesPresentationUniqueKey,ShowId,OwnerId from TypedBaseItems A where type=@type AND ChannelId=@ChannelId AND EndDate>=@MinEndDate AND ExternalSeriesId=@ExternalSeriesId"
[2024-05-13 10:35:43.148 -04:00] [ERR] [29] Jellyfin.Api.Middleware.ExceptionMiddleware: Error processing request. URL "POST" "/LiveTv/SeriesTimers".
System.UnauthorizedAccessException: Access to the path 'C:\Users\USER\AppData\Local\Jellyfin\data\livetv' is denied.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.File.OpenHandle(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize)
   at System.IO.File.WriteToFile(String path, FileMode mode, String contents, Encoding encoding)
   at Jellyfin.LiveTv.Timers.ItemDataProvider`1.SaveList()
   at Jellyfin.LiveTv.Timers.ItemDataProvider`1.Add(T item)
   at Jellyfin.LiveTv.Timers.TimerManager.Add(TimerInfo item)
   at Jellyfin.LiveTv.DefaultLiveTvService.UpdateTimersForSeriesTimer(SeriesTimerInfo seriesTimer, Boolean updateTimerSettings, Boolean deleteInvalidTimers)
   at Jellyfin.LiveTv.DefaultLiveTvService.CreateSeriesTimer(SeriesTimerInfo info, CancellationToken cancellationToken)
   at Jellyfin.LiveTv.LiveTvManager.CreateSeriesTimer(SeriesTimerInfoDto timer, CancellationToken cancellationToken)
   at Jellyfin.Api.Controllers.LiveTvController.CreateSeriesTimer(SeriesTimerInfoDto seriesTimerInfo)
   at lambda_method1557(Closure, Object)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask`1 actionResultValueTask)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
   at Jellyfin.Api.Middleware.ServerStartupMessageMiddleware.Invoke(HttpContext httpContext, IServerApplicationHost serverApplicationHost, ILocalizationManager localizationManager)
   at Jellyfin.Api.Middleware.WebSocketHandlerMiddleware.Invoke(HttpContext httpContext, IWebSocketManager webSocketManager)
   at Jellyfin.Api.Middleware.IPBasedAccessValidationMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager)
   at Jellyfin.Api.Middleware.LanFilteringMiddleware.Invoke(HttpContext httpContext, INetworkManager networkManager, IServerConfigurationManager serverConfigurationManager)
   at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.QueryStringDecodingMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.ReDoc.ReDocMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
   at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
   at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
   at Jellyfin.Api.Middleware.RobotsRedirectionMiddleware.Invoke(HttpContext httpContext)
   at Jellyfin.Api.Middleware.LegacyEmbyRouteRewriteMiddleware.Invoke(HttpContext httpContext)
   at Microsoft.AspNetCore.ResponseCompression.ResponseCompressionMiddleware.InvokeCore(HttpContext context)
   at Jellyfin.Api.Middleware.ResponseTimeMiddleware.Invoke(HttpContext context, IServerConfigurationManager serverConfigurationManager)
   at Jellyfin.Api.Middleware.ExceptionMiddleware.Invoke(HttpContext context)
[2024-05-13 10:35:45.217 -04:00] [DBG] [29] Emby.Server.Implementations.Session.SessionWebSocketListener: Watching 1 WebSockets.
[2024-05-13 10:35:46.986 -04:00] [DBG] [29] Emby.Server.Implementations.ScheduledTasks.TaskManager: "IntervalTrigger" fired for task: "Webhook Item Added Notifier"
[2024-05-13 10:35:46.987 -04:00] [DBG] [29] Emby.Server.Implementations.ScheduledTasks.TaskManager: Queuing task "ItemAddedScheduledTask"
[2024-05-13 10:35:46.989 -04:00] [DBG] [23] Emby.Server.Implementations.ScheduledTasks.TaskManager: Executing "Webhook Item Added Notifier"
[2024-05-13 10:35:46.990 -04:00] [DBG] [23] Jellyfin.Plugin.Webhook.Notifiers.ItemAddedNotifier.ItemAddedManager: ProcessItemsAsync
[2024-05-13 10:35:46.991 -04:00] [INF] [23] Emby.Server.Implementations.ScheduledTasks.TaskManager: "Webhook Item Added Notifier" Completed after 0 minute(s) and 0 seconds
[2024-05-13 10:35:57.223 -04:00] [DBG] [29] Emby.Server.Implementations.Session.SessionWebSocketListener: Watching 1 WebSockets.
[2024-05-13 10:35:57.353 -04:00] [DBG] [23] Emby.Server.Implementations.HttpServer.WebSocketConnection: WS "192.168.0.11" received message: InboundWebSocketMessage`1 { Data: null, MessageType: KeepAlive, ServerId: null }


@anthonylavado
Copy link
Member

I know that the Guide issue is related to the token needing to be refreshed before downloading images. That should eventually cycle through, or you can delete/re-add Schedules Direct again. If that persists, we'll need to open a separate issue.

Regarding the recording, we're still looking into that.

@jellyfin-bot jellyfin-bot added this to Needs triage in Issue Triage for Main Repo May 13, 2024
@TMTwatch
Copy link

TMTwatch commented May 14, 2024

I too am getting a permissions error with livetv but I only noticed it when I realized the guide wasn't updating. The failure is shown in Advanced>Scheduled Tasks>Refresh Guide. The logs show the same permissions problem as this report. Issue still exists in 10.9.1

@williamthrilliam
Copy link

Same permission issue for me.

After upgrading to the latest server 10.9.1 on Ubuntu 24.04, live TV series stopped recording and can't schedule new recordings. Logs say the following:

Code:

[2024-05-14 21:50:12.623 -05:00] [ERR] Error processing request. URL "POST" "/LiveTv/SeriesTimers".
System.UnauthorizedAccessException: Access to the path '/var/lib/jellyfin/data/livetv' is denied.
---> System.IO.IOException: Permission denied

I've re-applied ownership by:
Code:
sudo chown -R jellyfin:jellyfin /var/lib/jellyfin

I've rebooted and I have the same error when scheduling recordings.

Permissions of the directory in question:

Code:

sudo ls -la /var/lib/jellyfin/data/livetv
total 172
drwxr-xr-x 2 jellyfin jellyfin  4096 Feb 11 18:05 .
drwxr-xr-x 8 jellyfin jellyfin  4096 May 14 21:54 ..
-rw-r--r-- 1 jellyfin jellyfin  5129 May 14 21:50 seriestimers.json
-rw-r--r-- 1 jellyfin jellyfin 159458 May 13 19:00 timers.json

@crobibero
Copy link
Member

Closing as this will be fixed in 10.9.2.

Issue Triage for Main Repo automation moved this from Needs triage to Closed/Done May 15, 2024
@dathbe
Copy link

dathbe commented May 17, 2024

Is this fix implemented in the nightly? I'd really like to get recording back up this afternoon.

@crobibero
Copy link
Member

No

@p37307
Copy link

p37307 commented May 17, 2024

Appreciate the quick triage and fix, but We're in the end of season finales and series finales right now. Please consider a patch release.

@dathbe
Copy link

dathbe commented May 17, 2024

I'm trying to roll back to 10.8.13 right now, which unfortunately requires restoring from backup.

@TMTwatch
Copy link

The issue appears to be fixed as of 10.9.2 even though it wasn't referenced in the change notes. My guide is updating without error and my recordings are now showing up in scheduled.

@michaelcresswell
Copy link
Author

The issue appears to be fixed as of 10.9.2 even though it wasn't referenced in the change notes. My guide is updating without error and my recordings are now showing up in scheduled.

I believe the reference in the release notes is near the bottom:

  • Fix missing filename for timer

I’m glad to see this fixed so quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working confirmed This issue has been reviewed and confirmed
Projects
Status: No status
Development

No branches or pull requests

10 participants