Webix uploader.stopUpload doesn't work

Hi!
So, I was trying to cancel the uploading of the file with stopUpload and it didn’t work.

When I passed an ID into stopUpload it gave such error in webix.js:
TypeError: Cannot read properties of undefined (reading ‘xhr’)

uploader.stopUpload(this.currentFileId); //FIle’s ID is stored ‘globally’ in class

What can be the case?
Is it webix or I did something wrong(skill issue)?

_stop_file: function(t) {
var e = this.getItem(t);
void 0 !== e.xhr && (e.xhr.aborted = !0,
e.xhr.abort(),
delete e.xhr,
e.status = “client”)
}

Variable e here is undefined, for some reason this.getItem returns undefined.
What am I doing wrong?

So, it’s definitly a skill issue. This method works in my method of uploading a file. So within same boundaries/context. The question is, how can I do it in other method?
Can somebody give me any tips how should I resolve it?

So, to successfully call stopUpload method to stop an upload of a file they need to be within a scope of same promise.
How can I do it? Given that a cancelation of upload will be called from another function.

Okay, everyone! Thank you! The problem was solved.