V1P3R-FMG / free-map-genie

Chromium/Firefox extension that unlocks mapgenie pro features for free.
MIT License
136 stars 9 forks source link

[BUG] trying to toggle anything makes the buttons dissappear #29

Open farter123jeffylol opened 8 months ago

farter123jeffylol commented 8 months ago

when you try to toggle any filters it will make them all disappear, you can still search for the things separately (ex : if you type in the search bar stash all stashes will come up but you cant toggle it.)

Steps to reproduce the behavior:

  1. Go to any WIP maps
  2. try toggle the filters
  3. map markers disappear and so do toggles
  4. See error

Screenshots (https://gyazo.com/3013545444c1100134ed103a1da2efb9)

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

MrFusiion commented 8 months ago

So I was able to reproduce the error so that makes it easier to debug.

From some quick debugging.

I found that it has something to do with the presets and how my state script handles preset order that results in an array with an undefined object

image

Code snippet

https://github.com/V1P3R-FMG/free-map-genie/blob/64c064dfaa4b0dce9f53e70cec276badde357209/src/fmg/store/state.ts#L31-L42

The code looks for a preset with id -1. If a demoPreset is defined for the given map. Which in this case is true for tarkov. But the problem is the demo preset does not have a id -1 which was normally the id demo preset where given, but maybe they changed something. image

So a quick fix is to not look for the id but instead for the boolean is_demo_preset

Temporary fix

Until I find some time to fix it you maybe can use this as a temporary solution.

  1. Open the browser inspector usually with f12 or ctrl+shift+I.
  2. Go to console tab.
  3. Type this command window.mapData.presets[0].id = -1. image
michaelpopi1 commented 8 months ago

i am also experiencing this. im on opera gx

MrFusiion commented 8 months ago

i am also experiencing this. im on opera gx

Yeah, they changed something with the presets. Each demo preset has now a unique id which wasn't the case when I made the extension. My extension searches for a demo presets with id -1 and thus results in a Array containing a undefined value which breaks all filters overall. I can fix the issue when I find time to setup the repo on my local machine.

But for now you can use a temporary fix.

  1. Open the browser inspector usually with f12 or ctrl+shift+I.
  2. Go to console tab.
  3. Type this command window.mapData.presets[0].id = -1. image
michaelpopi1 commented 8 months ago

i am also experiencing this. im on opera gx

Yeah, they changed something with the presets. Each demo preset has now a unique id which wasn't the case when I made the extension. My extension searches for a demo presets with id -1 and thus results in a Array containing a undefined value which breaks all filters overall. I can fix the issue when I find time to setup the repo on my local machine.

But for now you can use a temporary fix.

  1. Open the browser inspector usually with f12 or ctrl+shift+I.
  2. Go to console tab.
  3. Type this command window.mapData.presets[0].id = -1. image

ok thank you :)

farter123jeffylol commented 8 months ago

tyvm 💖

MrFusiion commented 8 months ago

Issue should be fixed in the latest release. If something does not seem right or isn't working you can always reopen this or post a new issue.

Nepoxx commented 4 months ago

I think this is still an issue?

window.mapData.presets[0].id = -1 does not seem to help:

image image