Yeah, I'm using the STR from comment 1. I believe that after a background update, ```lastUpdateInstalled``` is retrieved from ```this._getUpdates()``` since ```updateInstalledAtStartup``` will be wiped at that point. ```this._getUpdates()``` reads ```updates.xml``` which is written [here](https://searchfox.org/mozilla-central/source/toolkit/mozapps/update/UpdateService.sys.mjs#4375) by ```.saveUpdates()```. The issue is that ```.saveUpdates()``` [writes](https://searchfox.org/mozilla-central/source/toolkit/mozapps/update/UpdateService.sys.mjs#4780) to the XML file the attributes of ```readyUpdate``` , which I don't think has a ```platformVersion``` value, we only [set](https://searchfox.org/mozilla-central/source/toolkit/mozapps/update/UpdateService.sys.mjs#4373-4374) that to ```updateInstalledAtStartup```. And this causes the ```platformVersion``` value to be missing when we read the value of ```lastUpdateInstalled``` during startup. I checked the ```update.xml``` file and ```platformVersion``` is indeed missing from the XML data. Sorry if this is a bit lengthy - do you think this makes sense? A potential fix would be to set platformVersion for readyUpdate as well.
Bug 1889785 Comment 16 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
Yeah, I'm using the STR from comment 1. I believe that after a background update, ```lastUpdateInstalled``` is retrieved from ```this._getUpdates()``` since ```updateInstalledAtStartup``` will be wiped at that point. ```this._getUpdates()``` reads ```updates.xml``` which is written [here](https://searchfox.org/mozilla-central/source/toolkit/mozapps/update/UpdateService.sys.mjs#4375) by ```.saveUpdates()```. The issue is that ```.saveUpdates()``` [writes](https://searchfox.org/mozilla-central/source/toolkit/mozapps/update/UpdateService.sys.mjs#4780) to the XML file the attributes of ```readyUpdate``` , which I don't think has a ```platformVersion``` value, we only [set](https://searchfox.org/mozilla-central/source/toolkit/mozapps/update/UpdateService.sys.mjs#4373-4374) that for ```updateInstalledAtStartup```. And this causes the ```platformVersion``` value to be missing when we read the value of ```lastUpdateInstalled``` during startup. I checked the ```update.xml``` file and ```platformVersion``` is indeed missing from the XML data. Sorry if this is a bit lengthy - do you think this makes sense? A potential fix would be to set platformVersion for readyUpdate as well.