EVerest/everest-admin-panel

Loading some configs fails with "Assertion failed"

Closed this issue · 1 comments

Sometimes clicking on a module leads to the following JS Error:

config_stage.ts:248 Uncaught (in promise) Error: Assertion failed
    at ConfigStage._add_connection_to_stage (config_stage.ts:248:13)
    at config_stage.ts:176:58
    at Array.forEach (<anonymous>)
    at ConfigStage.set_model (config_stage.ts:176:37)
    at EvConfigCanvas.vue:66:13
    at callWithErrorHandling (chunk-PSWSF63L.js?v=13d070f9:1652:19)
    at callWithAsyncErrorHandling (chunk-PSWSF63L.js?v=13d070f9:1659:17)
    at job (chunk-PSWSF63L.js?v=13d070f9:3398:9)
    at callWithErrorHandling (chunk-PSWSF63L.js?v=13d070f9:1652:33)
    at flushJobs (chunk-PSWSF63L.js?v=13d070f9:1858:9)

Update: This happens whenever the loaded config tries to get a terminal which doesn't exist (anymore) on the other module.
CleanShot 2024-03-17 at 16 57 16
CleanShot 2024-03-17 at 16 59 20

In this case in a connection between a JsYetiSimulator and an EvseManager. That probably means the config I am trying to load is outdated. For now I will implement that in a case like this, it simply aborts adding this connection to the stage and drops it. A problem with this might be, that after saving, the connection will be removed from the config as well. This means loading and saving again "deletes" stuff from the config without the user noticing it. @hikinggrass do you have any idea for a better behavior than simply dropping the connection?