sql-js / sql-js/sql.js

initSqlJs doesn't throw when wasm cannot be fetched

Abierto
#491 0 comentarios 1 reacción 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
JavaScript
Estrellas
13.7k
Forks
1.1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

import initSqlJs from 'sql.js';

(async () => {
  await initSqlJs();
})();

The promise will never settle, if the file cannot be fetched. The console will output

Uncaught (in promise) TypeError: Failed to fetch

but the promise remains in the "pending" state, so I guess the fetch is running outside the normal promise chain

Guía de contribución

Abrir la guía de contribución

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.

Línea de trabajo

Start at the initSqlJs entry point and reproduce the case where the WASM file cannot be fetched. Trace the fetch error through initialization and ensure the returned promise rejects rather than remaining pending; verify the failure is observable to the caller.

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

Evaluación

Stack tecnológico
javascript, wasm
Área
database, web-dev
Tipo de issue
Error
Dificultad
2/5
Tiempo estimado
1-3 horas
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.