Cannot download any media without explicitly provided APP_PORT env variable #254

Closed
opened 2025-11-09 09:44:17 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @jsopn on GitHub (Apr 28, 2024).

bug description
Recent commit that added internal streams feature, didn't specified process.env.APP_PORT fallback to 9000 which broke instances that were hosting cobalt without explicitly provided APP_PORT env variable.
As shown in documentation this variable should fallback to 9000, and there's also no API_PORT variable specified in file with docker-compose example.

there's no fallback to 9000 and as i checked the process.env in this function's scope, there's no process.env overrides too.
78288b8fac/src/modules/stream/manage.js (L88)

due this mistake function fails with TypeError [ERR_INVALID_URL]: Invalid URL on this line

reproduction steps

  1. Host new cobalt instance with following docker-compose file from the documentation;
  2. Try downloading any media (e.g from YouTube);
  3. Receive error with message something went wrong and i couldn't verify this stream. go back and try again without any logs in docker container;

platform

  • Any platform
  • Any browser
  • Cobalt API >= 66e58d2
Originally created by @jsopn on GitHub (Apr 28, 2024). **bug description** [Recent commit](https://github.com/wukko/cobalt/blob/66e58d21ec3e7bdd4f2b38e1e36cfb8d14d6ca6b/src/modules/stream/manage.js#L85) that added internal streams feature, didn't specified `process.env.APP_PORT` fallback to `9000` which broke instances that were hosting cobalt without explicitly provided `APP_PORT` env variable. As [shown in documentation](https://github.com/wukko/cobalt/blob/78288b8faca5d0896de8037f71e535f5c15a6482/docs/run-an-instance.md?plain=1#L55) this variable should fallback to `9000`, and there's also no `API_PORT` variable specified in file with [docker-compose example](https://github.com/wukko/cobalt/blob/78288b8faca5d0896de8037f71e535f5c15a6482/docs/examples/docker-compose.example.yml). there's no fallback to `9000` and as i checked the `process.env` in this function's scope, there's no `process.env` overrides too. https://github.com/wukko/cobalt/blob/78288b8faca5d0896de8037f71e535f5c15a6482/src/modules/stream/manage.js#L88 due this mistake function fails with `TypeError [ERR_INVALID_URL]: Invalid URL` on this line **reproduction steps** 1. Host new cobalt instance with [following docker-compose file](https://github.com/wukko/cobalt/blob/78288b8faca5d0896de8037f71e535f5c15a6482/docs/examples/docker-compose.example.yml) from the documentation; 2. Try downloading any media *(e.g from YouTube)*; 3. Receive error with message `something went wrong and i couldn't verify this stream. go back and try again` without any logs in docker container; **platform** - Any platform - Any browser - Cobalt API >= 66e58d2
GiteaMirror added the bug label 2025-11-09 09:44:17 -06:00
Sign in to join this conversation.