Hi everyone!
Asking for help here, since I've gone through the API docs and done a lot of different changes to try and solve this issue, but at this point I don't know what to do anymore. In a matter of a few hours, I'm getting 17 error reports on ERA on different watch models as below:
Error Name: Null Reference Error
Occurrences: 17
First Occurrence: 2022-10-08 (updated it today to add the null check together with the has condition that already existed)
Last Occurrence: 2022-10-08
Devices:
fēnix® 6 Pro / 6 Sapphire / 6 Pro Solar / 6 Pro Dual Power / quatix® 6: 23.10
Venu 2: 10.22
fēnix® 6X Pro / 6X Sapphire / 6X Pro Solar / tactix® Delta Sapphire / Delta Solar / Delta Solar - Ballistics Edition / quatix® 6X / 6X Solar / 6X Dual Power: 23.10
epix (Gen 2) / quatix® 7 Sapphire: 9.36
Venu 2S: 9.22
Venu® Sq. Music Edition: 4.10
Forerunner® 955 / Solar: 12.23
Forerunner® 245 Music: 11.60
Venu: 7.20
fēnix® 7S: 9.36
fēnix® 7X / tactix® 7 / quatix® 7X Solar / Enduro 2: 8.37
Forerunner® 255 Music: 12.23
Venu 2 Plus: 10.20
Languages: cht, deu, eng, fre, ind, ita, rus, spa
The exact line of code is the one about feelsLikeTemperature below:
function initialize() {
WatchFace.initialize();
var variable=false;
if (Toybox has :Weather){
...
if (Toybox.Weather has :getCurrentConditions){
...
if (Toybox.Weather.getCurrentConditions() has :feelsLikeTemperature and Toybox.Weather.getCurrentConditions().feelsLikeTemperature!=null) {
variable=true;
}
}
}
...
}I know that sometimes the weather station returns null on the feels like temperature, but would my code above not already test that? Not sure exactly why there is still a null error being thrown. But I use that watch face daily and my weather station doesn't have that issue, and it's also something that I couldn't reproduce on the simulator.
Any help would be much appreciated!