Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website

Recovering from Bad mangoUI-settings Preventing UI Startup


  • I'm working on applying corporate theming to a MangoHTS, which involved applying a custom mangoUI-settings config in the JSON Store. Unfortunately, I missed some typos on a copy/paste, and now the system hangs on startup with cascading errors:

    
    Error bootstrapping Mango UI app: [$injector:modulerr] Failed to instantiate module maUiBootstrap due to: Missing colors 100, 200, 300, 400, 500, 600, 700, 800, 900, A100, A200, A400 in palette primaryTeal! v@http://166.148.232.96:8081/modules/mangoUI/web/mangoUi~ngMango.js?v=735aeb62157e97f73c30:77:67161 definePalette@http://166.148.232.96:8081/modules/mangoUI/web/mangoUi~ngMango.js?v=735aeb62157e97f73c30:77:66478 h/this.registerThemes@http://166.148.232.96:8081/modules/mangoUI/web/mangoUi.js?v=91d25ee92ad5356e3e50:1:171852 h/this.setUiSettings@http://166.148.232.96:8081/modules/mangoUI/web/mangoUi.js?v=91d25ee92ad5356e3e50:1:171693 1987/</<@http://166.148.232.96:8081/modules/mangoUI/web/mangoUi.js?v=91d25ee92ad5356e3e50:1:227854 invoke@http://166.148.232.96:8081/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=410f3b6e2f95e70c04f3:78:26209 r@http://166.148.232.96:8081/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=410f3b6e2f95e70c04f3:78:25378 f/<@http://166.148.232.96:8081/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=410f3b6e2f95e70c04f3:78:25003 y@http://166.148.232.96:8081/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=410f3b6e2f95e70c04f3:78:1537 f@http://166.148.232.96:8081/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=410f3b6e2f95e70c04f3:78:24864 Kt@http://166.148.232.96:8081/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=410f3b6e2f95e70c04f3:78:24200 o@http://166.148.232.96:8081/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=410f3b6e2f95e70c04f3:78:10352 we@http://166.148.232.96:8081/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=410f3b6e2f95e70c04f3:78:10665 1987/<@http://166.148.232.96:8081/modules/mangoUI/web/mangoUi.js?v=91d25ee92ad5356e3e50:1:227967 https://errors.angularjs.org/1.7.8/$injector/modulerr?p0=maUiBootstrap&p1=Missing%20colors%20100%2C%20200%2C%20300%2C%20400%2C%20500%2C%20600%2C%20700%2C%20800%2C%20900%2C%20A100%2C%20A200%2C%20A400%20in%20palette%20primaryTeal!%0Av%40http%3A%2F%2F166.148.232.96%3A8081%2Fmodules%2FmangoUI%2Fweb%2FmangoUi~ngMango.js%3Fv%3D735aeb62157e97f73c30%3A77%3A67161%0AdefinePalette%40http%3A%2F%2F166.148.232.96%3A8081%2Fmodules%2FmangoUI%2Fweb%2FmangoUi~ngMango.js%3Fv%3D735aeb62157e97f73c30%3A77%3A66478%0Ah%2Fthis.registerThemes%40http%3A%2F%2F166.148.232.96%3A8081%2Fmodules%2FmangoUI%2Fweb%2FmangoUi.js%3Fv%3D91d25ee92ad5356e3e50%3A1%3A171852%0Ah%2Fthis.setUiSettings%40http%3A%2F%2F166.148.232.96%3A8081%2Fmodules%2FmangoUI%2Fweb%2FmangoUi.js%3Fv%3D91d25ee92ad5356e3e50%3A1%3A171693%0A1987%2F%3C%2F%3C%40http%3A%2F%2F166.148.232.96%3A8081%2Fmodules%2FmangoUI%2Fweb%2FmangoUi.js%3Fv%3D91d25ee92ad5356e3e50%3A1%3A227854%0Ainvoke%40http%3A%2F%2F166.148.232.96%3A8081%2Fmodules%2FmangoUI%2Fweb%2FmangoUi~ngMango~ngMangoServices.js%3Fv%3D410f3b6e2f95e70c04f3%3A78%3A26209%0Ar%40http%3A%2F%2F166.148.232.96%3A8081%2Fmodules%2FmangoUI%2Fweb%2FmangoUi~ngMango~ngMangoServices.js%3Fv%3D410f3b6e2f95e70c04f3%3A78%3A25378%0Af%2F%3C%40http%3A%2F%2F166.148.232.96%3A8081%2Fmodules%2FmangoUI%2Fweb%2FmangoUi~ngMango~ngMangoServices.js%3Fv%3D410f3b6e2f95e70c04f3%3A78%3A25003%0Ay%40http%3A%2F%2F166.148.232.96%3A8081%2Fmodules%2FmangoUI%2Fweb%2FmangoUi~ngMango~ngMangoServices.js%3Fv%3D410f3b6e2f95e70c04f3%3A78%3A1537%0Af%40http%3A%2F%2F166.148.232.96%3A8081%2Fmodules%2FmangoUI%2Fweb%2FmangoUi~ngMango~ngMangoServices.js%3Fv%3D410f3b6e2f95e70c04f3%3A78%3A24864%0AKt%40http%3A%2F%2F166.148.232.96%3A8081%2Fmodules%2FmangoUI%2Fweb%2FmangoUi~ngMango~ngMangoServices.js%3Fv%3D410f3b6e2f95e70c04f3%3A78%3A24200%0Ao%40http%3A%2F%2F166.148.232.96%3A8081%2Fmodules%2FmangoUI%2Fweb%2FmangoUi~ngMango~ngMangoServices.js%3Fv%3D410f3b6e2f95e70c04f3%3A78%3A10352%0Awe%40http%3A%2F%2F166.148.232.96%3A8081%2Fmodules%2FmangoUI%2Fweb%2FmangoUi~ngMango~ngMangoServices.js%3Fv%3D410f3b6e2f95e70c04f3%3A78%3A10665%0A1987%2F%3C%40http%3A%2F%2F166.148.232.96%3A8081%2Fmodules%2FmangoUI%2Fweb%2FmangoUi.js%3Fv%3D91d25ee92ad5356e3e50%3A1%3A227967%0A
    Show stack trace
    
    

    I'm working under the assumption that the best course is to undo the applied configuration. I can't get into the Mango UI to get back to the JSON Store. I can SSH into the device and have been researching and scouring the file structure but cannot locate where the mangoUI-settings information is stored.

    Is this something that's stored in plain text somewhere that I can get to and wipe out? Is there a better option than wiping the device and starting over?

    Thanks for the help.


  • Hey @coreyf its not stored in a file, it's in a SQL database. You can login to the legacy UI and modify the entry in the DB by navigating to /sqlConsole.shtm

    I think the easiest thing for you to do will be to delete all your UI settings -

    DELETE FROM JSONDATA WHERE XID = 'mangoUI-settings'
    

  • It looks like if I try to manually point to a legacy UI url, or navigate directly to /sqlConsole.shtml, it redirects me back to /ui/login, which is where it does is show me the error output. I should note that we just updated the modules before this happened, and it appears most or all of the legacy UI has been migrated to the new UI?

    I also tried to work through the web based H2 client, and I can get the client up, but it errors "/opt/mango/databases/mah2 not found." Note that username and password in env.preferences and the console are both blank.

    I also tried running your sql command from a local terminal, but am not having luck getting a local H2 console to run.


  • I also tried to work through the web based H2 client, and I can get the client up, but it errors "/opt/mango/databases/mah2 not found." Note that username and password in env.preferences and the console are both blank.

    We added the version number to the mah2's file name when we fixed the pesky database expansion that plagued some H2 users. Can you try again with the name mah2.199 ?


  • @coreyf said in Recovering from Bad mangoUI-settings Preventing UI Startup:

    It looks like if I try to manually point to a legacy UI url, or navigate directly to /sqlConsole.shtml, it redirects me back to /ui/login

    I'm pretty sure if you navigate directly to /login.htm you should be able to login to the legacy UI.


  • @phildunlap,
    I tried JDBC URL jdbc:h2:./databases/mah2-199 and still get a database not found error. While we were able to solve the topic issue through the legacy UI, let me know if you still want to chase this down to figure out why we can't connect to the DB through the H2 console.

    @Jared-Wiltshire,
    Bingo! That got us into the legacy UI. It seems obvious now in hindsight.

    I executed your SQL command to purge the changes, and the main GUI is back online.

    Thanks for the help!


  • That's alright, but thanks for the willingness! I'm sure part of the reason would be that I had it wrong in my mind - it's mah2.199 not -199 , Sorry for leading you astray on that!