# Mender dashboard : 404 on /inventory/filters and /api/management/v1/useradm/roles causing accepting device and deprovisionning fails

**URL:** <https://hub.mender.io/t/mender-dashboard-404-on-inventory-filters-and-api-management-v1-useradm-roles-causing-accepting-device-and-deprovisionning-fails/2857>\
**Category:** General Discussions\
**Created:** [November 19, 2020, 9:23am UTC](https://hub.mender.io/t/mender-dashboard-404-on-inventory-filters-and-api-management-v1-useradm-roles-causing-accepting-device-and-deprovisionning-fails/2857 "2020-11-19T09:23:31Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jerry](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/jerry/32/931_2.png) [@Jerry](https://hub.mender.io/u/Jerry)\
**Post date:** [November 19, 2020, 9:23am UTC](https://hub.mender.io/t/mender-dashboard-404-on-inventory-filters-and-api-management-v1-useradm-roles-causing-accepting-device-and-deprovisionning-fails/2857/1 "2020-11-19T09:23:31Z")

</div>

Since i upgraded to mender 2.5, i cannot accept/refuse/dismiss a device (nor can i decomission).  
I noticed that i get 404 error on console with theses 2 calls :

[https://mender.mapado.net/api/management/v2/inventory/filters](https://mender.mapado.net/api/management/v2/inventory/filters)  
[https://mender.mapado.net/api/management/v1/useradm/roles](https://mender.mapado.net/api/management/v1/useradm/roles)

Any advice ?  
Regards

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [November 19, 2020, 9:27am UTC](https://hub.mender.io/t/mender-dashboard-404-on-inventory-filters-and-api-management-v1-useradm-roles-causing-accepting-device-and-deprovisionning-fails/2857/2 "2020-11-19T09:27:51Z")

</div>

Are you using the Open Source version of the Server?

> [https://mender.mapado.net/api/management/v2/inventory/filters](https://mender.mapado.net/api/management/v2/inventory/filters)  
> [https://mender.mapado.net/api/management/v1/useradm/roles](https://mender.mapado.net/api/management/v1/useradm/roles)

These services are not available on the Open Source server, so not sure what is going on.

Do you see any other errors?

@mzedel @tranchitella, might be able to shed some light on this.

---

<div class="post-metadata">

**Author:** ![Jerry](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/jerry/32/931_2.png) [@Jerry](https://hub.mender.io/u/Jerry)\
**Post date:** [November 19, 2020, 9:38am UTC](https://hub.mender.io/t/mender-dashboard-404-on-inventory-filters-and-api-management-v1-useradm-roles-causing-accepting-device-and-deprovisionning-fails/2857/3 "2020-11-19T09:38:17Z")

</div>

Yes, i’m using community server (i pulled the 2.5 tag version of [https://github.com/mendersoftware/integration](https://github.com/mendersoftware/integration))

When i try to dissmiss on device, i get an error :  
“There was a problem updating the device authorization status: Cannot read property ‘status’ of undefined…”  
This call is cancelled in console :  
[https://mender.mapado.net/api/management/v2/devauth/devices/5fad698e3077640001363a62/auth/b9993ddd-8093-4973-b6b2-f7abe2dc07b9](https://mender.mapado.net/api/management/v2/devauth/devices/5fad698e3077640001363a62/auth/b9993ddd-8093-4973-b6b2-f7abe2dc07b9)

Another thing (perhaps all comes from same bug) : i have a “pending” device waiting for approval (i see (1) on pending tab. But when open the pending tag, there is nothing in it.

---

<div class="post-metadata">

**Author:** ![tranchitella](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/tranchitella/32/606_2.png) [@tranchitella](https://hub.mender.io/u/tranchitella)\
**Post date:** [November 19, 2020, 9:47am UTC](https://hub.mender.io/t/mender-dashboard-404-on-inventory-filters-and-api-management-v1-useradm-roles-causing-accepting-device-and-deprovisionning-fails/2857/4 "2020-11-19T09:47:35Z")

</div>

Hello @Jerry, you can ignore the 404 error codes for those API calls: the UI detects if those features are available in the back-end (opensource vs. enterprise), no harm there.

Can you please try to follow these instructions?

> [@Mender 2.5.0 Problems with Filters, Hostnames and More](https://hub.mender.io/t/mender-2-5-0-problems-with-filters-hostnames-and-more/2683/2):
>
> Hi @ckelloug2, thanks for using Mender and I’m sorry to hear 2.5.0 is causing issues for you. Can you please try entering the deviceauth container, e.g. running: $ docker exec -it \<name of your deviceauth container\> sh Then, from the container, you can run: $ deviceauth propagate-inventory $ deviceauth propagate-inventory-statuses $ deviceauth propagate-inventory-id-data This will sync all inventory, statuses and identity\_data attributes from deviceauth to inventory. Please let us know if…

---

<div class="post-metadata">

**Author:** ![Jerry](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/jerry/32/931_2.png) [@Jerry](https://hub.mender.io/u/Jerry)\
**Post date:** [November 19, 2020, 10:03am UTC](https://hub.mender.io/t/mender-dashboard-404-on-inventory-filters-and-api-management-v1-useradm-roles-causing-accepting-device-and-deprovisionning-fails/2857/5 "2020-11-19T10:03:11Z")

</div>

The command “deviceauth propagate-inventory” gave me a lot of 404 errors like :

> INFO[2020-11-19T09:57:28Z] propagating device 5fb3cd3b3077640001364606 file=entry.go func=“logrus.(\*Entry).Infof” line=346  
> ERRO[2020-11-19T09:57:28Z] request PATCH [http://mender-inventory:8080/api/internal/v2/inventory/devices/5fb3cd3b3077640001364606](http://mender-inventory:8080/api/internal/v2/inventory/devices/5fb3cd3b3077640001364606) failed with status 404 Not Found, response: {“error”:“Resource not found”} file=entry.go func=“logrus.(\*Entry).Errorf” line=362  
> ERRO[2020-11-19T09:57:28Z] FAILED: PATCH [http://mender-inventory:8080/api/internal/v2/inventory/devices/5fb3cd3b3077640001364606](http://mender-inventory:8080/api/internal/v2/inventory/devices/5fb3cd3b3077640001364606) request failed with status 404 Not Found file=entry.go func=“logrus.(\*Entry).Errorf” line=362

The two others did well.  
When i got back to dashboard, i can see the missing device in “pending” but when i clic on it, i got this :

![mender-error](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/4dd1e0b8703072ecff5d99b5ecc6c6c4e380ced8.png)

---

<div class="post-metadata">

**Author:** ![Jerry](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/jerry/32/931_2.png) [@Jerry](https://hub.mender.io/u/Jerry)\
**Post date:** [November 19, 2020, 10:11am UTC](https://hub.mender.io/t/mender-dashboard-404-on-inventory-filters-and-api-management-v1-useradm-roles-causing-accepting-device-and-deprovisionning-fails/2857/6 "2020-11-19T10:11:54Z")

</div>

I tried to make it workd be force refreshing page (F5).  
I “accepted” the pending device and got this error in console :  
 ![mender-error2](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/85d8c1aae4b3ea751be37be4aef0727189cae781.png)

The device is kept on a “pending” state “Waiting for inventory data from the device”

---

<div class="post-metadata">

**Author:** ![Jerry](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/jerry/32/931_2.png) [@Jerry](https://hub.mender.io/u/Jerry)\
**Post date:** [November 20, 2020, 9:04am UTC](https://hub.mender.io/t/mender-dashboard-404-on-inventory-filters-and-api-management-v1-useradm-roles-causing-accepting-device-and-deprovisionning-fails/2857/7 "2020-11-20T09:04:52Z")

</div>

@tranchitella @ckelloug2 : new information that can help you diagnose :  
When i “accept” a device, the authorization modal is kept open but the device is “accepted” (as you can see in capture below).

If i refresh the page, the corresponding device stays in the “pending” view, even if it is accepted.  
If i launch the 3 following commands in docker, the device disapear from “pending” and move to main list  
deviceauth propagate-inventory  
deviceauth propagate-inventory-statuses  
deviceauth propagate-inventory-id-data

Thanks for your help

 ![accepted](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/1X/4336542d84929d587aa8711218a4dface0a14499.png)

---

<div class="post-metadata">

**Author:** ![Jerry](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/jerry/32/931_2.png) [@Jerry](https://hub.mender.io/u/Jerry)\
**Post date:** [November 24, 2020, 2:20pm UTC](https://hub.mender.io/t/mender-dashboard-404-on-inventory-filters-and-api-management-v1-useradm-roles-causing-accepting-device-and-deprovisionning-fails/2857/8 "2020-11-24T14:20:51Z")

</div>

@mirzak i rebuilded installation from scratch restoring data from backup and i still have above error with 2.5.0 (community)  
Do you have any advice / fix to help me deploy artifacts again ?  
Thank you very much for your help

---

<div class="post-metadata">

**Author:** ![Jerry](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/jerry/32/931_2.png) [@Jerry](https://hub.mender.io/u/Jerry)\
**Post date:** [November 25, 2020, 2:02pm UTC](https://hub.mender.io/t/mender-dashboard-404-on-inventory-filters-and-api-management-v1-useradm-roles-causing-accepting-device-and-deprovisionning-fails/2857/9 "2020-11-25T14:02:00Z")

</div>

If someone is having the same problem : i figured out a way to fix this :  
I decommisionned all devices with the problem above by issuing manual curl calls (DELETE) on following endpoint :  
`/api/management/v2/devauth/devices/[ID OF THE DEVICE]`

Corresponding devices came back on “pending”, i accepted them and all went back to normal.  
So it seems that the corresponding entries where messed up in database
