Own servers still get server 0.2.12 without d5947c7, so the phone stays on Reconnecting (403 on the /api/events preflight)

Abierto Apto para principiantes
#79 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
typescript

Línea de trabajo

El issue señala la lista de permitidos de CORS en dist-server/index.js, que está instalada, y la corrección upstream en server/mobile/request.ts. Lee esos archivos y comprueba cómo se construye y publica el paquete del servidor para instalaciones en servidores propios. El trabajo estará terminado cuando una instalación nueva incluya los encabezados preflight necesarios y la solicitud reportada a /api/events ya no reciba un 403.

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

Descripción

What happened

A fresh own-server install on 2026-11-18, from the 0.2.18 desktop app's install line, installs a server package whose package.json says 0.2.12. duskbot-server-update.timer finds nothing newer.

With that server, the iPhone app pairs and can send messages (they reach the bot and show up in the desktop app), but it stays on "Reconnecting" and never shows the bot's replies. Every retry sends this preflight:

OPTIONS /api/events?screens=off
Origin: capacitor://localhost
Access-Control-Request-Method: GET
Access-Control-Request-Headers: authorization,cache-control

The server answers 403. The installed dist-server/index.js only allows Authorization, Content-Type, Last-Event-ID, X-Dusk-Background, X-Dusk-Sha256.

main already fixes this in d5947c7 ("phone: live stream no longer stuck on Reconnecting"), which adds Accept and Cache-Control in server/mobile/request.ts, and that commit is older than the v0.2.15 to v0.2.18 tags. The server build that own-server installs receive doesn't have it.

Adding "Cache-Control" to that list in the installed file and restarting duskbot.service fixed it on my server: the preflight returns 204 and replies show up on the phone. The next server update will overwrite that local edit, so this only holds until a fixed build ships to own servers.

Steps to reproduce
  1. Install on a fresh server with the desktop app's install line.
  2. Make the server reachable from the phone and pair it (I had to work around the pairing screen; see #78).
  3. Send a message from the phone.
  4. The message reaches the bot, but the reply never shows on the phone, and the app shows Reconnecting.
Version

desktop 0.2.18, server package 0.2.12, iOS app build 2611142024

Platform

Own server (VPS), Debian 13 amd64, with the iPhone app

Lenguaje dominante
TypeScript
Estrellas
277
Forks
27
Merge medio
2 h 47 min
PR fusionados (30 d)
1

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 DuskBotAI/duskbot

Todos los issues de DuskBotAI/duskbot

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.