Skip to content

Media library broken - strapi 4.13.2 #17931

@rktyt

Description

@rktyt

Bug report

Required System information

  • Node.js version: 18.16.0
  • NPM version: 9.7.1
  • Strapi version: 4.13.2
  • Database: Mysql
  • Operating system: Debian
  • Is your project Javascript or Typescript: Typescript

Describe the bug

When I open the media library, I get a white page and the following error

TypeError: Failed to construct 'URL': Invalid URL

Expected behavior

The media library page should appear.

Screenshots

スクリーンショット 2023-09-05 12 02 33

スクリーンショット 2023-09-05 11 13 33

Additional context

Command Result
npx strapi develop --watch-admin works fine
npx strapi develop broken
npx strapi build --no-optimization && npx strapi develop --no-build broken

No change after deleting .cache and dist folders.


Updates:
In my data, all the files.url values in the database start with a slash.
This appears to be the cause.

Metadata

Metadata

Assignees

Labels

issue: bugIssue reporting a bugseverity: criticalIf the issue has a security impact or breaks core usage of the productsource: core:uploadSource is core/upload packagestatus: confirmedConfirmed by a Strapi Team member or multiple community members

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions