Skip to content

Bug: reloging into youtube breaks home page #930

@YourWaterSpencer

Description

@YourWaterSpencer

Reproduction steps

  1. cookies expired
  2. log out and restart
  3. log back in
  4. home page should show
  5. restart grayjay
  6. homepage should fallback to trending

Actual result

homepage stops working after first refresh

Expected result

homepage to work as always

Grayjay Version

17

What plugins are you seeing the problem on?

Youtube

Plugin Version

336

Which operating system are you using?

Linux

Which OS version are you using?

Linux Mint 22.3 - Xfce 64-bit

Are you using flatpak?

  • Check this if you installed flatpak version for Linux. If unsure, leave blank.

When do you experience the issue?

  • While logged in
  • While logged out
  • N/A

Are you using a VPN?

No

References

#869 (comment)
(same issue just different cause)

Relevant log output

[2026-04-12 11:56:35.822] [WARNING] [StatePlatform] StatePlatform Initialize
[2026-04-12 11:56:36.879] [WARNING] [StateDownloads] Found 0 redundant downloaded files, deleting
[2026-04-12 11:56:38.331] [WARNING] [StatePlatform] GetChannelClients TOOK LONG: 1334.3161ms
[2026-04-12 11:56:43.894] [ERROR] [Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware] An unhandled exception has occurred while executing the request.
Exception: StateSync was not started, make sure Sync is enabled in the settings.
Stack Trace:    at Grayjay.ClientServer.States.StateSync.GetSyncDeviceInfo()
   at Grayjay.ClientServer.States.StateSync.GetPairingUrl()
   at Grayjay.ClientServer.Controllers.SyncController.GetPairingUrl()
   at lambda_method91(Closure, Object, Object[])
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
   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.<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 Grayjay.ClientServer.RequestLoggingMiddleware.InvokeAsync(HttpContext context)
   at Grayjay.ClientServer.TokenMiddleware.InvokeAsync(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
[2026-04-12 11:56:45.923] [ERROR] [Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware] An unhandled exception has occurred while executing the request.
Exception: StateSync was not started, make sure Sync is enabled in the settings.
Stack Trace:    at Grayjay.ClientServer.States.StateSync.GetSyncDeviceInfo()
   at Grayjay.ClientServer.States.StateSync.GetPairingUrl()
   at Grayjay.ClientServer.Controllers.SyncController.GetPairingUrl()
   at lambda_method91(Closure, Object, Object[])
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
   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.<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 Grayjay.ClientServer.RequestLoggingMiddleware.InvokeAsync(HttpContext context)
   at Grayjay.ClientServer.TokenMiddleware.InvokeAsync(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
[2026-04-12 11:56:47.936] [ERROR] [Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware] An unhandled exception has occurred while executing the request.
Exception: StateSync was not started, make sure Sync is enabled in the settings.
Stack Trace:    at Grayjay.ClientServer.States.StateSync.GetSyncDeviceInfo()
   at Grayjay.ClientServer.States.StateSync.GetPairingUrl()
   at Grayjay.ClientServer.Controllers.SyncController.GetPairingUrl()
   at lambda_method91(Closure, Object, Object[])
   at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncObjectResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
   at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location ---
   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.<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 Grayjay.ClientServer.RequestLoggingMiddleware.InvokeAsync(HttpContext context)
   at Grayjay.ClientServer.TokenMiddleware.InvokeAsync(HttpContext context)
   at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddlewareImpl.<Invoke>g__Awaited|10_0(ExceptionHandlerMiddlewareImpl middleware, HttpContext context, Task task)
[2026-04-12 11:56:48.675] [ERROR] [T] An exception occurred in the IPC
Exception: Unable to read beyond the end of the stream.
Stack Trace:    at System.IO.Stream.ReadAtLeastAsyncCore(Memory`1 buffer, Int32 minimumBytes, Boolean throwOnEndOfStream, CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at DotCef.DotCefProcess.<Start>b__28_3()
[2026-04-12 11:56:48.702] [ERROR] [WebSocketEndpoint] Failed to close socket
Exception: The WebSocket is in an invalid state ('Closed') for this operation. Valid states are: 'Open, CloseReceived'
Stack Trace:    at System.Net.WebSockets.WebSocketValidate.ThrowIfInvalidState(WebSocketState currentState, Boolean isDisposed, WebSocketState[] validStates)
   at System.Net.WebSockets.ManagedWebSocket.CloseOutputAsyncCore(WebSocketCloseStatus closeStatus, String statusDescription, CancellationToken cancellationToken)
   at Grayjay.ClientServer.WebSockets.WebSocketClient.Handle()

Metadata

Metadata

Assignees

No one assigned

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions