
Hi all, Stack traces for Agama's web user interface are cryptic. Something like this: Unexpected Application Error! e is undefined i@https://172.22.50.15/index.js:2:608209 n@https://172.22.50.15/index.js:2:608239 e/</n/o/<@https://172.22.50.15/index.js:2:608048 ... The problem is that the code in index.js is minified (for efficiency), so if you go to index.js, line 2, column 608209... you won't find anything useful there. Fortunately, that's what source maps[1] are for! In Agama we are building the source map, which allows us to map between the minified code (CSS and JavaSript) and the source code. Using a tool like source map CLI you can get a pointer to the file and line: $ source-map resolve index.js 2 608209 Maps to webpack:///src/api/storage/devices.ts:112:25 (jsonDevice) const info = jsonDevice[jsonProperty]; Of course, you need to use the same version of the code that the reporter has. However, the source map is included in the agama-web-ui package and it is only loaded if the user opens the Firefox devtools. If you want to give it a try with the code in your repository, do not forget to set the NODE_ENV to "production": $ NODE_ENV=production npm run build I will add this tip to our development resources page[3]. Regards, Imo -- [1] https://web.dev/articles/source-maps [2] https://www.npmjs.com/package/source-map-cli [3] https://confluence.suse.com/display/YAST/Development+Resources
participants (1)
-
Imobach Gonzalez Sosa