I am attempting to delete an application that contains zero devices and am receiving the following:
Request error: Can't delete application(s) NNNNNN because following devices are still running releases that belong to these application(s): nnnnnnnnnnnnnnnnnnnnnnnnn
Support already has access to the application, as they were troubleshooting it.
Do you happen to know the UUID for the device(s) that used to be associated with the application? If you moved the device to a different application, for example, and it’s still somewhere in your fleet we may be able to access that.
Hi Adam. We may have to ask someone in the backend team to help here. Meanwhile, though, I thought of asking you about the “NNN…” and “nnnn…” numbers of your first message in this thread: Do you still have those numbers? The “nnnnn…” sounds like the device UUID. You could try replacing it in the following URL template, and see if the dashboard still shows anything about the device (despite it having been deleted…):
You’re absolutely correct. The error message is talking about 1c72c5576e18f3ec98defefdab15f013, which is another device in my other application. How can that be? (This is not a deleted device.)
Thanks for the additional details. Could it be that this device was moved from another application in the past? I have found an internal knowledge base entry that explains that “a bug in the API deletion system means that, when a device is moved, leftover image_install resources will be present, which stops the application being deleted due to foreign key constraints”. I have run a code snippet that was supposed to delete the image_install resources, which appears to have succeeded thanks to you having granted support access to the application. Could you try deleting the application again?
Request error: Can't delete application(s) 1661910 because following devices are still running releases that belong to these application(s): 1c72c5576e18f3ec98defefdab15f013
It is entirely possible that the device was moved around, it’s from a ways back when I was just starting to play around.
OK, I’ve got some feedback from the backend team. They think we should trust the error message! Meaning that, even though the device is now in another application, it would still be running a release of the original application. I don’t have access to the device to confirm it (support access not granted to it), but if you visit the device’s dashboard page, you may find that it is running a release that belongs to another application: https://dashboard.balena-cloud.com/devices/1c72c5576e18f3ec98defefdab15f013/summary
If the device is offline and happens to be unused or no longer needed, you could try deleting it. If the device is actually running a release that belongs to its current application, then perhaps you could share the release ID (or grant support access to the device), so I could go back to the team. Thanks.
Thanks makes some weird sense. So I dug out the device from my junk box and plugged it in. It came right up, I even did an OS update. Love it.
It’s in application 1663879 which I just gave support access to as well. While the Target Release is Factory Build the Current Release is 92f964afe436656a42a0d41d8c7a9358. There does appear to be any containers running, at all. Should I push something simple to it?
Thank you for confirming it! I think the application was deleted just as I was looking at its release list on the web dashboard (looking for release 92f964afe436656a42a0d41d8c7a9358) – the list suddenly disappeared before my eyes.
I don’t know if pushing a new build was strictly necessary. I wonder if just pinning the device to another existing release (of the new application), or unpinning it, would be enough. The supervisor should take care to moving the device to a new target release.
Anyway, glad it is resolved!