Skip to content

[BUG] Inline clientside_callback scripts not found in Dash 2.9.2 #2488

@RenaudLN

Description

@RenaudLN

Environment

dash 2.9.2 

Describe the bug

In Dash 2.9.2, the clientside callbacks defined inline get a random function name which seems to break. Note: the issue solves itslef when refreshing the page, however every first load triggers this issue. Tested in 2.9.1 and this does not happen, it was introduced with the random function names in 2.9.2.

Using a deterministic function name instead solves the issue:

import itertools COUNTER = itertools.count() def register_clientside_callback(...): ... increment = next(COUNTER) function_name = f"inline-script-{increment:06d}" ...

Expected behavior

The clientside_callbacks defined inline should work from the first load.

Screenshots

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions