Callback fired several times with no trigger (dcc.Location)

Hi,

Bit of a weird one here: I use the dcc.Location div (with refresh=False) to use the URL to populate different fields in my app with default values (or values from the URL). It triggers when opening the page as expected, and when I track the context (as recommended by the doc here), I get the expected:

## URL callback 1 / triggered by:  {'url_content.search': 'url_content'}
{
  "states": {},
  "triggered": [
    {
      "prop_id": "url_content.search",
      "value": ""
    }
  ],
  "inputs": {
    "url_content.search": ""
  }
}

But immediately after, the callback fires a second time with no triggers:

## URL callback 1 / triggered by:  {}
{
  "states": {},
  "triggered": [],
  "inputs": {
    "url_content.search": ""
  }
}

And this happens again (fires and update output but no trigger) when I change some other dropdowns in the form.

This is a new issue when updating dash from 1.4.1 to 2.9.3 (it worked fine before).

So 2 questions:

  • do you know why a callback would fire without trigger?
  • do you know how to find out why it fired if the ctx values are all empty?

Sorry I haven’t been able to replicate it in a minimal example, but the full code can be found in these files (here and here ) : fillInFromURL is the callback firing all the time, especially when the platform and location dropdowns are touched)

Any help much appreciated!

EDIT: a way to go around that is to add this at the start of the trigger-happy callback…but that’s not a very clean solution:

if ctx.triggered_id is None:
        raise PreventUpdate