commit 51a1168f2eea237601bd6451014d4b38ef16f1b6 parent 33dc192430008600a5f27c216bdd443cc868cf84 Author: Sebastian <sebasjm@taler-systems.com> Date: Fri, 30 Jan 2026 18:00:21 -0300 how to recreate stack from prod Diffstat:
| M | packages/merchant-backoffice-ui/README.md | | | 49 | ++++++++++++++++++++++++++++++++++++++++++++++++- |
1 file changed, 48 insertions(+), 1 deletion(-)
diff --git a/packages/merchant-backoffice-ui/README.md b/packages/merchant-backoffice-ui/README.md @@ -51,7 +51,7 @@ make install ``` ## Runtime dependencies - +``` * preact: Fast 3kB alternative to React with the same modern API * preact-router: URL component router for Preact @@ -69,3 +69,50 @@ make install * history: Manage the history stack, navigate, and make states persist in between sessions * jed: gettext as a library for internationalization + + +## Reading errors from prod stacks + +You can use the map file to recreate all the source + +```shell +pnpx reverse-sourcemap index.js.map -o dir +``` + +And to create a unminified version of the stacktrace + +```shell +pnpx stacktracify index.js.map --file error.txt +``` + +So for a file `error.txt` with the content: + +``` +Error response did not even contain JSON. The request URL might be wrong or the service might be unavailable. +at e.fromException (https://merchant.taler/webui/index.js:12:78107) +at J1 (https://merchant.taler/webui/index.js:12:126903) +at e7 (https://merchant.taler/webui/index.js:15:133135) +at cf (https://merchant.taler/webui/index.js:15:133256) +at JP (https://merchant.taler/webui/index.js:18:132360) +at nn.Q0 [as constructor] (https://merchant.taler/webui/index.js:18:162168) +at nn.EF [as render] (https://merchant.taler/webui/index.js:5:9452) +at qb (https://merchant.taler/webui/index.js:5:7112) +at https://merchant.taler/webui/index.js:5:2658 +at Array.some (<anonymous>) +``` + +you can get + +``` +Error response did not even contain JSON. The request URL might be wrong or the service might be unavailable. + at [unknown] (../../../taler-util/src/errors.ts:305:11) + at [unknown] (../../../taler-util/src/operation.ts:250:19) + at opUnknownFailure (../../../web-util/src/hooks/useAsync.ts:51:20) + at useAsync (../../../web-util/src/hooks/useAsync.ts:100:17) + at useLongPolling (../../src/hooks/order.ts:68:17) + at useOrderDetailsWithLongPoll (../../src/paths/instance/orders/details/index.tsx:41:17) + at constructor (../../../../node_modules/.pnpm/preact@10.11.3/node_modules/preact/src/diff/index.js:554:13) + at render (../../../../node_modules/.pnpm/preact@10.11.3/node_modules/preact/src/diff/index.js:203:13) + at diff (../../../../node_modules/.pnpm/preact@10.11.3/node_modules/preact/src/component.js:132:2) + at Array.some +```