# Artifact dependency not satisfied does run Download\_Error state scripts

**URL:** <https://hub.mender.io/t/artifact-dependency-not-satisfied-does-run-download-error-state-scripts/6304>\
**Category:** General Discussions\
**Tags:** state-scripts\
**Created:** [October 27, 2023, 9:13am UTC](https://hub.mender.io/t/artifact-dependency-not-satisfied-does-run-download-error-state-scripts/6304 "2023-10-27T09:13:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pseyfert](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@pseyfert](https://hub.mender.io/u/pseyfert)\
**Post date:** [October 27, 2023, 9:13am UTC](https://hub.mender.io/t/artifact-dependency-not-satisfied-does-run-download-error-state-scripts/6304/1 "2023-10-27T09:13:04Z")

</div>

Hi

I’m working with three state scripts. `Download_Enter_…`, `Download_Error_…` and `Download_Leave…` to ensure that upgrade processes and software running on the device don’t interfere with each other.  
(e.g. download enter: device software should stop accepting new tasks, download leave: mender client should wait here until all task queues are drained, download enter: re-enable accepting tasks.)

Now it seems to me that this does not cover all possible state transitions in and out of the download state because when sending an artifact which has some `depends` fields set, that are not satisfied by the currently installed artifact, I see in the journal

```auto
Oct 27 10:48:40 <redacted> mender[6266]: time="2023-10-27T10:48:40+02:00" level=info msg="State transition: update-fetch [Download_Enter] -> update-store [Download_Enter]"
Oct 27 10:48:41 <redacted> mender[6266]: time="2023-10-27T10:48:41+02:00" level=info msg="No public key was provided for authenticating the artifact"
Oct 27 10:48:41 <redacted> mender[6266]: time="2023-10-27T10:48:41+02:00" level=error msg="Artifact dependency \"<redacted>\" not satisfied by currently installed artifact (<redacted>)."
Oct 27 10:48:41 <redacted> mender[6266]: time="2023-10-27T10:48:41+02:00" level=info msg="State transition: update-store [Download_Enter] -> update-status-report [none]"        
Oct 27 10:48:41 <redacted> mender[6266]: time="2023-10-27T10:48:41+02:00" level=info msg="State transition: update-status-report [none] -> idle [Idle]"            

```

i.e. the incoming update gets rejected on the device (nice, that’s desired), but I don’t see that either of the `Download_Leave…` or `Download_Error` scripts get executed (`Download_Error` would be desired in my case).

This is with mender client version

```auto
3.5.1	runtime: go1.17.13

```

Quickly scrolling over [State scripts | Mender documentation](https://docs.mender.io/artifact-creation/state-scripts) I don’t see a documented transition other than `Leave` or `Error` to get out of the Download state.

Do you have any pointers for me to resume normal operations when an update gets rejected due to missing depends?

Thanks,  
Paul

---

<div class="post-metadata">

**Author:** ![pseyfert](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@pseyfert](https://hub.mender.io/u/pseyfert)\
**Post date:** [December 8, 2023, 10:49am UTC](https://hub.mender.io/t/artifact-dependency-not-satisfied-does-run-download-error-state-scripts/6304/2 "2023-12-08T10:49:27Z")

</div>

bump. anyone?

---

<div class="post-metadata">

**Author:** ![pseyfert](https://avatars.discourse-cdn.com/v4/letter/p/da6949/32.png) [@pseyfert](https://hub.mender.io/u/pseyfert)\
**Post date:** [January 18, 2024, 10:01am UTC](https://hub.mender.io/t/artifact-dependency-not-satisfied-does-run-download-error-state-scripts/6304/3 "2024-01-18T10:01:33Z")

</div>

Hi, still nobody with an idea?

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [January 18, 2024, 2:12pm UTC](https://hub.mender.io/t/artifact-dependency-not-satisfied-does-run-download-error-state-scripts/6304/4 "2024-01-18T14:12:57Z")

</div>

Hmm. Yes, this does not look right to me either.

The `Error` state should be run AFAIK.

Let me check this out a little bit. I will get back to you tomorrow.

---

<div class="post-metadata">

**Author:** ![donasmi](https://avatars.discourse-cdn.com/v4/letter/d/e68b1a/32.png) [@donasmi](https://hub.mender.io/u/donasmi)\
**Post date:** [February 7, 2024, 10:55am UTC](https://hub.mender.io/t/artifact-dependency-not-satisfied-does-run-download-error-state-scripts/6304/5 "2024-02-07T10:55:08Z")

</div>

@oleorhagen any success on this? 🙏

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [February 7, 2024, 12:26pm UTC](https://hub.mender.io/t/artifact-dependency-not-satisfied-does-run-download-error-state-scripts/6304/6 "2024-02-07T12:26:35Z")

</div>

Apologies!

Yes, this is an error, and should be fixed in the new mender-client 4.0
