# Two (legacy?) bugs

**URL:** <https://forums.balena.io/t/two-legacy-bugs/372558>\
**Category:** balenaHub\
**Created:** [November 29, 2024, 3:05am UTC](https://forums.balena.io/t/two-legacy-bugs/372558 "2024-11-29T03:05:39Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![SplitIce](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@SplitIce](https://forums.balena.io/u/SplitIce)\
**Post date:** [November 29, 2024, 3:05am UTC](https://forums.balena.io/t/two-legacy-bugs/372558/1 "2024-11-29T03:05:39Z")

</div>

1. 

Attempting to perform a container update fails (e.g change an env var) state is eventually in sync when the device queries the API. When troubleshooting I see the issue:

```auto
02:52:47.628462 IP 52.4.252.97.45211 > 10.240.24.217.48484: Flags [P.], seq 1:389, ack 1, win 502, options [nop,nop,TS val 2164788653 ecr 2866573106], length 388
E.....@....E4..a
......d......
x....V......
......o2POST /v1/update?apikey=REMOVEDHTTP/1.1
host: REMOVED.balena:48484
content-length: 0
sentry-trace: c1a85d87c13905a7d3939da6506d0885-f025dbd275cefd2a
baggage: sentry-environment=production,sentry-release=82.18.12,sentry-public_key=REMOVED,sentry-trace_id=c1a85d87c13905a7d3939da6506d0885
Connection: close

02:52:47.628644 IP 10.240.24.217.48484 > 52.4.252.97.45211: Flags [.], ack 389, win 857, options [nop,nop,TS val 2866573450 ecr 2164788653], length 0
E..4E.@.@...
...4..a.d....
x...}...Y-......
..p....
02:52:47.831997 IP 10.240.24.217.48484 > 52.4.252.97.45211: Flags [P.], seq 1:287, ack 389, win 857, options [nop,nop,TS val 2866573653 ecr 2164788653], length 286
E..RE.@.@...
...4..a.d....
x...}...Y.......
..qU....HTTP/1.1 503 Service Unavailable
Content-Type: application/json; charset=utf-8
Content-Length: 85
ETag: W/"55-tt/tIuAlRrQZdMEAD8xbBQwnB7o"
Date: Fri, 29 Nov 2024 02:52:47 GMT
Connection: close

{"status":"failed","message":"Cannot read properties of undefined (reading 'force')"}

```

1. Its currently not possible to convert legacy devices to classic (its been this way for years). You can click the link but the device remains legacy.

---

<div class="post-metadata">

**Author:** ![thgreasi](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thgreasi/32/454_2.png) [@thgreasi](https://forums.balena.io/u/thgreasi)\
**Post date:** [November 29, 2024, 3:51pm UTC](https://forums.balena.io/t/two-legacy-bugs/372558/2 "2024-11-29T15:51:08Z")

</div>

Hi,  
Can you clarify what OS & supervisor version is your device running?  
Can you give an exact example of what you mean as a container update? For example are you trying to set an env var via the device environment variables page?  
Can you also provide a screenshot from what you see on our dashboard?  
In general switching Legacy fleets to Classic is allowed, but it’s necessary that all devices of the fleet to be running at least balenaOS v2.0.3.

---

<div class="post-metadata">

**Author:** ![SplitIce](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@SplitIce](https://forums.balena.io/u/SplitIce)\
**Post date:** [December 2, 2024, 12:36am UTC](https://forums.balena.io/t/two-legacy-bugs/372558/3 "2024-12-02T00:36:53Z")

</div>

1. The OS and supervisor version is not relevant to the request generated by your balena cloud end. However we are running supervisor v16.7.7 and balenaOS 6.0.25 .

2. Any variable or container change that triggers `/v1/update` I diagnosed the issue using environment variables. We patched our supervisor build to work to work around your issue in the mean time ([https://img.x4b.org/2024-12/GitHubDesktop\_2024-12-02\_11-36-36.png](https://img.x4b.org/2024-12/GitHubDesktop_2024-12-02_11-36-36.png))

3. You can click this ([https://img.x4b.org/2024-12/chrome\_2024-12-02\_11-33-58.png](https://img.x4b.org/2024-12/chrome_2024-12-02_11-33-58.png)) and follow the process until its “sucessful” (as per the toast) however it never actaully does it. It’s still a legacy fleet. Its been this way for at-least a year (its been a non issue for us and we figured you would recognise the issue and fix it at some point).

---

<div class="post-metadata">

**Author:** ![thgreasi](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thgreasi/32/454_2.png) [@thgreasi](https://forums.balena.io/u/thgreasi)\
**Post date:** [December 2, 2024, 5:24pm UTC](https://forums.balena.io/t/two-legacy-bugs/372558/4 "2024-12-02T17:24:49Z")

</div>

Hi,  
Do you mean that even using [dashboard.balena-cloud.com](http://dashboard.balena-cloud.com) to set a fleet variable leads to this error on your devices? Also, do you face this issue on all devices of your fleet?

Unfortunately I wasn’t able to reproduce the issue on my side. I created a new legacy RaspberryPi3 fleet and provisioned a device with balenaOS 6.0.23. I was then able to create a fleet environment variable from the dashboard’s page and was able to see the hournalctl logs on the device report that it was properly picked up:

 ![image](https://global.discourse-cdn.com/balena/original/2X/4/439a9fa4627d661727adb2b6953e0e177bc558a6.png)

Would you mind opening a pull request with your fix on our balena-supervisor repository so that you also get the credits for it?

> **[GitHub - balena-os/balena-supervisor: Balena Supervisor: balena's agent on devices.](https://github.com/balena-os/balena-supervisor)**
>
> Balena Supervisor: balena's agent on devices.

---

<div class="post-metadata">

**Author:** ![SplitIce](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@SplitIce](https://forums.balena.io/u/SplitIce)\
**Post date:** [December 3, 2024, 1:37am UTC](https://forums.balena.io/t/two-legacy-bugs/372558/5 "2024-12-03T01:37:47Z")

</div>

This is not a fix that should be made in supervisor!

Thats a balena cloud bug, look at the provided tcpdump (there is no body). All I have implemented is a workaround.

---

<div class="post-metadata">

**Author:** ![SplitIce](https://avatars.discourse-cdn.com/v4/letter/s/c5a1d2/32.png) [@SplitIce](https://forums.balena.io/u/SplitIce)\
**Post date:** [March 20, 2025, 12:02am UTC](https://forums.balena.io/t/two-legacy-bugs/372558/6 "2025-03-20T00:02:56Z")

</div>

Regarding bug 2, heres a screen recording. To this day it remains impossible for us to upgrade from a legacy app.

![](https://global.discourse-cdn.com/balena/original/2X/9/914817437d3301e58ae416af80b3dcfd584ed408.gif)

And yes there is a page refresh at the end to make sure the client side isnt caching the fleet type.

---

<div class="post-metadata">

**Author:** ![myarmolinsky](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@myarmolinsky](https://forums.balena.io/u/myarmolinsky)\
**Post date:** [March 20, 2025, 11:11am UTC](https://forums.balena.io/t/two-legacy-bugs/372558/7 "2025-03-20T11:11:54Z")

</div>

Hello, in your video I see that your fleet type is already `Classic` (which is a legacy fleet type) and in the dialog you select `Classic`. Can you please try selecting `Microservices`, the non-legacy fleet type?

---

<div class="post-metadata">

**Author:** ![thgreasi](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thgreasi/32/454_2.png) [@thgreasi](https://forums.balena.io/u/thgreasi)\
**Post date:** [March 20, 2025, 3:30pm UTC](https://forums.balena.io/t/two-legacy-bugs/372558/8 "2025-03-20T15:30:36Z")

</div>

> [@SplitIce](#):
>
> `{"status":"failed","message":"Cannot read properties of undefined (reading 'force')"}`

Could you clarify where you captured this error from?  
I wasn’t able to reproduce the issue. I tried creating or updating a device env var in `https://dashboard.balena-cloud.com/devices/<UUID>/envvars` and no such error showed up in `journalctl -fn 100 -au balena-supervisor`. Instead of that the supervisor logged:

```auto
[api] GET /v1/healthy 200 - 14.784 ms
[event] Event: Update notification {}
[api] POST /v1/update 204 - 25.202 ms
[info] Applying target state

```

and my application containers were restarted right away and after SSHing into them I was able to run `env | grep mytestvar` and see the updated value right away.  
For reference I even tried this with a device running a supervisor as old as `12.11.36`.

---

<div class="post-metadata">

**Author:** ![myarmolinsky](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@myarmolinsky](https://forums.balena.io/u/myarmolinsky)\
**Post date:** [April 2, 2025, 1:15pm UTC](https://forums.balena.io/t/two-legacy-bugs/372558/9 "2025-04-02T13:15:43Z")

</div>

Hey @SplitIce , just following up. Have you had a chance to try switching your fleet to `Microservices` as I suggested? Also can you please clarify where you captured the error in your original message from? As we were not able to reproduce the issue.

---

<div class="post-metadata">

**Author:** ![marketta\_robinson62](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@marketta\_robinson62](https://forums.balena.io/u/marketta_robinson62)\
**Post date:** [July 26, 2026, 10:50am UTC](https://forums.balena.io/t/two-legacy-bugs/372558/10 "2026-07-26T10:50:40Z")

</div>

That tcpdump gives it away — the POST to /v1/update goes out with content-length: 0, no body at all. The supervisor reads body.force to handle update locks and just throws when nothing’s there. If you’re calling the API directly, sending {“force”: false} as the body gets past it; if the dashboard is triggering this, thats a cloud-side bug that needs fixing upstream. Did a longer breakdown of both issues here: [balenaCloud: Fixing the /v1/update 503 Error and Legacy Fleet Conversion Bug - Port & Patch](https://portandpatch.com/uncategorized/balenacloud-v1-update-503-error-legacy-fleet-conversion/)

---

<div class="post-metadata">

**Author:** ![MarcieChapman](https://avatars.discourse-cdn.com/v4/letter/m/a698b9/32.png) [@MarcieChapman](https://forums.balena.io/u/MarcieChapman)\
**Post date:** [July 26, 2026, 4:53pm UTC](https://forums.balena.io/t/two-legacy-bugs/372558/11 "2026-07-26T16:53:36Z")

</div>

Your packet capture gives it away — content-length: 0 on that POST means no body was sent. The supervisor tries to read force off the parsed body object, but with an empty body it ends up undefined, which is your 503. Setting BALENA\_SUPERVISOR\_OVERRIDE\_LOCK=1 in device config vars sidesteps it reliably. Wrote up both bugs in more detail here: [Debugging balenaCloud: The /v1/update 503 Bug and the Stuck Legacy-to-Classic Conversion - Port & Patch](https://portandpatch.com/uncategorized/balenacloud-v1-update-503-legacy-device-conversion/)
