Modern App crashes after deselect Geofences in Map preferences

Hristo2 years ago

Pretty much as the title, map fails to load and app crashes after deselecting Geofences. Tested on desktop and mobile.
Video at Video Link Here
Currently looking at the code...

Anton Tananaev2 years ago

Looks like you're not using an official version.

Also, you should check browser console for errors.

Hristo2 years ago

You are correct, Buit it from source after the yesterday's commit. Will have a look in the console. Thanks for the tip Anton. Will keep you posted if I discover the bug

Hristo2 years ago

At first look it appears that the bug is in the new file MapGeofence.js

Uncaught TypeError: Cannot read properties of undefined (reading 'setData')
    at MapGeofence.js:83:1
    at commitHookEffectListMount (react-dom.development.js:23150:1)
    at commitPassiveMountOnFiber (react-dom.development.js:24926:1)
    at commitPassiveMountEffects_complete (react-dom.development.js:24891:1)
    at commitPassiveMountEffects_begin (react-dom.development.js:24878:1)
    at commitPassiveMountEffects (react-dom.development.js:24866:1)
    at flushPassiveEffectsImpl (react-dom.development.js:27039:1)
    at flushPassiveEffects (react-dom.development.js:26984:1)
    at react-dom.development.js:26769:1
    at workLoop (scheduler.development.js:266:1)
Hristo2 years ago

Conditional rendering of <MapGeofence /> on MainPage.js fixes the issue.
Surely there is more inteligent solution, but thats all I can do. Hoping to learn from the best.
Stay safe Anton

Anton Tananaev2 years ago