amidaware / tacticalrmm

A remote monitoring & management tool, built with Django, Vue and Go.
https://docs.tacticalrmm.com
Other
3.23k stars 443 forks source link

race condition with new script editor, need help reproducing #1669

Closed wh1te909 closed 1 year ago

wh1te909 commented 1 year ago

from https://discord.com/channels/736478043522072608/1169652163174224022

martinporter: I am using Safari on a Mac, but I have the same issue with Chrome (on the same Mac). I just tried from a Windows PC on the same subnet, and it glitched (ie didn't work once), but it seems fine now. The server it runs on (a VM) sits behind a Sophos XG appliance acting as a web application firewall (ie reverse proxy). No setting on that has changed, so it does seem like something is working differently to v 0.16.x.

martinporter: I click any script in the script manager to view it. The first time, it displays fine. I then exit the editor and go back to the script manager. The next script won't display at all. If I leave the script manager and go to the dashboard, then back into the script manager, then editor, the problem persists - even the 1st script I double-click to edit won't display. I have to return to the dashboard, refresh the page, and then go back into the editor to view any script.

TypeError: Cannot read properties of undefined (reading 'getModel')
    at x (DashboardView.74d43594.js:725:17644)
    at Xt (index.f6eaed1b.js:1:15120)
    at ut (index.f6eaed1b.js:1:15199)
    at dp (index.f6eaed1b.js:1:17603)
    at w (index.f6eaed1b.js:14:27987)
    at Proxy.h (index.f6eaed1b.js:14:27942)
    at WE (index.f6eaed1b.js:14:29679)
    at ClosePopup.d5203590.js:1:1824
index.f6eaed1b.js:1 Error: ModelService: Cannot add model because it already exists!
    at qf._createModelData (DashboardView.74d43594.js:606:3321)
    at qf.createModel (DashboardView.74d43594.js:606:3548)
    at H3 (DashboardView.74d43594.js:636:162)
    at tH (DashboardView.74d43594.js:636:106)
    at Object.yge [as createModel] (DashboardView.74d43594.js:636:2370)
    at I (DashboardView.74d43594.js:725:17269)
    at Xt (index.f6eaed1b.js:1:15120)
    at ut (index.f6eaed1b.js:1:15199)
    at dp (index.f6eaed1b.js:1:17603)
    at index.f6eaed1b.js:14:38735
wh1te909 commented 1 year ago

fixed in https://github.com/amidaware/tacticalrmm-web/commit/069453848209aa2dfed067f38b3d64a928911173