Skip to content

Frontend crashes with "TypeError: Failed to construct 'URL'" when asset thumbnail_url is null during processing #46

@gimphub-tech

Description

@gimphub-tech

Describe the bug

After uploading any asset (video, image, or audio), the entire dashboard crashes immediately with the following error:

TypeError: Failed to construct 'URL': Invalid URL
at n (layout-f89cd1e259d41ed4.js:1:32330)
at layout-f89cd1e259d41ed4.js:1:33798

This happens because the layout component tries to construct a URL from thumbnail_url while it is still null (asset is in "processing" state).
The crash renders the entire dashboard unusable until processing completes and one refreshes the browser.

Steps to reproduce

  1. Log in to FreeFrame
  2. Open any project
  3. Upload any asset (video, image, or audio)
  4. Observe: dashboard immediately shows "Application error" crash screen
  5. Wait for processing to complete (varies: seconds for images, minutes for video)
  6. Reload the page — dashboard works again

Expected behavior

The dashboard should remain functional while an asset is processing.
A loading placeholder or spinner should be shown instead of attempting to render a null thumbnail_url. The upload flow should not be interrupted.

Screenshots

During Upload:

Image

After refreshing the browser:

Image

Area

Frontend (Next.js)

Version / Commit

latest main

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions