Causa raíz, encontrada reproduciéndolo con el bundle de producción en local
—con el servidor de desarrollo NO se ve, y por eso llevaba semanas dándose por
un artefacto del navegador sin pantalla:
if ((centerStored !== [0, 0] || geolocation.get()) && geoInit) {
center.set(centerStored || geolocation.get());
geoInit = false;
}
`centerStored !== [0, 0]` compara contra un array recién creado: es SIEMPRE
cierto. En un navegador nuevo —sin centro en localStorage y con la
geolocalización todavía sin resolver— eso hacía `center.set(undefined)` y dejaba
`geoInit` en false, o sea para siempre. Un `<MapContainer>` sin `center` no
recibe `setView`, y un mapa de Leaflet sin vista no carga capa base ni teselas
ni dispara `whenReady`, con lo que tampoco se creaba la suscripción por
viewport. En desarrollo no pasaba porque la geolocalización llegaba a tiempo.
Y de paso el "Actualizando…" que no se quitaba nunca: las suscripciones se
creaban dentro de un `Tracker.autorun` ANIDADO en el withTracker. La computación
de fuera no dependía de `mapSize`, así que `loading` se calculaba con
`subscription` a undefined y no volvía a recalcularse; además cada pasada del
withTracker dejaba otro autorun sin parar. Ahora las suscripciones se crean en
la propia computación reactiva, que es donde Meteor sabe pararlas al invalidarse.
MapReady, además, vigila el contenedor con un ResizeObserver: su comprobación de
tamaño solo podía reintentar con el evento `resize` de Leaflet, que no se emite
si nadie llama a invalidateSize(). No era la causa de esto, pero hacía que la
comprobación no sirviera de nada.
La suite e2e deja de usar selectores por id: TestUtils.testId() los devuelve solo
en desarrollo, así que contra el bundle de producción —lo que levanta el job
nocturno— no existían y la suite entera habría fallado esta noche.
Verificado contra bundle de producción: /fires pasa de 0 teselas y 0 capas a 12
teselas, capa base y las dos suscripciones por viewport, sin "Actualizando…".
90 tests de servidor, 16 e2e y smoke REST byte-idéntico.
|
||
|---|---|---|
| .forgejo/workflows | ||
| .meteor | ||
| bench | ||
| bin | ||
| client | ||
| cucumber | ||
| designs | ||
| docker | ||
| e2e | ||
| imports | ||
| packages | ||
| private | ||
| public | ||
| scripts | ||
| secrets | ||
| server | ||
| smoke | ||
| test/server | ||
| .dockerignore | ||
| .gitignore | ||
| .meteorignore | ||
| .npmrc | ||
| API.md | ||
| COPYRIGHT.md | ||
| docker-compose.e2e.yml | ||
| docker-compose.staging.yml | ||
| docker-compose.yml | ||
| Dockerfile | ||
| fonts.json | ||
| History.md | ||
| LICENSE.md | ||
| package-lock.json | ||
| package.json | ||
| PENDIENTE.md | ||
| README.md | ||
| RUNBOOK.md | ||
| settings-ci.json | ||
| settings-development-sample.json | ||
| UPGRADE.md | ||
Tod@s contra el Fuego (All Against Fire)
This is web service that notifies about fires detected in an area of your interest. It helps the early detection of fires and facilitates local mobilization, while the professional extinction services arrive.
Install
Prerrequisites: a running meteor (we share the fuegos database with the telegram bot).
Install meteor and run meteor npm install and npm start
Some other development deps (in debian & ubuntu):
apt-get install libcairo2-dev libjpeg-dev libgif-dev pkg-config
GeoIP
Configure mirror and cron of the geoip database.
Telegram bot
See our bot.
More platforms and services in the future...
Tests
We do tests via:
TEST_PORT=3000 TEST_WATCH=1 TEST_CLIENT=0 MONGO_URL=mongodb://localhost:27017/fuegostest meteor --settings settings-development.json test --driver-package meteortesting:mocha --port 3010
# and
node_modules/.bin/chimp --watch --ddp=http://localhost:3000 --path=cucumber
# and
node_modules/.bin/chimp --ddp=http://localhost:3000 --path=cucumber
FAQ & Troubleshooting
Q - I get something like (...) /node_modules/fibers/future.js:280 (...) Error: Could not locate the bindings file. What can I do?
A - Try meteor npm rebuild
Data source acknowledgements
We acknowledge the use of data and imagery from LANCE FIRMS operated by the NASA/GSFC/Earth Science Data and Information System (ESDIS) with funding provided by NASA/HQ.
License
GNU APLv3. See our LICENSE, for a complete text.
Thanks & other acknowlegments
Thanks indeed to:
- Lupe Bao Reixa for Galician translation