# ERROR in app: Exception on /\_dash-update-component

**URL:** <https://community.plotly.com/t/error-in-app-exception-on-dash-update-component/21717>\
**Category:** Dash Python\
**Created:** [April 1, 2019, 3:31pm UTC](https://community.plotly.com/t/error-in-app-exception-on-dash-update-component/21717 "2019-04-01T15:31:19Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![chiroptical](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/chiroptical/32/1624_2.png) [@chiroptical](https://community.plotly.com/u/chiroptical)\
**Post date:** [April 1, 2019, 3:31pm UTC](https://community.plotly.com/t/error-in-app-exception-on-dash-update-component/21717/1 "2019-04-01T15:31:19Z")

</div>

I believe I am facing a similar issue to [https://github.com/plotly/dash/issues/642](https://github.com/plotly/dash/issues/642)

Basically, it seems like I have an “old” client making requests against the new application. Is there any way to deal with this without asking folks to refresh their browsers?

The application is working as expected locally inside the same docker container.

---

<div class="post-metadata">

**Author:** ![Damian](https://avatars.discourse-cdn.com/v4/letter/d/34f0e0/32.png) [@Damian](https://community.plotly.com/u/Damian)\
**Post date:** [April 1, 2019, 4:35pm UTC](https://community.plotly.com/t/error-in-app-exception-on-dash-update-component/21717/2 "2019-04-01T16:35:22Z")

</div>

> [@chiroptical](#):
>
> Basically, it seems like I have an “old” client making requests against the new application. Is there any way to deal with this without asking folks to refresh their browsers?

The browser needs to be refreshed one way or another.

One idea I have is to have a callback that is consistent across all my application versions that once an hour checks the version number of my application. If the version number has increased it displays a warning to the user to refresh the web page, or it could even update the `dcc.Link` component to force the page to be refreshed.

But I haven’t implemented this yet. If I get a simple example working I’ll try and share the code somewhere if someone hasn’t already done something similar.

---

<div class="post-metadata">

**Author:** ![chiroptical](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/chiroptical/32/1624_2.png) [@chiroptical](https://community.plotly.com/u/chiroptical)\
**Post date:** [April 1, 2019, 6:18pm UTC](https://community.plotly.com/t/error-in-app-exception-on-dash-update-component/21717/3 "2019-04-01T18:18:57Z")

</div>

That is an interesting idea. I’ll see if I can get something like that working.

---

<div class="post-metadata">

**Author:** ![chiroptical](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/chiroptical/32/1624_2.png) [@chiroptical](https://community.plotly.com/u/chiroptical)\
**Post date:** [April 1, 2019, 7:01pm UTC](https://community.plotly.com/t/error-in-app-exception-on-dash-update-component/21717/4 "2019-04-01T19:01:25Z")

</div>

Here’s what I did (worked locally anyway). I have a callback function,

```auto
@app.callback(
    Output("smp-graph", "figure"), [Input("interval-component", "n_intervals")]
)
def update_smp_graph(_):
    return generate_smp_figure(labels)

```

The `generate_smp_figure` function

```auto
def generate_smp_figure(labels):
    d = {"layout": cluster_plot_layout("SMP")}
    if version == "0.0.1":
        d["data"] = cluster_plot_traces(labels, to_display["smp"])
    else:
        d["data"] = refresh_your_page()
    return d

```

I started it with global `version = "0.0.1"` waited for it to update once (normal operation, which was fine). I changed the global version to `"0.0.2"` and restarted the server. When the client tried to update it triggered the `refresh_your_page` function. This seems okay.

---

<div class="post-metadata">

**Author:** ![chiroptical](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/chiroptical/32/1624_2.png) [@chiroptical](https://community.plotly.com/u/chiroptical)\
**Post date:** [April 1, 2019, 7:22pm UTC](https://community.plotly.com/t/error-in-app-exception-on-dash-update-component/21717/5 "2019-04-01T19:22:00Z")

</div>

I updated my dash dependency from 0.20.0 to 0.40.0 and had to change the structure of the app a bit so this won’t fix my current problem, but it will be a nice solution for updates moving forward.
