mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 20:45:00 -05:00
Every per-collection mongoexport failed with 'failed: undefined' because the error only logged (r.stderr || r.error): an empty stderr with a non-zero/killed status (e.g. a SIGSEGV, where spawnSync reports status=null, signal='SIGSEGV', stderr='') printed as 'undefined', hiding the real cause. Log a full describe(r) instead (status, signal, error code, stderr AND stdout snippets), and probe 'mongoexport --version' / '--help' once at startup so the next run shows whether the bundled mongoexport binary itself is broken (dies on --version too → an ABI/bundling problem) or only the export invocation is. The mongo shell on the same libs works (listCollections succeeds), so this narrows it precisely. Also make the progress dashboard obviously live: a CSS spinner while running (✅/❌ when done), a server 'updated' timestamp that changes on every 2s auto-refresh, and an error counter — the previous page refreshed but showed no sign of activity. Thanks to xet7.