When going into /nextcloud/index.php/settings/admin/overview it takes a moment until “A new version is available: Nextcloud 26.0.0” shows up.
I noticed that shortly before this is displayed, my browser accesses the following URL
/nextcloud/dist/updatenotification-updatenotification.js?v=a7f6d7d7-0
/nextcloud/ocs/v2.php/apps/updatenotification/api/v1/applist/26.0.0.11
But I can nowhere find a JSON or alike transporting the new version string (e.g. 26.0.0.11) or another value which would set data.newVersionString within UpdateNotification.vue to the new version or data.newVersion to true.
How does this work technically to tell the browser that an updated Nextcloud version is available?
It uses the initial state method of the NC core. It is set here. During mounting of the Vue component the initial state is loaded.
The documentation can be found online as well.
The data itself is transported as a hidden input field in the NC main page (at least on my version):
The value is base64 encoded. After decoding and pretty printing (echo eyJpc... | base64 -d | yq
), I see there
{
"isNewVersionAvailable": false,
"isUpdateChecked": true,
"lastChecked": "April 7, 2023 at 10:13:03 AM",
"currentChannel": "git",
"channels": [
"daily",
"beta",
"stable",
"production",
"git"
],
"newVersion": "",
"newVersionString": "",
"downloadLink": "",
"changes": [],
"webUpdaterEnabled": true,
"isWebUpdaterRecommended": true,
"updaterEnabled": false,
"versionIsEol": false,
"isDefaultUpdateServerURL": true,
"updateServerURL": "https://updates.nextcloud.com/updater_server/",
"notifyGroups": [
{
"id": "admin",
"displayname": "admin"
}
],
"hasValidSubscription": false
}
Here you are.
2 Likes
OMG, thanks so much.
I looked at these values but totally ignored the “=” at their end and have therefore not even attempted to base64 decode them.
1 Like