Location search completion broken

Location search, including leaderboard location search, breaks whenever you enter an additional character while the server is processing a location search completion request. The search just stops working with an HTTP 500 error code, and you cannot recover from this state except for reloading the page. Note that you cannot assume the same quick response times in your office for all other clients on the web.

I am trusting that you already know how to fix it. :wink:

Btw, whitespaces should not trigger a request.

Thanks for the report. Yet, I canโ€™t reproduce it :confused:

Just in case, cc @nikola

BR, Yaro

Thanks for reporting! I canโ€™t reproduce this right now so can you share some queries where you had this issue occur?

1 Like

:thinking: I cannot seem to replicate this today but on Sunday it happened with every query. Lately, the search now and then ceases to work either but without a HTTP 500 error code. :person_shrugging: I am unable to make out any other trigger than request timing. Try to throttle and increase latency when testing. Make sure you test the complete website not just the search separately.

Just now, I got a HTTP 500 error code again:

{
  "log": {
    "version": "1.2",
    "creator": {
      "name": "Firefox",
      "version": "94.0"
    },
    "browser": {
      "name": "Firefox",
      "version": "94.0"
    },
    "pages": [
      {
        "startedDateTime": "2023-09-05T13:06:52.523+02:00",
        "id": "page_1",
        "title": "Mapillary",
        "pageTimings": {
          "onContentLoad": -3695860,
          "onLoad": -3689077
        }
      }
    ],
    "entries": [
      {
        "pageref": "page_1",
        "startedDateTime": "2023-09-05T13:06:53.958+02:00",
        "request": {
          "bodySize": 0,
          "method": "GET",
          "url": "https://graph.mapillary.com/location_search?query=9%20olimpi&access_token=MLY|4223665974375089|d62822dd792b6a823d0794ef26450398&locale=en_US",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Host",
              "value": "graph.mapillary.com"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (X11; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0"
            },
            {
              "name": "Accept",
              "value": "application/json, text/plain, */*"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip, deflate, br"
            },
            {
              "name": "Origin",
              "value": "https://www.mapillary.com"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Sec-Fetch-Dest",
              "value": "empty"
            },
            {
              "name": "Sec-Fetch-Mode",
              "value": "cors"
            },
            {
              "name": "Sec-Fetch-Site",
              "value": "same-site"
            }
          ],
          "cookies": [],
          "queryString": [
            {
              "name": "query",
              "value": "9 olimpi"
            },
            {
              "name": "access_token",
              "value": "MLY|4223665974375089|d62822dd792b6a823d0794ef26450398"
            },
            {
              "name": "locale",
              "value": "en_US"
            }
          ],
          "headersSize": 457
        },
        "response": {
          "status": 500,
          "statusText": "Internal Server Error",
          "httpVersion": "HTTP/1.1",
          "headers": [
            {
              "name": "Content-Encoding",
              "value": "br"
            },
            {
              "name": "Vary",
              "value": "Origin"
            },
            {
              "name": "Vary",
              "value": "Accept-Encoding"
            },
            {
              "name": "x-app-usage",
              "value": "{\"call_volume\":0,\"cpu_time\":0}"
            },
            {
              "name": "Content-Type",
              "value": "application/json; charset=UTF-8"
            },
            {
              "name": "WWW-Authenticate",
              "value": "OAuth \"Facebook Platform\" \"unknown_error\" \"An unexpected error has occurred. Please retry your request later.\""
            },
            {
              "name": "mapillary-api-version",
              "value": "v1.0"
            },
            {
              "name": "Access-Control-Allow-Origin",
              "value": "*"
            },
            {
              "name": "Strict-Transport-Security",
              "value": "max-age=31536000; preload; includeSubDomains"
            },
            {
              "name": "Pragma",
              "value": "no-cache"
            },
            {
              "name": "Cache-Control",
              "value": "no-store"
            },
            {
              "name": "Expires",
              "value": "Sat, 01 Jan 2000 00:00:00 GMT"
            },
            {
              "name": "x-fb-request-id",
              "value": "A8qqL8kcwnavP2AiRLXEHwV"
            },
            {
              "name": "x-fb-trace-id",
              "value": "HYiAuNB5Pxg"
            },
            {
              "name": "x-fb-rev",
              "value": "1008438023"
            },
            {
              "name": "X-FB-Debug",
              "value": "7WutPiCLn/cuB+7BbZ/GauccVymhdUfvSEQ+pyCJ3h+bBgKeTA0b77zeLozN26lIJJy9gfxBXyAih+6XJ5zfcg=="
            },
            {
              "name": "Date",
              "value": "Tue, 05 Sep 2023 11:06:56 GMT"
            },
            {
              "name": "Alt-Svc",
              "value": "h3=\":443\"; ma=86400"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Content-Length",
              "value": "169"
            }
          ],
          "cookies": [],
          "content": {
            "mimeType": "application/json; charset=UTF-8",
            "size": 232,
            "text": "{\n   \"error\": {\n      \"message\": \"An unexpected error has occurred. Please retry your request later.\",\n      \"type\": \"OAuthException\",\n      \"is_transient\": true,\n      \"code\": 2,\n      \"fbtrace_id\": \"A8qqL8kcwnavP2AiRLXEHwV\"\n   }\n}"
          },
          "redirectURL": "",
          "headersSize": 836,
          "bodySize": 1005
        },
        "cache": {},
        "timings": {
          "blocked": 66,
          "dns": 0,
          "connect": 22,
          "ssl": 34,
          "send": 0,
          "wait": 2507,
          "receive": 0
        },
        "time": 2629,
        "_securityState": "secure",
        "serverIPAddress": "157.240.27.18",
        "connection": "443"
      }
    ]
  }
}
 system   SERVER ERROR: 500 Internal Server Error  Object { error: {โ€ฆ} } main.ea19a26694fd7fa2.js:1:551355