Skip to content

Fix: occasional error with age-restricted videos#9465

Merged
FreeTubeBot merged 1 commit into
FreeTubeApp:developmentfrom
Shadorc:fix/undefined-badge-text
Jul 23, 2026
Merged

Fix: occasional error with age-restricted videos#9465
FreeTubeBot merged 1 commit into
FreeTubeApp:developmentfrom
Shadorc:fix/undefined-badge-text

Conversation

@Shadorc

@Shadorc Shadorc commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

None

Description

I've had a hard time reproducing this issue to investigate.
From time to time I was getting TypeError: Cannot read properties of undefined (reading 'toLowerCase') while refreshing my subscription feed.
It seems that videos with an age restriction can have a badge with no text:

{
    "type": "ThumbnailBottomOverlayView",
    "progress_bar": null,
    "badges": [
        {
            "type": "ThumbnailBadgeView",
            "text": "0:37",
            "badge_style": "THUMBNAIL_OVERLAY_BADGE_STYLE_DEFAULT"
        },
        {
            "type": "ThumbnailBadgeView",
            "icon_name": "PLAY_DISABLED",
            "badge_style": "THUMBNAIL_OVERLAY_BADGE_STYLE_DEFAULT"
        }
    ]
}

However, I've tried subscribing to the only channel containing this video and spamming refresh, I can't consistently reproduce.

Testing

Low reproduction rate but:

  1. Subscribe to a channel with an age restricted video
  2. Refresh subscriptions videos several times
  3. Observe that no TypeError occurres

Desktop

  • OS: Bazzite
  • OS Version:
  • FreeTube version: 0.25.0-beta

@github-actions github-actions Bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Jul 19, 2026
@FreeTubeBot
FreeTubeBot enabled auto-merge (squash) July 19, 2026 22:03

@PikachuEXE PikachuEXE left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got it a few times but never got it after that
So I didn't fix it (coz I can't reproduce it anymore and capture the data structure

@Shadorc Shadorc changed the title Fix: occasional error with age-restricted videos in subscription feed Fix: occasional error with age-restricted videos Jul 19, 2026
@FreeTubeBot
FreeTubeBot merged commit 36f3283 into FreeTubeApp:development Jul 23, 2026
6 checks passed
@github-actions github-actions Bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants