Hi,
Although this might be related to : Sensor.setEnabledSensors exception on Venu, Vivoactive 4 - Connect IQ Bug Reports - Connect IQ - Garmin Forums
I think it is a separate issue!
Over the past three or four days, I have been seeing several ERA reports along the lines of this one:
Error Name: Symbol Not Found Error Occurrences: 12 First Occurrence: 2020-11-26 Last Occurrence: 2020-11-26 Devices: vÃvoactive® 4: 5.10 App Versions: 0.0.45 Languages: fre Backtrace:
The line number is a conditional where I check sub-sport based on Activity enumerators:
function checkEnabledSensors() { var subSport = collectSportInfo()[1]; var needsGps = storeData; if( subSport == ActivityRecording.SUB_SPORT_CARDIO_TRAINING || // @@ CRASH ON THIS LINE @@ subSport == ActivityRecording.SUB_SPORT_INDOOR_CYCLING || subSport == ActivityRecording.SUB_SPORT_SPIN || subSport == ActivityRecording.SUB_SPORT_TREADMILL) { needsGps = false; } if(needsGps) { Position.enableLocationEvents(Position.LOCATION_CONTINUOUS, method(:onPosition)); } try { //https://forums.garmin.com/developer/connect-iq/i/bug-reports/sensor-setenabledsensors-exception-on-venu-vivoactive-4 if(Sensor has :enableSensorType) { Sensor.enableSensorType(Sensor.SENSOR_HEARTRATE); Sensor.enableSensorType(Sensor.SENSOR_BIKECADENCE); Sensor.enableSensorType(Sensor.SENSOR_BIKEPOWER); Sensor.enableSensorType(Sensor.SENSOR_FOOTPOD); } else { Sensor.setEnabledSensors([Sensor.SENSOR_HEARTRATE,Sensor.SENSOR_BIKECADENCE,Sensor.SENSOR_BIKEPOWER,Sensor.SENSOR_FOOTPOD]); } } catch(e) {} }
So far, I have only seen it on French devices, and only on Vivoactive 4. However, I share this method across two or three apps, and I have observed a similar bug in each of them.
As you can see, I have already significantly safety checked my "checkEnabledSensors" method as per the previous bug report.
I can see no way for this to be failing, and certainly no way for it to be failing on that specific line.
G