OpenCut-app / OpenCut-app/OpenCut

[BUG] crypto.randomUUID is not a function Runtime Error

Open
#205 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
89.8k
Forks
8.9k
PR merge metrics
No merged PRs in 30d

Description

Platform

Deploy: Ubuntu 22.04, Docker

Browser

Chrome 138 on Window 11

Current Behavior

I encountered this error when running the project both in Docker and with bun run dev.

The app crashes at runtime due to the usage of crypto.randomUUID() in the ensureMainTrack function (src/types/timeline.ts:114). The error occurs during client-side execution, likely due to missing or unsupported Web Crypto API in the current environment (Next.js + Turbopack + Bun).

Error: crypto.randomUUID is not a function at ensureMainTrack (src/types/timeline.ts:114) at timeline-store.ts:195:39 at project-store.ts:164:38 at storage-provider.tsx:6:1

Image
Expected Behavior

No response

Recurrence Probability

Always

Steps To Reproduce
  1. Clone the repository and follow the setup instructions in the README.
  2. Run the project using docker copose and bun run dev.
  3. The app crashes on startup with the error: crypto.randomUUID is not a function
Anything else?

No response

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at ensureMainTrack in src/types/timeline.ts:114 and trace the calls from timeline-store.ts, project-store.ts, and storage-provider.tsx. Reproduce the startup failure with Docker and bun run dev, then verify that the client no longer crashes with crypto.randomUUID is not a function.

Written by the indexing model from the issue text.

Assessment

Tech stack
bun, docker, next.js, typescript
Domain
devops, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.