I suspect the problem might be that the code you don't show calls the startProgressTimer()
method more than once for the same instance of whatever object it belongs to, and then within the method you store the interval id in an instance property this.eventProgressTimerId
- so multiple calls overwrite the property and you'd only be able to cancel the last one.
If that's the case, a simple fix is to declare your eventProgressTimerId
as a local variable within startProgressTimer().