Skip to content

[Bug]: Subscription feed stops updating when any subscribed channel breaks #180

Description

@tam1m

What happened?

A single broken YT channel (deleted, private, timing out on fetch consistently) freezes the entire subscription feed. New videos from subscribed channels won't appear until the broken channel is either restored upstream, the user unsubscribes from it or the locally previous feed snapshot expires.

SubscriptionFeedService.kt#L124-L12 discards the entire refresh snapshot whenever a source fails and a previous snapshot exists:

val valid = result.failedSources == 0 || previous == null && result.successfulSources > 0 || subscriptions.isEmpty()

For permanently removed channels, the fetch fails forever, so the feed never gets updated until the cached snapshot expires after its 24h TTL, resulting in ONE feed update every ~24h for the user.

Maybe accept partial success and publish whatever succeededs? Failing sources are getting processed again during the next scheduled refresh anyways.

The validation would just be should be

val valid = result.successfulSources > 0 || subscriptions.isEmpty()

I'm not sure how cached videos from failed channels should be handled. Removing them from the feed and logging the failed channels seems like the safest and also simplest approach. But then, if a channel fetch fails only temporarily, keeping the cached videos be the better user experience? It really depends on why the fetch failed, so not sure.

Steps to reproduce

  1. Subscribe to at least one working channel and one terminated/deleted channel
  2. Wait for the working channel to upload a new video
  3. Check subscription feed
  4. The new video never appears with event=refresh_kept_previous warnings in the log

Area

Backend (API / extraction)

Channel

main (stable)

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: backendTypeType-Server API or extractionbugSomething isn't workingpriority: mediumMedium priority

    Type

    No type

    Projects

    Status
    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions