# RefApp 3.6.0 — stock management "Add user role scope" silently fails (frontend calls user-scopes, backend has no such resource)

**URL:** <https://talk.openmrs.org/t/refapp-3-6-0-stock-management-add-user-role-scope-silently-fails-frontend-calls-user-scopes-backend-has-no-such-resource/49830>\
**Category:** Reference App\
**Created:** [July 24, 2026, 9:04am UTC](https://talk.openmrs.org/t/refapp-3-6-0-stock-management-add-user-role-scope-silently-fails-frontend-calls-user-scopes-backend-has-no-such-resource/49830 "2026-07-24T09:04:09Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jenspederrasmussen](https://talk.openmrs.org/letter_avatar/jenspederrasmussen/32/5_5575768a8748004e209b776fc1b2916d.png) [@jenspederrasmussen](https://talk.openmrs.org/u/jenspederrasmussen)\
**Post date:** [July 24, 2026, 9:04am UTC](https://talk.openmrs.org/t/refapp-3-6-0-stock-management-add-user-role-scope-silently-fails-frontend-calls-user-scopes-backend-has-no-such-resource/49830/1 "2026-07-24T09:04:09Z")

</div>

Hi all,

On a fresh Reference Application 3.6.0 Docker distro (pinned TAG=3.6.0, so frontend/backend/gateway are all 3.6.0), I can’t save a user-role scope in Stock Management. The dialog closes without an error, but nothing is saved and the table stays empty.

Digging into it, the stock-management frontend calls:

```auto
GET/POST /openmrs/ws/rest/v1/stockmanagement/user-scopes

```

but the backend responds:

```auto
Unknown resource: v1/stockmanagement/user-scopes

```

The backend image bundles stockmanagement 3.0.0 (the latest release on GitHub). A code search of openmrs-module-stockmanagement returns zero matches for “user-scopes” anywhere in the module — the resource it actually exposes is userrolescope, which works fine when hit directly. So the 3.6.0 frontend appears to be calling an endpoint (user-scopes) that no released backend implements.

My question: which stockmanagement backend and esm-stock-management-app frontend versions are meant to be paired in RefApp 3.6.0? It looks like the bundled frontend is ahead of the bundled backend’s API. Is there a newer backend build I should be using, or should I pin the frontend module to an earlier version that still calls userrolescope?

Thanks!

---

<div class="post-metadata">

**Author:** ![josephkagimu1](https://talk.openmrs.org/user_avatar/talk.openmrs.org/josephkagimu1/32/22262_2.png) [@josephkagimu1](https://talk.openmrs.org/u/josephkagimu1)\
**Post date:** [July 24, 2026, 10:41am UTC](https://talk.openmrs.org/t/refapp-3-6-0-stock-management-add-user-role-scope-silently-fails-frontend-calls-user-scopes-backend-has-no-such-resource/49830/2 "2026-07-24T10:41:39Z")

</div>

Hi @jenspederrasmussen,

The current `openmrs-esm-stock-management` source uses `/stockmanagement/userrolescope` consistently — not `/user-scopes`. You can verify in [`stock-user-role-scopes.resource.ts`](https://github.com/openmrs/openmrs-esm-stock-management/blob/HEAD/src/stock-user-role-scopes/stock-user-role-scopes.resource.ts).

If your network tab shows calls to `/user-scopes`, likely causes:

1. **Stale cached assets** — Hard refresh (`Ctrl+Shift+R`) or restart the gateway container.

2. **Frontend version mismatch** — Check which version is actually loaded by inspecting `/openmrs/spa/importmap.json` for the stock management entry. You can also check in the browser console:

3. **Distro packaging issue** — If a pre-release build briefly used `user-scopes` before reverting, and the 3.6.0 distro pinned that version, that would explain the mismatch.

**Workaround:** Override the frontend module version in your import map to a known-good version, or raise this on [`openmrs-distro-referenceapplication`](https://github.com/openmrs/openmrs-distro-referenceapplication) if confirmed as a packaging bug.

Sharing the exact frontend version from your import map would help confirm the root cause.

---

<div class="post-metadata">

**Author:** ![jenspederrasmussen](https://talk.openmrs.org/letter_avatar/jenspederrasmussen/32/5_5575768a8748004e209b776fc1b2916d.png) [@jenspederrasmussen](https://talk.openmrs.org/u/jenspederrasmussen)\
**Post date:** [July 24, 2026, 11:25am UTC](https://talk.openmrs.org/t/refapp-3-6-0-stock-management-add-user-role-scope-silently-fails-frontend-calls-user-scopes-backend-has-no-such-resource/49830/3 "2026-07-24T11:25:46Z")

</div>

Thanks Joseph.

Confirmed from `importmap.json`: the loaded frontend is `@openmrs/esm-stock-management-app` **3.2.0** , while the backend bundles stockmanagement **3.0.0**. So it’s a newer-frontend / older-backend mismatch — the 3.2.0 frontend calls `/stockmanagement/user-scopes`, which the 3.0.0 backend doesn’t implement (it has `userrolescope`). This is on a clean RefApp 3.6.0 distro (`TAG=3.6.0`), nothing custom on the stock-management versions. Looks like a distro packaging mismatch. Which frontend version would you recommend pinning to match backend 3.0.0 — or should this be raised on `openmrs-distro-referenceapplication`?

Best regards,

Jens Peder

---

<div class="post-metadata">

**Author:** ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)\
**Post date:** [July 24, 2026, 2:36pm UTC](https://talk.openmrs.org/t/refapp-3-6-0-stock-management-add-user-role-scope-silently-fails-frontend-calls-user-scopes-backend-has-no-such-resource/49830/4 "2026-07-24T14:36:37Z")

</div>

The 3.0.0 stockmanagement backend uses [/userscoperoles](https://github.com/openmrs/openmrs-module-stockmanagement/blob/604e352489e54ba172de7d4a81fc3fdfad76a266/omod/src/main/java/org/openmrs/module/stockmanagement/web/resource/UserRoleScopeResource.java#L30). The 3.2.0 frontend API calls [/userscoperoles](https://github.com/openmrs/openmrs-esm-stock-management/blob/7441184c5375a928176bed81d7a0f16e9a5923cb/src/stock-user-role-scopes/stock-user-role-scopes.resource.ts#L11).

I can’t find the string `user-scopes` in the frontend code at all, never mind it making a request. It would be helpful if you can describe the steps you’re taking in the application that produces that failing request.

---

<div class="post-metadata">

**Author:** ![jenspederrasmussen](https://talk.openmrs.org/letter_avatar/jenspederrasmussen/32/5_5575768a8748004e209b776fc1b2916d.png) [@jenspederrasmussen](https://talk.openmrs.org/u/jenspederrasmussen)\
**Post date:** [July 27, 2026, 12:52pm UTC](https://talk.openmrs.org/t/refapp-3-6-0-stock-management-add-user-role-scope-silently-fails-frontend-calls-user-scopes-backend-has-no-such-resource/49830/5 "2026-07-27T12:52:58Z")

</div>

Sorry Folks I’m not up running yet. Let me try to describe in steps what I am doing.

1. I use the Openmrs reference from docker version 3.7.0
2. In the Locations Management in OpenMRS Legacy Admin I see a location Main Store and a Location Main Pharmacy
3. I created a User **Carl** as a Provider with the following roles: ![image](https://talk.openmrs.org/uploads/default/original/3X/a/b/ab675026ef5c8b3aa702e787455911e0b416ed05.png)
4. I create two items in the stock Management tool:

 ![image](https://talk.openmrs.org/uploads/default/original/3X/2/8/281961462a6c86301720c0662c82eadde08afba6.png)

1. I created a Source:

 ![image](https://talk.openmrs.org/uploads/default/original/3X/1/c/1cce223882376d7cc2e745b013e3a9efd8f93976.png)

1. In User Role Scopes I define **Carl**

 ![image](https://talk.openmrs.org/uploads/default/original/3X/f/8/f84f1fadde11a5ead02be0579e2e0a4c959b8e04.png)

1. in Operations I start a New Operation and selects Receipt to set the initial value on Ibuprofen

 ![image](https://talk.openmrs.org/uploads/default/original/3X/8/6/8609afe231061e4768542115c2ce85b276ef0342.png)

I define the initial stock for Ibuprofen:

 ![image](https://talk.openmrs.org/uploads/default/original/3X/7/f/7f45d4765f6cf1a1fc62ab2d28b4d80b5bf0ed52.png)

and Pres Save

 ![image](https://talk.openmrs.org/uploads/default/original/3X/d/5/d508d9afbd80aeb15addafba9f69d668e9025156.png)

Pressing Next:

 ![image](https://talk.openmrs.org/uploads/default/original/3X/c/d/cd3313cb61f261e6665a31d0954eeb44f482e987.png)

I select No

 ![image](https://talk.openmrs.org/uploads/default/original/3X/f/0/f07c2816aebe6417d60f5305466169710267a46d.png)

When I Press Complete: I get this:

 ![image](https://talk.openmrs.org/uploads/default/original/3X/3/8/386bb4b73cf4a5c6909667ecf3d5d9d36c9f8ad1.png)

 ![image](https://talk.openmrs.org/uploads/default/original/3X/b/7/b74101a89b708b04c3c0d67eec16dbe10eb7c07d.png)

Looking into the Browser Developer tool under Network:

 ![image](https://talk.openmrs.org/uploads/default/original/3X/4/7/470da2e28a3b255213db0f4007f47fe55090af53.png)

 ![image](https://talk.openmrs.org/uploads/default/original/3X/1/4/149cb28dc3d65a171aaab3a1943d255deef03916.png)

 ![image](https://talk.openmrs.org/uploads/default/original/3X/d/8/d87d3b47f6ed601852779d9c7860fe8348a24176.png)

 ![image](https://talk.openmrs.org/uploads/default/original/3X/a/6/a68c144b42640d81140c91bde3152a6bc9cc352a.png)

The result is that I never gets out of the screen Submit/Complete and thereby don’t get the operation completed.

I observed, that the Payload has a destinationUuid: "c7ac3a68-fd4f-4874-bb26-8fde27b54a9a When I look in the Openmrs Location Management under Main Store the Uuid for that location is:19dbe2c0-289d-11ed-bdcb-507b9dea1806

I may be a wild guess but I assumed that the two Uuids should be the same.

Can you help me to clarify what I am doing wrong and why I can’t get the Stockmanagement tool to work. Best Regards, Jens Peder
