0x978 / GeoGuessr_Resolver

A script which returns the correct location in Geoguessr
https://greasyfork.org/en/scripts/450253-geoguessr-resolver-hack-7-5-duels-and-google-maps-update
44 stars 7 forks source link

SBOX_FATAL_MEMORY_EXCEEDED chrome error when using new guess override for Maprunner #7

Open 0x978 opened 1 year ago

0x978 commented 1 year ago

Chrome throws SBOX_FATAL_MEMORY_EXCEEDED when NOT moving marker before submitting a guess with the back-up guess function currently used in Map Runner.

This guess function would be superior if this could be prevented without needing to move marker before submitting guess. (Because even this sometimes doesn't prevent it.)

Aim

The element coordinate-map_canvasContainer__7d8Yw has desired property which can mock clicking on the map

This can be accessed with

    const clickProperty = props.return.memoizedProps.map.__e3_.click
    const dynamicIndex = Object.keys(clickProperty)[0]
    const clickFunction = clickProperty[dynamicIndex].xe

Where clickFunction is the desired mocked click, such that we can do clickFunction() which appears to accept an object, this object contains a lot of properties regarding the mouse click, but also the latlng. I can recreate the object with just the latlng property, but this will cause the browser to crash if submitted.

let y = {
    "latLng": {
        "lat": coords.lat,
        "lng": coords.lng,
    }
}

If I could perhaps include all the mouseclick properties in my y object and not just latlng this could be fixed, but I am not sure how easy this will be, or even if it will be fixed.

There's a chance there is a recursive call somewhere on an expected property that isn't being passed in my y object?

Perhaps I need to check how the submit guess function is handling this too

Regardless, it seems obvious this is a memory leak

0x978 commented 1 year ago

Strangely only occurs when the marker is accurate (or very close). Applying 0.1 to each coordinate fixes this.