Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

A failed upload from a file drop or paste leaves a stuck "Loading..." block

Abierto
#3,246 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@nperez0111 ya está trabajando en esto.

Desde el 23/10/2026.

  • #3247 de @nperez0111 — abierto

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
react, typescript

Línea de trabajo

The report identifies handleFileInsertion, editor.uploadFile, and editor.updateBlock, but gives no file path or test name. Start by locating handleFileInsertion and tracing the drop and paste upload flow. Reproduce with uploadFile resolving to an empty string and with a rejected promise; done means a failed upload no longer leaves a Loading block and rejections are handled. An open linked pull request (#3247) already addresses this issue.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

needs-triage
What’s broken?

When uploadFile fails for a file that was dropped or pasted into the editor, the inserted file block keeps showing "Loading..." forever. The user has to delete it by hand.

handleFileInsertion inserts a file block, awaits editor.uploadFile(file, blockId) and then always calls editor.updateBlock(blockId, { props: { url } }).

  • If uploadFile resolves with "" to report a failure, the props don't change, so the block doesn't render again. Its vanilla render replaced the "Add file" button with .bn-file-loading-preview in onUploadStart, and nothing restores it when the upload ends.
  • If uploadFile rejects, the rejection isn't caught. updateBlock never runs, the promise rejection is unhandled, and the block stays on "Loading..." as well.

The file panel's upload tab doesn't show this, because it sets name together with url. The block renders again and offers "Add file".

What did you expect to happen?

A failed upload doesn't leave a stuck placeholder. The block is either removed or goes back to its "Add file" state, and a rejected uploadFile is caught. A documented way for uploadFile to report a failure would help too.

Steps to reproduce
  1. Create an editor whose uploadFile fails:
    const editor = useCreateBlockNote({
      uploadFile: () => Promise.resolve(""),
    });
    
  2. Drag any file from your computer into the editor, or paste one.
  3. A file block showing "Loading..." stays in the document.

With uploadFile: () => Promise.reject(new Error("rejected")) the block stays as well, and the console shows an unhandled promise rejection.

BlockNote version

@blocknote/core, @blocknote/react, @blocknote/mantine 0.55.0

Environment

No response

Additional context

We work around it by listening to onUploadEnd and, in a timeout after BlockNote's updateBlock, removing the block if it still renders .bn-file-loading-preview.

Contribution
  • I'd be interested in contributing a fix for this issue
Sponsor
  • I'm a sponsor and would appreciate if you could look into this sooner than later 💖
Lenguaje dominante
TypeScript
Estrellas
10.3k
Forks
780
Merge medio
3 d 6 h
PR fusionados (30 d)
48

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TypeCellOS/BlockNote

Todos los issues de TypeCellOS/BlockNote

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.